Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.6.16, 10.11.6, 10.6.17, 10.11.7, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4
Description
steve.shaw@intel.com noticed a significant performance regression on a single CPU socket server between 10.11.6 and 10.11.7. An initial suspect was MDEV-33053, but it turns out that a piece of code that had been added in a fix of MDEV-32029 is to blame. Removing that code would fix the regression:
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc
|
index 80b83f6a68f..fd92756cd29 100644
|
--- a/storage/innobase/buf/buf0flu.cc
|
+++ b/storage/innobase/buf/buf0flu.cc
|
@@ -2433,16 +2433,6 @@ static void buf_flush_page_cleaner()
|
{
|
buf_pool.page_cleaner_set_idle(false);
|
buf_pool.n_flush_inc();
|
- /* Remove clean blocks from buf_pool.flush_list before the LRU scan. */
|
- for (buf_page_t *p= UT_LIST_GET_FIRST(buf_pool.flush_list); p; )
|
- {
|
- const lsn_t lsn{p->oldest_modification()};
|
- ut_ad(lsn > 2 || lsn == 1);
|
- buf_page_t *n= UT_LIST_GET_NEXT(list, p);
|
- if (lsn <= 1)
|
- buf_pool.delete_from_flush_list(p);
|
- p= n;
|
- }
|
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
|
n= srv_max_io_capacity;
|
mysql_mutex_lock(&buf_pool.mutex); |
This code would seem to be unnecessary for the actual MDEV-32029 fix. It was added because server freezes had been observed around the time the MDEV-32029 fix was tested. Indeed, without this code it was possible that buf_flush_LRU_list_batch() did not make any progress when all the blocks that it traversed in the buf_pool.LRU list had oldest_modification()==1, that is, the blocks are actually clean and should be removed from buf_pool.flush_list.
It looks like the above code removal should have been part of MDEV-32588, which changed buf_flush_LRU_list_batch() so that it will try harder to remove such clean pages.
After the fix of MDEV-33053, the page cleaner thread would keep working if buf_pool.need_LRU_eviction() holds. This is what made the redundant loop more noticeable.
Attachments
Issue Links
- is caused by
-
MDEV-32029 Assertion failures in log_sort_flush_list upon crash recovery
-
- Closed
-
-
MDEV-33053 InnoDB LRU flushing does not run before running out of buffer pool
-
- Closed
-
- relates to
-
MDEV-32588 InnoDB may hang when running out of buffer pool
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue is caused by |
Status | Open [ 1 ] | In Progress [ 3 ] |
Link |
This issue relates to |
Link |
This issue is caused by |
Assignee | Marko Mäkelä [ marko ] | Debarun Banerjee [ JIRAUSER54513 ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Testing [ 10301 ] |
Assignee | Debarun Banerjee [ JIRAUSER54513 ] | Matthias Leich [ mleich ] |
Link | This issue relates to TODO-4490 [ TODO-4490 ] |
Link | This issue blocks MENT-2051 [ MENT-2051 ] |
Assignee | Matthias Leich [ mleich ] | Marko Mäkelä [ marko ] |
Status | In Testing [ 10301 ] | Stalled [ 10000 ] |
issue.field.resolutiondate | 2024-02-28 11:48:07.0 | 2024-02-28 11:48:07.332 |
Fix Version/s | 10.6.18 [ 29627 ] | |
Fix Version/s | 10.11.8 [ 29630 ] | |
Fix Version/s | 11.0.6 [ 29628 ] | |
Fix Version/s | 11.1.5 [ 29629 ] | |
Fix Version/s | 11.2.4 [ 29631 ] | |
Fix Version/s | 11.4.2 [ 29633 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.11 [ 27614 ] | |
Fix Version/s | 11.0 [ 28320 ] | |
Fix Version/s | 11.1 [ 28549 ] | |
Fix Version/s | 11.2 [ 28603 ] | |
Fix Version/s | 11.4 [ 29301 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Zendesk Related Tickets | 201921 | |
Zendesk active tickets | 201921 |
Zendesk Related Tickets | 201921 | 201921 202654 |
Zendesk active tickets | 201921 | 201921 202654 |
Zendesk active tickets | 201921 202654 | 202654 |
Zendesk active tickets | 202654 | 202654 201921 |
I think that it is correct to claim that regression this is also caused by
MDEV-33053, because that change enables buf_flush_page_cleaner() to run continuously when the buffer pool is about to run out.