Alan Somers wrote on 2019/05/09 14:50:
[...]
On 11.3 and even much older releases, you can greatly speed up scrub
and resilver by tweaking some sysctls. If you have spinning rust,
raise vfs.zfs.top_maxinflight so they'll do fewer seeks. I used to
set it to 8192 on machines with 32GB of RAM. Raising
vfs.zfs.resilver_min_time_ms to 5000 helps a little, too.
I have this in sysctl.conf
vfs.zfs.scrub_delay=0
vfs.zfs.top_maxinflight=128
vfs.zfs.resilver_min_time_ms=5000
vfs.zfs.resilver_delay=0
I found it somewhere in the mailinglist discussing this issue in the past.
Isn't yours 8192 too much? The machine in question has 4x SATA drives on
very dump and slow controller and only 5GB of RAM.
Even if I read this
vfs.zfs.top_maxinflight: Maximum I/Os per top-level vdev
I am still not sure what it really means and how I can "calculate"
optimal value.
As Michelle pointed there is drawback when sysctls are optimized for
quick scrub, but this machines is only running nightly backup script
fetching data from other 20 machines so this scrip sets sysctl back to
sane defaults during backup
sysctl vfs.zfs.scrub_delay=4 > /dev/null
sysctl vfs.zfs.top_maxinflight=32 > /dev/null
sysctl vfs.zfs.resilver_min_time_ms=3000 > /dev/null
sysctl vfs.zfs.resilver_delay=2 > /dev/null
At the and it reloads back optimized settings from sysctel.conf
Miroslav Lachman
_______________________________________________
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"