mysql中的预读取是异步io方式的,有2中算法,一个是Linear,一个是Random,
Controls the sensitivity of linear read-ahead that InnoDB uses to prefetch pages into the buffer pool. If InnoDB reads at least innodb_read_ahead_threshold pages sequentially from an extent (64 pages), it initiates an asynchronous read for the entire following extent. The permissible range of values is 0 to 64. A value of 0 disables read-ahead. For the default of 56, InnoDB must read at least 56 pages sequentially from an extent to initiate an asynchronous read for the following extent.
这个参数看extent中有多少的快是顺序读取的,如果超过了这个值,那么就开始一个异步io读下一个extent.
random的方式是如果一个段上连续13个快都在buffer pool,那么就把剩余的块都读进来,使用innodb_random_read_ahead 这个参数进行的控制。
Knowing how many pages are read through the read-ahead mechanism, and how many of these pages are evicted from the buffer pool without ever being accessed, can be useful when fine-tuning the innodb_read_ahead_threshold setting. SHOW E