Commit e0814150 authored by Marko Mäkelä's avatar Marko Mäkelä Committed by Sergei Golubchik

MDEV-23410 buf_LRU_scan_and_free_block() fails to stop at first freed block

An unfortunate performance regression was introduced in
commit b1ab211d (MDEV-15053)
that affects workloads where the working set is larger than
the buffer pool.

We used to terminate the loop in buf_LRU_scan_and_free_block()
when we succeeded to free a replaceable buffer pool block.
Due to the regression, we would keep freeing all replaceable
blocks until we reach the end of the list or encounter a block
that had never been accessed because it had been brought in
by read-ahead.
parent 72f677d3
......@@ -570,8 +570,9 @@ static bool buf_LRU_free_from_common_LRU_list(bool scan_all)
ever being accessed. This gives us a measure of
the effectiveness of readahead */
++buf_pool.stat.n_ra_pages_evicted;
break;
}
break;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment