INNODB_BUFFER_POOL_STATS 表提供了与 SHOW ENGINE INNODB
STATUS 输出中提供的大部分缓冲池信息相同的信息。通过 InnoDB 缓冲池的 服务器状态变量 也可以获得大部分相同的信息。The INNODB_BUFFER_POOL_STATS table
provides much of the same buffer pool information provided in
SHOW ENGINE INNODB
STATUS output. Much of the same information may also be
obtained using InnoDB buffer pool
server status
variables.
在缓冲池中将页面标记为“年轻”或“不年轻”的概念,指的是在缓冲池数据结构的头部和尾部的子列表之间进行转移。标记为“年轻”的页面在缓冲池中老化得更慢,而标记为“不年轻”的页面则被移得更接近驱逐点。The idea of making pages in the buffer pool “young” or “not young” refers to transferring them between the sublists at the head and tail of the buffer pool data structure. Pages made “young” take longer to age out of the buffer pool, while pages made “not young” are moved much closer to the point of eviction.
有关相关用法信息和示例,请参见 第 17.15.5 节,“InnoDB INFORMATION_SCHEMA 缓冲池表”。For related usage information and examples, see Section 17.15.5, “InnoDB INFORMATION_SCHEMA Buffer Pool Tables”.
INNODB_BUFFER_POOL_STATS 表包含以下列:The INNODB_BUFFER_POOL_STATS table
has these columns:
POOL_ID缓冲池 ID。这是用于区分多个缓冲池实例的标识符。The buffer pool ID. This is an identifier to distinguish between multiple buffer pool instances.
POOL_SIZEInnoDB缓冲池大小(以页为单位)。TheInnoDBbuffer pool size in pages.FREE_BUFFERSInnoDB缓冲池中空闲页的数量。The number of free pages in theInnoDBbuffer pool.DATABASE_PAGESInnoDB缓冲池中包含数据的页数。此数字包括脏页和干净页。The number of pages in theInnoDBbuffer pool containing data. This number includes both dirty and clean pages.OLD_DATABASE_PAGESThe number of pages in the
oldbuffer pool sublist.MODIFIED_DATABASE_PAGES已修改(脏)数据库页的数量。The number of modified (dirty) database pages.
PENDING_DECOMPRESS待解压的页数。The number of pages pending decompression.
PENDING_READS待读取的页数。The number of pending reads.
PENDING_FLUSH_LRULRU 中等待刷新页的数量。The number of pages pending flush in the LRU.
PENDING_FLUSH_LIST刷新列表中等待刷新页的数量。The number of pages pending flush in the flush list.
PAGES_MADE_YOUNG被标记为年轻的页的数量。The number of pages made young.
PAGES_NOT_MADE_YOUNG未被标记为年轻的页的数量。The number of pages not made young.
PAGES_MADE_YOUNG_RATE每秒被标记为年轻的页的数量(自上次打印以来标记为年轻的页数 / 经过的时间)。The number of pages made young per second (pages made young since the last printout / time elapsed).
PAGES_MADE_NOT_YOUNG_RATE每秒未被标记的页的数量(自上次打印以来未被标记为年轻的页数 / 经过的时间)。The number of pages not made per second (pages not made young since the last printout / time elapsed).
NUMBER_PAGES_READ已读取页的数量。The number of pages read.
NUMBER_PAGES_CREATED创建的页数。The number of pages created.
NUMBER_PAGES_WRITTEN写入的页数。The number of pages written.
PAGES_READ_RATE每秒读取的页数(自上次输出以来读取的页数 / 已用时间)。The number of pages read per second (pages read since the last printout / time elapsed).
PAGES_CREATE_RATE每秒创建的页数(自上次输出以来创建的页数 / 已用时间)。The number of pages created per second (pages created since the last printout / time elapsed).
PAGES_WRITTEN_RATE每秒写入的页数(自上次输出以来写入的页数 / 已用时间)。The number of pages written per second (pages written since the last printout / time elapsed).
NUMBER_PAGES_GET逻辑读取请求的数量。The number of logical read requests.
HIT_RATE缓冲池命中率。The buffer pool hit rate.
YOUNG_MAKE_PER_THOUSAND_GETS每千次获取创建的年轻页数。The number of pages made young per thousand gets.
NOT_YOUNG_MAKE_PER_THOUSAND_GETS每千次获取未被年轻化的页数。The number of pages not made young per thousand gets.
NUMBER_PAGES_READ_AHEAD预读的页数。The number of pages read ahead.
NUMBER_READ_AHEAD_EVICTED由预读后台线程读入
InnoDB缓冲池但随后未被查询访问就被驱逐的页数。The number of pages read into theInnoDBbuffer pool by the read-ahead background thread that were subsequently evicted without having been accessed by queries.READ_AHEAD_RATE每秒预读速率(自上次打印以来预读的页数 / 所经过时间)。The read-ahead rate per second (pages read ahead since the last printout / time elapsed).
READ_AHEAD_EVICTED_RATE每秒未访问而被驱逐的预读页数(自上次打印以来未被访问的预读页数 / 所经过时间)。The number of read-ahead pages evicted without access per second (read-ahead pages not accessed since the last printout / time elapsed).
LRU_IO_TOTALLRU 总 I/O。Total LRU I/O.
LRU_IO_CURRENT当前时间间隔的 LRU I/O。LRU I/O for the current interval.
UNCOMPRESS_TOTAL已解压的页面总数。The total number of pages decompressed.
UNCOMPRESS_CURRENT当前时间间隔内解压的页面数。The number of pages decompressed in the current interval.
示例Example
mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS\G
*************************** 1. row ***************************
POOL_ID: 0
POOL_SIZE: 8192
FREE_BUFFERS: 1
DATABASE_PAGES: 8085
OLD_DATABASE_PAGES: 2964
MODIFIED_DATABASE_PAGES: 0
PENDING_DECOMPRESS: 0
PENDING_READS: 0
PENDING_FLUSH_LRU: 0
PENDING_FLUSH_LIST: 0
PAGES_MADE_YOUNG: 22821
PAGES_NOT_MADE_YOUNG: 3544303
PAGES_MADE_YOUNG_RATE: 357.62602199870594
PAGES_MADE_NOT_YOUNG_RATE: 0
NUMBER_PAGES_READ: 2389
NUMBER_PAGES_CREATED: 12385
NUMBER_PAGES_WRITTEN: 13111
PAGES_READ_RATE: 0
PAGES_CREATE_RATE: 0
PAGES_WRITTEN_RATE: 0
NUMBER_PAGES_GET: 33322210
HIT_RATE: 1000
YOUNG_MAKE_PER_THOUSAND_GETS: 18
NOT_YOUNG_MAKE_PER_THOUSAND_GETS: 0
NUMBER_PAGES_READ_AHEAD: 2024
NUMBER_READ_AHEAD_EVICTED: 0
READ_AHEAD_RATE: 0
READ_AHEAD_EVICTED_RATE: 0
LRU_IO_TOTAL: 0
LRU_IO_CURRENT: 0
UNCOMPRESS_TOTAL: 0
UNCOMPRESS_CURRENT: 0
注意事项Notes
此表主要用于专家级性能监控,或者在为 MySQL 开发与性能相关的扩展时使用。This table is useful primarily for expert-level performance monitoring, or when developing performance-related extensions for MySQL.
你必须拥有
PROCESS权限才能查询此表。You must have thePROCESSprivilege to query this table.使用
INFORMATION_SCHEMACOLUMNS表或SHOW COLUMNS语句查看关于此表列的更多信息,包括数据类型和默认值。Use theINFORMATION_SCHEMACOLUMNStable or theSHOW COLUMNSstatement to view additional information about the columns of this table, including data types and default values.