mysql如何查看缓冲池命中率
这篇文章给大家分享的是有关MySQL如何查看缓冲池命中率的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。
创新互联-专业网站定制、快速模板网站建设、高性价比良庆网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式良庆网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖良庆地区。费用合理售后完善,10多年实体公司更值得信赖。
方法一:
mysql> show engine innodb status\G;
*************************** 1. row ***************************
Type: InnoDB
Name:
Status:
=====================================
2016-06-07 09:40:38 7f593136f700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 6 seconds #以下信息是最近6秒的平均值
.............................................
.............................................
Buffer pool size 393208
Buffer pool size, bytes 6442319872
Free buffers 8807
Database pages 373575
Old database pages 137869
Modified db pages 43
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 1132357, not young 92318292
2.33 youngs/s, 2496.75 non-youngs/s
Pages read 2127203, created 1317816, written 1762250
18.00 reads/s, 3.83 creates/s, 14.33 writes/s
Buffer pool hit rate 998 / 1000, young-making rate 0 / 1000 not 314 / 1000 #缓冲池命中率
结果:最近6秒缓冲池命中率是99.8%
方法二:
mysql> show global status like 'innodb%read%';
+---------------------------------------+-------------+
| Variable_name | Value |
+---------------------------------------+-------------+
| Innodb_buffer_pool_read_ahead_rnd | 0 |
| Innodb_buffer_pool_read_ahead | 839015 | #预读次数
| Innodb_buffer_pool_read_ahead_evicted | 0 |
| Innodb_buffer_pool_read_requests | 1497697965 | #从缓冲池中读取页的次数
| Innodb_buffer_pool_reads | 1227641 | #从物理磁盘读取页的次数
| Innodb_data_pending_reads | 0 |
| Innodb_data_read | 34861846528 | #总共读入的字节数
| Innodb_data_reads | 2128711 | #总共读取的次数
| Innodb_master_thread_active_loops | 63667 |
| Innodb_master_thread_idle_loops | 24896 |
| Innodb_pages_read | 2127692 |
| Innodb_rows_read | 803908452 |
| Innodb_read_views_memory | 2176 |
+---------------------------------------+-------------+
13 rows in set (0.00 sec)
缓冲池命中率= Innodb_buffer_pool_read_requests/(Innodb_buffer_pool_read_requests+Innodb_buffer_pool_reads+Innodb_buffer_pool_read_ahead)=1497697965/(1497697965+1227641+839015)=99.85%
平均读取的字节数=Innodb_data_read/ Innodb_data_reads=16376
可以看出系统的内存使用效率还是很高的
感谢各位的阅读!关于“mysql如何查看缓冲池命中率”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!
本文题目:mysql如何查看缓冲池命中率
地址分享:http://ybzwz.com/article/gjdddg.html