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

发布于 2022-09-12 03:54:34 字数 3773 浏览 24 评论 0

  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了。。。

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦回旧景 2022-09-19 03:54:34

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文