From 251658471eab6d8cd968d678922bab437f72a9c7 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 19 Oct 2017 13:52:56 -0400 Subject: [PATCH] librbd: default to sparse-reads for any IO operation over 64K Testing BlueStore against both HDDs and OSDs with fully allocated and sparse-allocated objects shows a performance improvement with sparse-read between 32K and 64K. Fixes: http://tracker.ceph.com/issues/21849 Signed-off-by: Jason Dillaman --- src/common/options.cc | 12 ++ src/librbd/ImageCtx.cc | 6 + src/librbd/ImageCtx.h | 1 + src/librbd/io/ImageRequest.cc | 2 +- src/librbd/io/ObjectRequest.cc | 9 +- src/librbd/io/ObjectRequest.h | 10 +- src/test/librbd/CMakeLists.txt | 1 + src/test/librbd/io/test_mock_ImageRequest.cc | 3 +- src/test/librbd/io/test_mock_ObjectRequest.cc | 189 ++++++++++++++++++ 9 files changed, 219 insertions(+), 14 deletions(-) create mode 100644 src/test/librbd/io/test_mock_ObjectRequest.cc diff --git a/src/common/options.cc b/src/common/options.cc index dc37ad48a22ba..612a1f07ab6d5 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -5257,6 +5257,18 @@ static std::vector