]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/rbm: improve large sequential write by issuing writes in parallel 64585/head
authormyoungwon oh <ohmyoungwon@gmail.com>
Fri, 18 Jul 2025 21:54:31 +0000 (21:54 +0000)
committermyoungwon oh <ohmyoungwon@gmail.com>
Mon, 21 Jul 2025 07:38:06 +0000 (07:38 +0000)
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 <ohmyoungwon@gmail.com>
src/crimson/os/seastore/extent_placement_manager.cc

index fd19eeb7e58eb40434ac84571d92d57fa136a2cd..19ff6587c3dbfcb37f48167c2876ff5ce46ad77b 100644 (file)
@@ -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(