Age-based flush list flushing

Registered by Laurynas Biveinis

Implement new, age-based flush list flushing heuristics.

buf_flush_list() flush list flush algorithm in MySQL 5.6 has the following properties.

- Flushing is limited by both the maximum page count (min_n arg) and the desired new oldest oldest_modification in the buffer pool (lsn_limit) arg. Flushing stops when either limit is reached.
- The maximum page count is distributed across all instances evenly.
- On the other hand, buffer pool usage is non-uniform, which means that limiting flushing by both an LSN limit and an uniformly-distributed page count is likely to result in a failure to reach the desired LSN limit because the page count was not enough for this instance, either reaching the LSN limit very quickly and not doing much flushing for the instance. Across all instances this means that flush requests may vary in size (because of the instances that reached the LSN limit soon), and may not reach the desired oldest dirty page LSN (because of the instances whose flushing was capped by the page count before the LSN limit was reached). This results in some flushes failing to advance the checkpoint age at all and some flushes advancing it by a large amount (sawtooth pattern).

This is addressed by
- removing LSN limit as an input for the adaptive flushing algorithm, leaving only the page count. LSN limit is not critical below the sync preflush zone as long as the page count is distributed in a way that maximizes the oldest unflushed page age advance:
- instead of splitting the target page count to the instances evenly, allocate more pages to the instances with older oldest unflushed pages, and fewer pages to the instances with younger oldest unflushed pages. This is done by calculating, for each instance individually, a minimum number of pages to flush that would result in the oldest unflushed page being advanced globally.

This is governed by a new global, dynamic system variable --innodb-flush-list-flush-algorithm=(legacy|age_based).

Blueprint information

Status:
Started
Approver:
None
Priority:
Medium
Drafter:
Laurynas Biveinis
Direction:
Approved
Assignee:
None
Definition:
Drafting
Series goal:
Accepted for 5.6
Implementation:
Slow progress
Milestone target:
None
Started by
Laurynas Biveinis

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.