This script allows you to benchmark resilver performance of various Zpool / VDEV configurations.
This is how the script works:
- Create pool + vdev(s).
- Write data on pool.
- Replace arbitrary drive with another one.
- Wait for resilver to complete.
- Grab resilver duration and log to csv file.
The script takes one argument that specifies the file name containing the names of the hard drive devices, one per line. An example file called 'zfs-devices.txt' is added to this repro.
You need to edit the script and alter the 'main' function to ajust for the types of test you want to run. You can comment out the VDEV types (Mirror/RAID-Z) you don't want to run.
bench.poolname = 'pool' bench.vdev['mirror'] =  bench.vdev['mirrorvdevs'] =  bench.vdev['mirrorvdevs'] = [1,2,3,4,5] bench.vdev['raidz'] = [3,4,5,9] bench.vdev['raidzvdevs'] =  bench.vdev['raidz2'] =  bench.vdev['raidz2vdevs'] =  #bench.vdev['raidz3'] = [5,7,11] #bench.vdev['raidz3vdevs'] =  bench.data = 50 # % of pool size
When you put the csv data in Excel or something similar you get results like: