Skip to content

Commit 46df73f

Browse files
committed
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 <[email protected]>
1 parent 0e5e1aa commit 46df73f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/osd/ECTransaction.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ ECTransaction::WritePlanObj::WritePlanObj(
220220
// Some kind of reconstruct is needed for conventional, but NOT for PDW!
221221
do_parity_delta_write = true;
222222
} else {
223-
/* Everything we need for both is available, opt for which ever is less
224-
* reads.
223+
/* Everything we need for both is available, opt for whichever is fewer
224+
* reads. Choose PDW in a tie as it's slightly more performant at random I/O.
225225
*/
226-
do_parity_delta_write = pdw_read_shards.size() < read_shards.size();
226+
do_parity_delta_write = pdw_read_shards.size() <= read_shards.size();
227227
}
228228

229229
if (do_parity_delta_write) {

0 commit comments

Comments
 (0)