From c1c43110ef683b7a1f8dbb7136ad44b31943fe5a 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 (cherry picked from commit 251658471eab6d8cd968d678922bab437f72a9c7) --- 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 0469939ab737..00720d5c6031 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -5658,6 +5658,18 @@ static std::vector