Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.6
Description
Recently changes in introduced by MDEV-24537 accidentally changed the logic such that the flow will not start flushing pages till the number of the dirty-pages > srv_max_buf_pool_modified_pct (default 90%) when ideally is flushing should kick in when the dirty pages > 10%.
if (lsn_limit);
|
**** else if (dirty_pct < srv_max_buf_pool_modified_pct)****
|
goto unemployed;
|
else if (srv_max_dirty_pages_pct_lwm == 0.0 ||
|
dirty_pct < srv_max_dirty_pages_pct_lwm)
|
goto unemployed;
|
Said condition is wrong and should be removed.
Attachments
Issue Links
- is caused by
-
MDEV-24537 innodb_max_dirty_pages_pct_lwm=0 lost its special meaning
-
- Closed
-
- relates to
-
MDEV-24278 InnoDB page cleaner keeps waking up on idle server
-
- Closed
-
-
MDEV-24369 Page cleaner sleeps indefinitely despite innodb_max_dirty_pages_pct_lwm being exceeded
-
- Closed
-
Thank you for the report. This regression was caused by
MDEV-24278, which aims avoid unnecessary regular wake-up of the page cleaner thread.The following change should fix this:
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc
index 21a01dbd2fe..0acf9334c2c 100644
--- a/storage/innobase/buf/buf0flu.cc
+++ b/storage/innobase/buf/buf0flu.cc
@@ -2136,11 +2136,13 @@ static os_thread_ret_t DECLARE_THREAD(buf_flush_page_cleaner)(void*)
double(UT_LIST_GET_LEN(buf_pool.LRU) + UT_LIST_GET_LEN(buf_pool.free));
if (lsn_limit);
+ else if (srv_max_dirty_pages_pct_lwm != 0.0)
+ {
+ if (dirty_pct < srv_max_dirty_pages_pct_lwm)
+ goto unemployed;
+ }
else if (dirty_pct < srv_max_buf_pool_modified_pct)
goto unemployed;
- else if (srv_max_dirty_pages_pct_lwm == 0.0 ||
- dirty_pct < srv_max_dirty_pages_pct_lwm)
- goto unemployed;
const lsn_t oldest_lsn= buf_pool.get_oldest_modified()
Now, how to avoid the unwanted goto unemployed if the above fix is not present? It looks like the only way to do this could be setting the two parameters to the same value. But, because the value innodb_max_dirty_pages_pct_lwm=0 is special (
MDEV-24537), we should use a value close to it if the aim is to have the buffer pool flushed:As far as I can, tell this bug makes the parameter innodb_max_dirty_pages_pct_lwm basically useless and prevents the adaptive flushing from working.