Repository navigation
os/bluestore: support RocksDB prefetch in buffered read mode - #27782
Conversation
|
And here are some hit/miss/disk access statistics for both RocksDB prefetch and my Read-Ahead. Unfortunately they aren't directly comparable. Master branch + RocksDB prefetch and backed by this PR: Master branch + my Read-Ahead implementation |
/a/sage-2019-05-02_21:28:34-rados-wip-sage-testing-2019-05-02-0940-distro-basic-smithi/3919397 there were a couple other bulestore changes in the batch, but i'm guessing it's this one |
Signed-off-by: Igor Fedotov <[email protected]>
Performed if debug mode is enabled Signed-off-by: Igor Fedotov <[email protected]>
So one can use perf counters during log replay. Signed-off-by: Igor Fedotov <[email protected]>
Signed-off-by: Igor Fedotov <[email protected]>
Signed-off-by: Igor Fedotov <[email protected]>
c82cdee to
4f89409
Compare
Now this buffer might be accessed from BlueRocksRandomAccessFile which is intended for multi-threading access. Hence we need a proper protection for the buffer. Signed-off-by: Igor Fedotov <[email protected]>
|
@liewegas - I think it lacked multi-threading protection as BlueRocksRandomAccessFile might be used this way. Added another commit to fix that, please take a look. |
* refs/pull/27782/head: os/bluestore: protect BlueFS::FileReader::buf os/bluestore: log 'buffered' in KernelDevice::read_random os/bluestore: support RocksDB prefetching at BlueFS os/bluestore: call BlueFS::_init_logger earlier. tools/ceph-objectstore-tool: dump perf counters on competion. os/bluestore: optimize mapping offset to extent in BlueFS. Reviewed-by: Sage Weil <[email protected]>
RocksDB needs Prefetch method implementation in BlueRocksEnv class to perform read ahead for buffered reads (i.e. when use_direct_reads = false).
The regular call sequence from RocksDB to perform read-ahead is:
Prefetch()
Read (random)
Read (random)
Read (random)
Prefetch()
Read (random)
...
Implementing Prefetch via BlueFS::_read call to propagate reader's buffer.
And extend BlueFS::_read_random to use this buffer.
Here are some statistics showing the improvement. The following command has been executed using the same store but different code base. This store contains known-to-cause-slow-omap-enumeration object:
ceph-objectstore-tool --data-path /mnt/ceph --pgid 7.24 10000609512.00000000 list-omap --no-mon-config
Original luminous HEAD:
Total execution time: 99 seconds
Luminous + my Read-Ahead implementations (see #24861):
Total execution time: 33 seconds
Master branch (as of May 2 2019):
Total execution time: 54 seconds
Embedded slow op detector (which is pure listing duration without tool startup overhead): 46 seconds
Master branch + my Read-Ahead implementation ( #24861):
Total execution time: 30 seconds
Embedded slow op detector: 22 seconds
Master branch + RocksDB prefetch and backed by this PR:
Total execution time: 32 seconds
Embedded slow op detector: 22 seconds
Improves: http://tracker.ceph.com/issues/36482
Signed-off-by: Igor Fedotov [email protected]