From cdf6d3ec047d3094e6c0d7bbd87cc70ddd349782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 26 Mar 2014 15:17:12 +0200 Subject: [PATCH] MDEV-5949: Performance of XtraDB slows down significantly on long benchmarks when compressed tables are used. Analysis: Number of flushed pages is incorrectly calculated at buf_do_LRU_batch. This leads to problem when utility function flushes dirty blocks from the end of the flush list of all buffer pool instances in a loop until enough pages are flushed or time limit is reached. As number of flushed pages is incorrectly calculated, the loop mostly try to flush until time limit is reached because the number of pages limit is not reached. Fix: Fix the calculation of flushed pages (very short). This fix was provided by Alexey Stroganov (Percona). --- storage/xtradb/buf/buf0flu.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/xtradb/buf/buf0flu.cc b/storage/xtradb/buf/buf0flu.cc index abcee504d2e..a7f55eb9c79 100644 --- a/storage/xtradb/buf/buf0flu.cc +++ b/storage/xtradb/buf/buf0flu.cc @@ -1656,7 +1656,7 @@ buf_do_LRU_batch( n->flushed = 0; } - n->evicted += count; + n->flushed += count; } /*******************************************************************//**