Crude Standardised ZFS compression test, with repeatable results in mind
- Make sure you do not have zfs installed already via other means
- This assumes a clean install with sudo, unzip, wget and git installed
- The enwik9 dataset gets downloaded just once, don;t worry about the time it takes
- This script makes sure the build/test environment is as prestine as possible before and after running
- This script uses a ramdisk as source and (pool) destination for writes tests to asure clean and unbottlenecked results
- Install all dependancies as described here: https://github.com/zfsonlinux/zfs/wiki/Building-ZFS#installing-dependencies
- make sure fio is installed (ex.
apt-get install fio
) - Run:
git clone https://github.com/Ornias1993/zfs-compression-test
- Run:
cd zfs-compression-test
- Clone the branch/repo containing ZoL (ex.
git clone https://github.com/zfsonlinux/zfs
)
By now you'll have all dependencies and you'll have a clean git clone in zfs-compression-test/zfs
- Make sure you cd into the zfs-compression-test directory
- run: sudo ./comp-test.sh with one of the options (ex. sudo
./comp-test.sh -i -b -r
)
Compression Tests
- -b A basic test of only the following algorithms: off lz4 zle lzjb gzip zstd
- -f A full test of all compression algorithms available for ZFS
- -c A Custom test with only the argument algorithm
- -t Select a different compression test file. Options:
enwik9
andmpeg4
- -p Enter a different prefix for the test results
Other
- -i Builds and installs the ZFS testing environment (before running tests)
- -r Completely removes the ZFS testing environment (after running tests)
- -S Use system ZFS environment
- -s Enter custom storagepool-devices. (i.e. ./comp-test.sh -s "raidz1 /dev/disk1 /dev/disk2 /dev/disk3")
- -P Use existing ZFS Pool for the tests
- -F Size of files used in the 'fio' tests (if you benchmark on real block devices, this should be larger than your RAM)
- -R ZFS recordsize used by all tests (by default, random io tests use 8k, squential io tests use 1M recordsize)
- -h Displays a help page, which includes a reference to the different commands
When finished you'll have a .txt file in the zfs-compression-test directory, containing the test results
- Add custom ram setting
- Automatic run of tests and zloop
- Combinations of Tests, Zloop and Compression
- Input sanitsaion
This work is dual licenced under GPLv2 and BSD-2 clause