重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3835|回复: 0
打印 上一主题 下一主题

[日志类] InnoDB: Warning: difficult to find free blocks

[复制链接]
跳转到指定楼层
楼主
发表于 2021-2-18 14:10:05 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

从昨天开始错误日志剧增,查看一下报的都是这个错:果断查看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)! 错误消失。


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-24 20:52 , Processed in 0.103937 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表