From: Haomai Wang Date: Mon, 8 Dec 2014 03:41:54 +0000 (+0800) Subject: WBThrottle: make bytes/ios/inode_wb's perf counter effective X-Git-Tag: v0.91~40^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c2d933361e5e288e13b952dde3a85fe057566f43;p=ceph.git 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 --- diff --git a/src/os/WBThrottle.cc b/src/os/WBThrottle.cc index 7d0bcf6f45f2..27a23001794e 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(); }