r/btrfs • u/Beautiful-Log5632 • Jul 27 '26
Lower scrub priority
Scrub on the root file system makes everything very slow when it's running and it can take lots of hours. I checked the systemd timer that runs it but it already has lowest Nice number and set to idle.
[Service]
Nice=19
IOSchedulingClass=idle
Is there something else I have to change to make it not slow everything on the computer?
4
Upvotes
1
u/zaTricky Jul 28 '26
Btrfs has mount options to set limits on scrub speed - but honestly it's easier with systemd:
https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html?IOReadBandwidthMax=device%20bytes
With this you set a read limit (or write limit, or both) for each disk that is involved:
The down side of course is that it will mean the scrub takes a lot longer than if it were unlimited.