InnoDB: Warning: difficult to find free blocks in

从昨天开始错误日志剧增,查看一下报的都是这个错:果断查看my.cnf 果真 innodb_buffer_pool_size=20M

看了一下内存16G。。。。16G*80%=12G   因为是db专用服务器所以,可以把这个参数值设置的最大为12G,

于是设置 : innodb_buffer_pool_size=1024M  第一次没设置那么大。

然后重启数据库,报错消失。

131121  8:11:30  InnoDB: Warning: difficult to find free blocks in

InnoDB: the buffer pool (83639 search iterations)! Consider
InnoDB: increasing the buffer pool size.
InnoDB: It is also possible that in your Unix version
InnoDB: fsync is very slow, or completely frozen inside
InnoDB: the OS kernel. Then upgrading to a newer version
InnoDB: of your operating system may help. Look at the
InnoDB: number of fsyncs in diagnostic info below.
InnoDB: Pending flushes (fsync) log: 0; buffer pool: 0
InnoDB: 2145773983 OS file reads, 1169418963 OS file writes, 150424420 OS fsyncs
InnoDB: Starting InnoDB Monitor to print further
InnoDB: diagnostics to the standard output.
131121  8:11:30  InnoDB: Warning: difficult to find free blocks in
InnoDB: the buffer pool (83657 search iterations)! Consider
InnoDB: increasing the buffer pool size.
InnoDB: It is also possible that in your Unix version
InnoDB: fsync is very slow, or completely frozen inside
InnoDB: the OS kernel. Then upgrading to a newer version
InnoDB: of your operating system may help. Look at the
InnoDB: number of fsyncs in diagnostic info below.
InnoDB: Pending flushes (fsync) log: 0; buffer pool: 0
InnoDB: 2145773983 OS file reads, 1169418963 OS file writes, 150424420 OS fsyncs
InnoDB: Starting InnoDB Monitor to print further

InnoDB: diagnostics to the standard output.

下面是具体的原因:

InnoDB: Warning: difficult to find free blocks from the buffer pool (xxxxx search iterations)! 这个错误产生的原因是mysql的InnoDB引擎的一个参数innodb_buffer_pool_size,它的值过小引起(默认8M,mysql版本:5.1.3-alpha-max)。

innodb_buffer_pool_size参数对InnoDb来说很重要,它是个缓存区,用来缓存表的数据和索引键,对InnoDb的性能影响很大,它的大小决定了InnoDb的吞吐量。官方建议它的大小设为物理内存的80%(如果该服务器为MYSQL专用服务器),但考虑到服务器上还有其他应用在跑,并且InnoDb类型的表不多,大多为Myisam引擎,我把my.cnf文件中该参数的值调为了512M(物理内存4G),然后重启mysqld服务器。InnoDB: Warning: difficult to find free blocks from the buffer pool (xxxxx search iterations)! 错误消失。



  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wulantian

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值