Percona Server with XtraDB

"buf_flush_LRU is lazy" | buf_flush_common() calls buf_dblwr_flush_buffered_writes() even when no pages flushed

Reported by Laurynas Biveinis on 2013-09-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server
Status tracked in 5.6
5.1
Undecided
Unassigned
5.5
Undecided
Unassigned
5.6
Wishlist
Laurynas Biveinis

Bug Description

This is a copy of http://bugs.mysql.com/bug.php?id=69170, namely the reported issue

"1) buf_flush_common always calls buf_dblwr_flush_buffered_writes. Shouldn't this only be done when page_count > 0?"

which later the bug was kept open about, and

[27 Sep 10:15] Laurynas Biveinis

Re. Mark's problem 1), merely skipping buf_dblwr_flush_buffered_writes() if page_count == 0 will be only a partial fix in the presence of compressed pages for LRU flushes, because this value will originate from buf_do_LRU_batch():

 if (buf_LRU_evict_from_unzip_LRU(buf_pool)) {
  count += buf_free_from_unzip_LRU_list_batch(buf_pool, max);
 }

 if (max > count) {
  count += buf_flush_LRU_list_batch(buf_pool, max - count);
 }

Notice a mixup of evicted and flushed pages. In the case we will satisfy this LRU flush batch purely by unzip_LRU eviction and no flushing, we will still get page_count > 0 in buf_flush_common().

We are exploring a fix here and elsewhere of replacing single value counters with two-field structs for flushed and evicted pages.

Related branches

tags: added: innodb
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.