]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Choose PDW over traditional RMW if number of reads required is equal 65388/head
authorJamie Pryde <jamiepry@uk.ibm.com>
Thu, 4 Sep 2025 10:52:53 +0000 (11:52 +0100)
committerJamie Pryde <jamiepry@uk.ibm.com>
Thu, 4 Sep 2025 11:06:42 +0000 (12:06 +0100)
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 <jamiepry@uk.ibm.com>
src/osd/ECTransaction.cc

index 4785e661314c90cd2b41581da716f809038c667d..177e703ad9187e484d18c2cad3cb5d51c2df44c1 100644 (file)
@@ -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) {