LP #1534114: Busy server prefers LRU flushing over flush list flushing too strongly

Description

**Reported in Launchpad by Laurynas Biveinis last update 18-01-2016 11:28:28

With the current 5.7 version of the fix for https://bugs.launchpad.net/percona-server/+bug/1234562 / http://bugs.mysql.com/bug.php?id=70500, the main cleaner coordinator thread loop looks like

... /* Flush LRU:*/
pc_flush(0, 0, &n_processed_lru, &n_flushed_list);
ut_ad(n_flushed_list == 0);
... /* LRU iteration took too long */
if (ut_time_ms() > next_loop_time)
ret_sleep = OS_SYNC_TIME_EXCEEDED;
... /* Sync flush? */
else if (ret_sleep != OS_SYNC_TIME_EXCEEDED
&& srv_flush_sync
&& buf_flush_sync_lsn > 0) {
... /* adaptive flush? */
} else if (srv_check_activity(last_activity)) {
... /* idle flush? */
} else if (ret_sleep == OS_SYNC_TIME_EXCEEDED) {
...
} else {
/* no activity, but woken up by event */
}

Thus, if LRU took too long, we won't go into sync flush, even if that is requested, in which case it will cause performance degradation.

Environment

None

Smart Checklist

Activity

Show:
Done

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 24, 2018 at 8:54 AM
Updated January 24, 2018 at 8:55 AM
Resolved January 24, 2018 at 8:55 AM