Solved my ZFS scrub problems.


Renowned Member
it seems that a "new" sequential scrub algorithm for ZFS is causing head aches on some of our Nested systems.

The "new" metadata scan reads through the structure of the pool and gathers an in-memory queue of I/Os, sorted by size and offset on disk. The issuing phase will then issue the scrub I/Os as sequentially as possible, greatly improving performance.

what happens if the in-memory queue of I/O does not find enough RAM available?

The problem re-appeared as soon as I re-enabled both scrub prefetch and the new algorithm together.

New Code:
vfs.zfs.zfs_scan_legacy 0
vfs.zfs.no_scrub_prefetch 1

Old Code:
vfs.zfs.zfs_scan_legacy 1
vfs.zfs.no_scrub_prefetch 0

If you are experiencing extreme system slownes during (virtual) disk scrub you might want to test if the "old code" will work for you.


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!