InnoDB可以使用SHOW ENGINE INNODB STATUS的标准监视器输出提供与InnoDB缓冲池操作相关的指标,InnoDB缓冲池指标位于标准监视器输出的BUFFER POOL AND MEMORY部分,显示内容类似如下:
----------------------
BUFFER POOL AND MEMORY
----------------------
Total large memory allocated 137428992
Dictionary memory allocated 681173
Buffer pool size 8191
Free buffers 7453
Database pages 738
Old database pages 255
Modified db pages 0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 378, created 360, written 3112
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 738, unzip_LRU len: 0
I/O sum[0]:cur[0], unzip sum[0]:cur[0]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
----------------------
BUFFERPOOLANDMEMORY
----------------------
Totallargememoryallocated137428992
Dictionarymemoryallocated681173
Bufferpoolsize8191
Freebuffers7453
Databasepages738
Olddatabasepages255
Modifieddbpages0
Pendingreads0
Pendingwrites:LRU0,flushlist0,singlepage0
Pagesmadeyoung0,notyoung0
0.00youngs/s,0.00non-youngs/s
Pagesread378,created360,written3112
0.00reads/s,0.00creates/s,0.00writes/s
Bufferpoolhitrate1000/1000,young-makingrate0/1000not0/1000
Pagesreadahead0.00/s,evictedwithoutaccess0.00/s,Randomreadahead0.00/s
LRUlen:738,unzip_LRUlen:0
I/Osum[0]:cur[0],unzipsum[0]:cur[0]
注意,InnoDB标准监视器输出中提供的每秒平均值是基于自上次打印InnoDB标准监视器输出以来的经过时间。
介绍相关指标:
Total memory allocated:为缓冲池分配的总内存(以字节为单位)。
Dictionary memory allocated:分配给InnoDB数据字典的总内存(以字节为单位)。
Buffer pool size:分配给缓冲池的页面总页数(数量*页面大小=缓冲池大小)。
Free buffers:缓冲池空闲列表的页面总页数(Buffer pool size -Database pages)。
Database pages:缓冲池LRU list的页面总页数(可以理解为已经使用的页面)。
Old database pages:缓冲池旧LRU sublist的页面总大小(可以理解为不经常访问的页面,即将可能被LRU算法淘汰的页面)。
Modified db pages:在缓冲池中已经修改了的页数,所谓脏数据。
Pending reads:等待在缓冲池中读取的缓冲池页数。
Pending writes LRU:将要从LRU list底部写入的缓冲池中的旧脏页数。
Pending writes flush list:在checkpoint期间要刷新的缓冲池页数。
Pending writes single page:在缓冲池中写入挂起的独立页的数目。
Pages made young:在缓冲池LRU list中年轻的总页数(移动新页面到sublist的头部)。
Pages made not young:在缓冲池LRU列表中不年轻的页面总数(保留旧页面在sublist中,不改变)。
youngs/s:在缓冲池LRU list中访问旧页面的平均每秒平均值导致页面较少。
non-youngs/s:未知。
Pages read:从缓冲池读取的总页数。
Pages created:在缓冲池中创建的总页数。
Pages written:从缓冲池写入的总页数。
reads/s:缓冲池页面每秒平均读取次数。
creates/s:缓冲池页面每秒平均创建的次数。
writes/s:缓冲池页面每秒平均写入次数。
Buffer pool hit rate:从缓冲池内存中读取的页面与磁盘存储器的缓冲池页命中率。
young-making rate:页面访问的平均命中率没有导致页面变得young。
Pages read ahead:每秒钟线性预读操作的次数。
Pages evicted without access:未从缓冲池访问,每秒被逐出的页面的次数。
Random read ahead:每秒钟随机预读操作的次数。
LRU len:缓冲池LRU list的页面总大小。
unzip_LRU len:缓冲池unzip_LRU list的页面总大小。
I/O sum:在过去50秒内访问缓冲池LRU list页面的总数。
I/O cur:访问的缓冲池LRU list页面的总数。
I/O unzip sum:访问缓冲池unzip_LRU list页面的总数。
I/O unzip cur:访问缓冲池unzip_LRU list页面的总数。
如果您觉得本站对你有帮助,那么可以支付宝扫码捐助以帮助本站更好地发展,在此谢过。