by adjusting the number of sequential page accesses required to trigger an asynchronous read request, using the configuration parameter innodb_read_ahead_threshold . Before this parameter was added, InnoDB  would only calculate whether to issue an asynchronous prefetch request for the entire next extent when it read the last page of the current extent. 

The configuration parameter innodb_read_ahead_threshold  controls how sensitive InnoDB  is in detecting patterns of sequential page access. If the number of pages read sequentially from an extent is greater than or equal to innodb_read_ahead_threshold , InnoDB  initiates an asynchronous read- ahead operation of the entire following extent. innodb_read_ahead_threshold  can be set to any value from 0-64. The default value is 56. The higher the value, the more strict the access pattern check. For example, if you set the value to 48, InnoDB  triggers a linear read-ahead request only when 48 pages in the current extent have been accessed sequentially. If the value is 8, InnoDB  triggers an asynchronous read-ahead even if as few as 8 pages in the extent are accessed sequentially. You can set the value of this parameter in the MySQL configuration file, or change it dynamically with the SET GLOBAL  statement, which requires privileges sufficient to set global system variables. See Section 5.1.9.1, “System Variable Privileges” . 

Random  read-ahead is a technique that predicts when pages might be needed soon based on pages already in the buffer pool, regardless of the order in which those pages were read. If 13 consecutive pages from the same extent are found in the buffer pool, InnoDB  asynchronously issues a request to prefetch the remaining pages of the extent. To enable this feature, set the configuration variable innodb_random_read_ahead  to ON . 

The SHOW ENGINE INNODB STATUS  command displays statistics to help you evaluate the effectiveness of the read-ahead algorithm. Statistics include counter information for the following global status variables: 

• Innodb_buffer_pool_read_ahead 

• Innodb_buffer_pool_read_ahead_evicted 

• Innodb_buffer_pool_read_ahead_rnd 

This information can be useful when fine-tuning the innodb_random_read_ahead  setting. 

For more information about I/O performance, see Section 8.5.8, “Optimizing InnoDB Disk I/O”  and Section 8.12.1, “Optimizing Disk I/O” . 

## 15.8.3.5 Configuring Buffer Pool Flushing 

InnoDB  performs certain tasks in the background, including flushing of dirty pages from the buffer pool. Dirty pages are those that have been modified but are not yet written to the data files on disk. 

In MySQL 8.0, buffer pool flushing is performed by page cleaner threads. The number of page cleaner threads is controlled by the innodb_page_cleaners  variable, which has a default value of 4. However, if the number of page cleaner threads exceeds the number of buffer pool instances, innodb_page_cleaners  is automatically set to the same value as innodb_buffer_pool_instances . 

Buffer pool flushing is initiated when the percentage of dirty pages reaches the low water mark value defined by the innodb_max_dirty_pages_pct_lwm  variable. The default low water mark is 10% of buffer pool pages. A innodb_max_dirty_pages_pct_lwm  value of 0 disables this early flushing behaviour. 

The purpose of the innodb_max_dirty_pages_pct_lwm  threshold is to control the percentage dirty pages in the buffer pool and to prevent the amount of dirty pages from reaching the threshold defined by the innodb_max_dirty_pages_pct  variable, which has a default value of 90. InnoDB 

