From: Jamie Pryde Date: Thu, 4 Sep 2025 10:52:53 +0000 (+0100) Subject: osd: Choose PDW over traditional RMW if number of reads required is equal X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=46df73f20f02dc487aa41817b7d1da16662d89c9;p=ceph.git osd: Choose PDW over traditional RMW if number of reads required is equal We currently only choose to do a parity delta write if the number of reads required is fewer than for a traditional read modify write. Performance testing shows a small benefit to doing PDW for random I/O workloads when the number of reads is the same. Signed-off-by: Jamie Pryde --- diff --git a/src/osd/ECTransaction.cc b/src/osd/ECTransaction.cc index 4785e661314..177e703ad91 100644 --- a/src/osd/ECTransaction.cc +++ b/src/osd/ECTransaction.cc @@ -220,10 +220,10 @@ ECTransaction::WritePlanObj::WritePlanObj( // Some kind of reconstruct is needed for conventional, but NOT for PDW! do_parity_delta_write = true; } else { - /* Everything we need for both is available, opt for which ever is less - * reads. + /* Everything we need for both is available, opt for whichever is fewer + * reads. Choose PDW in a tie as it's slightly more performant at random I/O. */ - do_parity_delta_write = pdw_read_shards.size() < read_shards.size(); + do_parity_delta_write = pdw_read_shards.size() <= read_shards.size(); } if (do_parity_delta_write) {