From c2d933361e5e288e13b952dde3a85fe057566f43 Mon Sep 17 00:00:00 2001 From: Haomai Wang Date: Mon, 8 Dec 2014 11:41:54 +0800 Subject: [PATCH] WBThrottle: make bytes/ios/inode_wb's perf counter effective Since sync thread will cause unstable iops and latency performance curve, we may want make WBThread do more(or moderate?) writeback and avoid sync thread flush too much which will cause journal io long tail. Via these counters, we can view how much object or bytes are write backed by WBThread and how much bytes are flushed . Then we can have a great tuning for "*bytes_start_flusher", "*ios_start_flusher" and "*inodes_start_flusher". What we want to see is that in-memory data can writeback into disk with a moderate rate. Signed-off-by: Haomai Wang --- src/os/WBThrottle.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/os/WBThrottle.cc b/src/os/WBThrottle.cc index 7d0bcf6f45f21..27a23001794e2 100644 --- a/src/os/WBThrottle.cc +++ b/src/os/WBThrottle.cc @@ -175,9 +175,12 @@ void *WBThrottle::entry() clearing = ghobject_t(); cur_ios -= wb.get<2>().ios; logger->dec(l_wbthrottle_ios_dirtied, wb.get<2>().ios); + logger->inc(l_wbthrottle_ios_wb, wb.get<2>().ios); cur_size -= wb.get<2>().size; logger->dec(l_wbthrottle_bytes_dirtied, wb.get<2>().size); + logger->inc(l_wbthrottle_bytes_wb, wb.get<2>().size); logger->dec(l_wbthrottle_inodes_dirtied); + logger->inc(l_wbthrottle_inodes_wb); cond.Signal(); wb = boost::tuple(); } -- 2.47.3