问答

mysql出现大量page_cleaner,且伴随慢日志产生

作者:admin 2021-06-14 我要评论

mysql error log: 2020-07-22T04:15:08.322780+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 5236ms. The settings might not be optimal. ...

在说正事之前,我要推荐一个福利:你还在原价购买阿里云、腾讯云、华为云服务器吗?那太亏啦!来这里,新购、升级、续费都打折,能够为您省60%的钱呢!2核4G企业级云服务器低至69元/年,点击进去看看吧>>>)
  1. mysql error log:

    2020-07-22T04:15:08.322780+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 5236ms. The settings might not be optimal. (flushed=36 and evicted=0, during the time.)
    2020-07-22T04:15:26.854575+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 7530ms. The settings might not be optimal. (flushed=24 and evicted=0, during the time.)
    2020-07-22T04:15:55.982264+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 8965ms. The settings might not be optimal. (flushed=18 and evicted=0, during the time.)
    2020-07-22T05:53:23.453331+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4191ms. The settings might not be optimal. (flushed=99 and evicted=0, during the time.)
    2020-07-22T21:33:59.069233+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4232ms. The settings might not be optimal. (flushed=161 and evicted=0, during the time.)
    2020-07-22T21:48:00.532715+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 7849ms. The settings might not be optimal. (flushed=41 and evicted=0, during the time.)
    2020-07-22T21:48:37.229423+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 32965ms. The settings might not be optimal. (flushed=165 and evicted=0, during the time.)
    2020-07-22T21:49:35.847991+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 56618ms. The settings might not be optimal. (flushed=185 and evicted=0, during the time.)
    2020-07-22T21:50:07.120357+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 29273ms. The settings might not be optimal. (flushed=185 and evicted=0, during the time.)
    2020-07-22T21:50:33.231796+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 15099ms. The settings might not be optimal. (flushed=189 and evicted=0, during the time.)
    2020-07-22T21:57:33.514604+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 8588ms. The settings might not be optimal. (flushed=136 and evicted=0, during the time.)
    2020-07-22T22:19:31.348986+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4437ms. The settings might not be optimal. (flushed=40 and evicted=0, during the time.)
    2020-07-22T22:20:40.069304+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 5540ms. The settings might not be optimal. (flushed=26 and evicted=0, during the time.)
    2020-07-22T22:27:43.361467+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4436ms. The settings might not be optimal. (flushed=39 and evicted=0, during the time.)
    2020-07-22T22:42:26.528219+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 5692ms. The settings might not be optimal. (flushed=21 and evicted=0, during the time.)
    2020-07-22T22:55:51.888866+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 9090ms. The settings might not be optimal. (flushed=88 and evicted=0, during the time.)
    2020-07-22T23:05:37.595384+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 6075ms. The settings might not be optimal. (flushed=9 and evicted=0, during the time.)
  2. mysql slow log(有些隐私信息打码了,见谅)
    image.png
    error log和slow log出现的时间基本一致。
  3. 目前这台机器的负载都很小,只用来写操作。
    image.png
  4. 根据page_cleaner查找资料,也对mysql的配置进行调整,效果甚微,目前配置如下:

    innodb_io_capacity=200
    innodb_page_cleaners=4
    innodb_buffer_pool_instances=8
    innodb_lru_scan_depth=256
    innodb_max_dirty_pages_pct=50 
    innodb_max_dirty_pages_pct_lwm=0

mysql版本5.7.26,和另外一台mysql版本5.7.18互为主主,但另外一台就不会出现这问题。

诸位是否有思路或处理过mysql5.7版本出现page_cleaner这个经典问题?其实出现page_cleaner无所谓,不要因此产生慢日志,就会影响线上服务。

再出现慢日志就考虑要重建mysql了。。。

###

可以看看是否有大数据导入操作,当导入大数据的时候,脏页频繁刷新可能会导致page_cleaner警告。

版权声明:本文转载自网络,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本站转载出于传播更多优秀技术知识之目的,如有侵权请联系QQ/微信:153890879删除

相关文章
  • mysql出现大量page_cleaner,且伴随慢

    mysql出现大量page_cleaner,且伴随慢

  • vue和react  函数式组件的对比

    vue和react 函数式组件的对比

  • 关于Vue集成富文本编辑器Tinymce,图片

    关于Vue集成富文本编辑器Tinymce,图片

  • element-ui,表单resetFields方法的疑问

    element-ui,表单resetFields方法的疑问

腾讯云代理商
海外云服务器