mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Change checksum & IO delay ratelimit values
Change checksum & IO delay ratelimit thresholds from 5/sec to 20/sec. This allows zed to actually trigger if a bunch of these events arrive in a short period of time (zed has a threshold of 10 events in 10 sec). Previously, if you had, say, 100 checksum errors in 1 sec, it would get ratelimited to 5/sec which wouldn't trigger zed to fault the drive. Also, convert the checksum and IO delay thresholds to module params for easy testing. Reviewed-by: loli10K <ezomori.nozomu@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #7252
This commit is contained in:
committed by
Brian Behlendorf
parent
5666a994f2
commit
80d52c3919
+21
-2
@@ -56,6 +56,16 @@
|
||||
*/
|
||||
int metaslabs_per_vdev = 200;
|
||||
|
||||
/*
|
||||
* Rate limit delay events to this many IO delays per second.
|
||||
*/
|
||||
unsigned int zfs_delays_per_second = 20;
|
||||
|
||||
/*
|
||||
* Rate limit checksum events after this many checksum errors per second.
|
||||
*/
|
||||
unsigned int zfs_checksums_per_second = 20;
|
||||
|
||||
/*
|
||||
* Virtual device management.
|
||||
*/
|
||||
@@ -351,8 +361,8 @@ vdev_alloc_common(spa_t *spa, uint_t id, uint64_t guid, vdev_ops_t *ops)
|
||||
* and checksum events so that we don't overwhelm ZED with thousands
|
||||
* of events when a disk is acting up.
|
||||
*/
|
||||
zfs_ratelimit_init(&vd->vdev_delay_rl, DELAYS_PER_SECOND, 1);
|
||||
zfs_ratelimit_init(&vd->vdev_checksum_rl, CHECKSUMS_PER_SECOND, 1);
|
||||
zfs_ratelimit_init(&vd->vdev_delay_rl, &zfs_delays_per_second, 1);
|
||||
zfs_ratelimit_init(&vd->vdev_checksum_rl, &zfs_checksums_per_second, 1);
|
||||
|
||||
list_link_init(&vd->vdev_config_dirty_node);
|
||||
list_link_init(&vd->vdev_state_dirty_node);
|
||||
@@ -3752,5 +3762,14 @@ module_param(metaslabs_per_vdev, int, 0644);
|
||||
MODULE_PARM_DESC(metaslabs_per_vdev,
|
||||
"Divide added vdev into approximately (but no more than) this number "
|
||||
"of metaslabs");
|
||||
|
||||
module_param(zfs_delays_per_second, uint, 0644);
|
||||
MODULE_PARM_DESC(zfs_delays_per_second, "Rate limit delay events to this many "
|
||||
"IO delays per second");
|
||||
|
||||
module_param(zfs_checksums_per_second, uint, 0644);
|
||||
MODULE_PARM_DESC(zfs_checksums_per_second, "Rate limit checksum events "
|
||||
"to this many checksum errors per second (do not set below zed"
|
||||
"threshold).");
|
||||
/* END CSTYLED */
|
||||
#endif
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
* interval: Interval time in seconds
|
||||
*/
|
||||
void
|
||||
zfs_ratelimit_init(zfs_ratelimit_t *rl, unsigned int burst,
|
||||
zfs_ratelimit_init(zfs_ratelimit_t *rl, unsigned int *burst,
|
||||
unsigned int interval)
|
||||
{
|
||||
rl->count = 0;
|
||||
@@ -89,7 +89,7 @@ zfs_ratelimit(zfs_ratelimit_t *rl)
|
||||
rl->start = now;
|
||||
rl->count = 0;
|
||||
} else {
|
||||
if (rl->count >= rl->burst) {
|
||||
if (rl->count >= *rl->burst) {
|
||||
error = 0; /* We're ratelimiting */
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user