Backoff for sync preflushes

Registered by Laurynas Biveinis

Currently if a log-writing thread finds that the checkpoint age is in the sync preflush zone, it will attempt to advance the checkpoint itself by issuing a flush list flush batch unless one is running already. After the page cleaner tuning [1] this feature hinders more than helps: the cleaner thread knows that the system is in sync preflush and will perform furious flushing itself. The thread doing its own flushes will only contribute to mutex pressure and use CPU. It is better for the query threads to wait for any required flushes to complete instead.

[1] is a prerequisite, even though the page cleaner would have performed the necessary flusing in its stock version too, is that with [1] fixes the cleaner will not be performing LRU flushing too long, prolonging the needing log space query thread wait.

Implement by adjusting log_preflush_pool_modified_pages() to wait until the oldest unflushed page advances past the target LSN. This is controlled by a new bool option, innodb_foreground_preflush, default on.

[1] https://blueprints.launchpad.net/percona-server/+spec/cleaner-tuning-5.6

Blueprint information

Status:
Complete
Approver:
None
Priority:
High
Drafter:
Laurynas Biveinis
Direction:
Approved
Assignee:
Laurynas Biveinis
Definition:
Approved
Series goal:
Accepted for 5.6
Implementation:
Implemented
Milestone target:
milestone icon 5.6.13-61.0
Started by
Laurynas Biveinis
Completed by
Laurynas Biveinis

Whiteboard

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.