More Read-Ahead Statistics
As described in , "Changes in the Read-Ahead Algorithm", a read-ahead request is an asynchronous I/O request issued in anticipation that a page will be used in the near future. Knowing how many pages are read through this read-ahead mechanism, and how many of them are evicted from the buffer pool without ever being accessed, can be useful to help fine-tune the parameter innodb_read_ahead_threshold
.
SHOW ENGINE INNODB STATUS
output displays the global status variables Innodb_buffer_pool_read_ahead
and Innodb_buffer_pool_read_ahead_evicted
. These variables indicate the number of pages brought into the buffer pool by read-ahead requests, and the number of such pages evicted from the buffer pool without ever being accessed respectively. These counters provide global values since the last server restart.
SHOW ENGINE INNODB STATUS
also shows the rate at which the read-ahead pages are read in and the rate at which such pages are evicted without being accessed. The per-second averages are based on the statistics collected since the last invocation of SHOW ENGINE INNODB STATUS
and are displayed in the BUFFER POOL AND MEMORY
section of the output.
Since the InnoDB read-ahead mechanism has been simplified to remove random read-ahead, the status variables Innodb_buffer_pool_read_ahead_rnd
and Innodb_buffer_pool_read_ahead_seq
are no longer part of the SHOW ENGINE INNODB STATUS
output.