From: myoungwon oh Date: Fri, 18 Jul 2025 21:54:31 +0000 (+0000) Subject: crimson/os/seastore/rbm: improve large sequential write by issuing writes in parallel X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F64585%2Fhead;p=ceph.git crimson/os/seastore/rbm: improve large sequential write by issuing writes in parallel In large chunk workload, for instance, when 4MB data is divided into 64KB chunks, the current implementation writes sequentially one by one. On general NVMe SSD writing large chunk (>=64KB) can lead to relatively higher latency compared to a small write case, resulting in performance degradation. Although NVMe SSD shows the increased latency in such cases, this does not mean that thay reach their performance limit, as they can handle multiple concurrent requests. This commit improves parallelism by using parallel_for_each() to issue writes in parallel. Signed-off-by: Myoungwon Oh --- diff --git a/src/crimson/os/seastore/extent_placement_manager.cc b/src/crimson/os/seastore/extent_placement_manager.cc index fd19eeb7e58e..19ff6587c3db 100644 --- a/src/crimson/os/seastore/extent_placement_manager.cc +++ b/src/crimson/os/seastore/extent_placement_manager.cc @@ -3,6 +3,7 @@ #include "crimson/os/seastore/extent_placement_manager.h" +#include "crimson/common/errorator-loop.h" #include "crimson/common/config_proxy.h" #include "crimson/os/seastore/logging.h" @@ -1097,7 +1098,7 @@ RandomBlockOolWriter::do_write( stats.num_records += writes.size(); auto& trans_stats = get_by_src(w_stats.stats_by_src, t.get_src()); trans_stats.num_records += writes.size(); - return crimson::do_for_each(writes, + return alloc_write_ertr::parallel_for_each(writes, [](auto& info) { return info.rbm->write(info.offset, info.bp ).handle_error(