Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-2430

LP #1231918: "buf_flush_LRU is lazy" | buf_flush_common() calls buf_dblwr_flush_buffered_writes() even when no pages flushed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      **Reported in Launchpad by Laurynas Biveinis last update 23-01-2014 09:35:06

      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.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            lpjirasync lpjirasync (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Smart Checklist