From 8cc59e6a1f2af778f526e45d74a8dfc6a0f980ea Mon Sep 17 00:00:00 2001 From: myoungwon oh Date: Fri, 18 Jul 2025 21:54:31 +0000 Subject: [PATCH] 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 --- src/crimson/os/seastore/extent_placement_manager.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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( -- 2.47.3