如何计算页面清洁器线程每秒执行的工作量? [英] How to calculate amount of work performed by the page cleaner thread each second?

查看:51
本文介绍了如何计算页面清洁器线程每秒执行的工作量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试调整InnoDB缓冲池刷新参数.

I try to tune InnoDB Buffer Pool Flushing parameters.

在MySQL 5.7手册中

  • innodb_lru_scan_depth * innodb_buffer_pool_instances =页面清洁器线程每秒执行的工作量

我的问题是:如何计算页面清洁器线程每秒执行的工作量?

My question is : How can I calculate the amount of work performed by the page cleaner thread each second?

推荐答案

运行SQL命令:

SHOW GLOBAL STATUS LIKE 'Innodb_buffer_pool_pages_flushed'

每秒一次.将该值与前一秒进行比较.

Once every second. Compare the value to the previous second.

该值从一秒到下一秒的差是页面清洁器请求刷新到磁盘的脏页面数.

The difference of that value from one second to the next is the number of dirty pages the page cleaner requested to flush to disk.

示例:

mysql> SHOW GLOBAL STATUS LIKE 'Innodb_buffer_pool_pages_flushed';
+----------------------------------+-----------+
| Variable_name                    | Value     |
+----------------------------------+-----------+
| Innodb_buffer_pool_pages_flushed | 496786650 |
+----------------------------------+-----------+

...wait a moment...

mysql> SHOW GLOBAL STATUS LIKE 'Innodb_buffer_pool_pages_flushed';
+----------------------------------+-----------+
| Variable_name                    | Value     |
+----------------------------------+-----------+
| Innodb_buffer_pool_pages_flushed | 496787206 |
+----------------------------------+-----------+

因此,在我等待的那一刻,页面清洁器刷新了556页.

So in the moment I waited, the page cleaner flushed 556 pages.

这项工作的上限是一个复杂的计算,涉及多个InnoDB配置选项.阅读我对,以描述其工作方式.

The upper limit of this work is a complex calculation, involving several InnoDB configuration options. Read my answer to How to solve mysql warning: "InnoDB: page_cleaner: 1000ms intended loop took XXX ms. The settings might not be optimal "? for a description of how it works.

这篇关于如何计算页面清洁器线程每秒执行的工作量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆