Terry Wilson
Explorer
- Joined
- Aug 10, 2016
- Messages
- 63
AKA How to speed up the process of tuning of your Freenas box. This one is for 9.10 - FreeNAS-9.10.2-U2
Before I begin let me get the standard disclaimers out of the way, Try at your own risk, backup first, this may cause the moon to fall from the sky and make Trump and Hillary besties....
Credit needs to be given to Shawn Webb the purported creator of this code.
So there are 4 lines of code that we want to change to potentially decrease the amount of time it takes to scrub and or resilver. In my case on a 6 disc vdev running z2 in my pool (before this tuning) it would take 28 hours to scrub, after these settings it went down to 15 hours, that's almost 2x faster !
So while you can do this from the command line its frowned upon by the forum, the developers, etc.. so I am just going to cover this approach from the gui.
What we need to do is logon, head over to system and then choose Tunables:
Next we are going to choose Add Tunable
Note the Add Tunable box that pops up is where we are going go enter the following variables one at a time
vfs.zfs.scrub_delay=0
Note how I removed the = and told the Tunable diaglog box it was a Sysctl (as there are 3 values in the dropdown to choose from, were are just interested in Sysctl)
Click OK to add,
Now once again click Add Tunable and then put this one in:
vfs.zfs.top_maxinflight=128
Click OK to add, then once again click Add Tunable and then put this one in:
vfs.zfs.resilver_min_time_ms=5000
And Finally Click OK to add, then once again click Add Tunable and then put this one in:
vfs.zfs.resilver_delay=0
Now you are done, these values will be saved thru a reboot and you should see significant savings in time when you do your next Scrub!
Thanks and enjoy...
Terry
Before I begin let me get the standard disclaimers out of the way, Try at your own risk, backup first, this may cause the moon to fall from the sky and make Trump and Hillary besties....
Credit needs to be given to Shawn Webb the purported creator of this code.
So there are 4 lines of code that we want to change to potentially decrease the amount of time it takes to scrub and or resilver. In my case on a 6 disc vdev running z2 in my pool (before this tuning) it would take 28 hours to scrub, after these settings it went down to 15 hours, that's almost 2x faster !
So while you can do this from the command line its frowned upon by the forum, the developers, etc.. so I am just going to cover this approach from the gui.
What we need to do is logon, head over to system and then choose Tunables:
Next we are going to choose Add Tunable
Note the Add Tunable box that pops up is where we are going go enter the following variables one at a time
vfs.zfs.scrub_delay=0
Note how I removed the = and told the Tunable diaglog box it was a Sysctl (as there are 3 values in the dropdown to choose from, were are just interested in Sysctl)
Click OK to add,
Now once again click Add Tunable and then put this one in:
vfs.zfs.top_maxinflight=128
Click OK to add, then once again click Add Tunable and then put this one in:
vfs.zfs.resilver_min_time_ms=5000
And Finally Click OK to add, then once again click Add Tunable and then put this one in:
vfs.zfs.resilver_delay=0
Now you are done, these values will be saved thru a reboot and you should see significant savings in time when you do your next Scrub!
Thanks and enjoy...
Terry