]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore/BlueRocksEnv: Avoid flushing too much data at once.
authorJianpeng Ma <jianpeng.ma@intel.com>
Mon, 10 Aug 2020 07:56:13 +0000 (15:56 +0800)
committerIgor Fedotov <ifedotov@suse.com>
Thu, 25 Feb 2021 10:52:34 +0000 (13:52 +0300)
commit0de64149a08bf23a20688dc093bc56c8b17b4887
treeb45681e1798cf64ef19ba9af4f61beb90dadec3c
parent997f1b84b3e74ed23746d3632bf2b9f0e3f93951
os/bluestore/BlueRocksEnv: Avoid flushing too much data at once.

Although, in _flush func we already check length. If length of dirty
is less then bluefs_min_flush_size, we will skip this flush.
But in fact, we found rocksdb can call many times Append() and then
call Flush(). This make flush_data is much larger than
bluefs_min_flush_size.

From my test, w/o this patch, it can reduce 99.99% latency(from
145.753ms to 20.474ms) for 4k randwrite with bluefs_buffered_io=true.

Because Bluefs::flush acquire lock. So we add new api try_flush
to avoid lock contention.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
(cherry picked from commit 3a1d4ff6dcdcd897d31a85ef82c726599624b66d)
src/os/bluestore/BlueFS.h
src/os/bluestore/BlueRocksEnv.cc