How to speed up slow zpool scrub?

Miroslav Lachman 000.fbsd at quip.cz
Thu Apr 28 07:52:49 UTC 2016


Steven Hartland wrote on 04/27/2016 22:45:
>
>
> On 27/04/2016 21:20, Adam Nowacki wrote:

[...]

>>>> 2) some data blocks do not span all disks (metadata, small files,
>>>> compression)
>>>> End result is that zfs can't always read from all disks during scrub so
>>>> disk utilization is going to be less than 100% even when going at full
>>>> speed.
>>> Thank you for the explanation.
>> Try increasing vfs.zfs.top_maxinflight to 100 or more.
>>
> If your on a recent version vfs.zfs.vdev.scrub_max_active is usually the
> most pertinent change to make.

Thank you to both of you. It seems that vfs.zfs.top_maxinflight=128 did 
higher disk utilization (about 90%).

Scrubbing is over after 4 days so I will play with these sysctls next time

# zpool status -v tank0
   pool: tank0
  state: ONLINE
   scan: scrub repaired 0 in 96h27m with 0 errors on Thu Apr 28 03:29:21 
2016
config:

         NAME                STATE     READ WRITE CKSUM
         tank0               ONLINE       0     0     0
           raidz1-0          ONLINE       0     0     0
             gpt/disk0tank0  ONLINE       0     0     0
             gpt/disk1tank0  ONLINE       0     0     0
             gpt/disk2tank0  ONLINE       0     0     0
             gpt/disk3tank0  ONLINE       0     0     0

errors: No known data errors

Thank you!

Miroslav Lachman



More information about the freebsd-fs mailing list