mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 10:54:35 +03:00
Detect a slow raidz child during reads
A single slow responding disk can affect the overall read performance of a raidz group. When a raidz child disk is determined to be a persistent slow outlier, then have it sit out during reads for a period of time. The raidz group can use parity to reconstruct the data that was skipped. Each time a slow disk is placed into a sit out period, its `vdev_stat.vs_slow_ios count` is incremented and a zevent class `ereport.fs.zfs.delay` is posted. The length of the sit out period can be changed using the `raid_read_sit_out_secs` module parameter. Setting it to zero disables slow outlier detection. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Contributions-by: Don Brady <don.brady@klarasystems.com> Contributions-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #17227
This commit is contained in:
committed by
Brian Behlendorf
parent
0620c979a5
commit
d64711c202
@@ -22,6 +22,7 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Intel Corporation.
|
||||
* Copyright (c) 2020 by Lawrence Livermore National Security, LLC.
|
||||
* Copyright (c) 2025, Klara, Inc.
|
||||
*/
|
||||
|
||||
#include <sys/zfs_context.h>
|
||||
@@ -1996,6 +1997,33 @@ vdev_draid_io_start_read(zio_t *zio, raidz_row_t *rr)
|
||||
rc->rc_allow_repair = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (vdev_sit_out_reads(cvd, zio->io_flags)) {
|
||||
rr->rr_outlier_cnt++;
|
||||
ASSERT0(rc->rc_latency_outlier);
|
||||
rc->rc_latency_outlier = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* When the row contains a latency outlier and sufficient parity
|
||||
* exists to reconstruct the column data, then skip reading the
|
||||
* known slow child vdev as a performance optimization.
|
||||
*/
|
||||
if (rr->rr_outlier_cnt > 0 &&
|
||||
(rr->rr_firstdatacol - rr->rr_missingparity) >=
|
||||
(rr->rr_missingdata + 1)) {
|
||||
|
||||
for (int c = rr->rr_cols - 1; c >= rr->rr_firstdatacol; c--) {
|
||||
raidz_col_t *rc = &rr->rr_col[c];
|
||||
|
||||
if (rc->rc_error == 0 && rc->rc_latency_outlier) {
|
||||
rr->rr_missingdata++;
|
||||
rc->rc_error = SET_ERROR(EAGAIN);
|
||||
rc->rc_skipped = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user