This benchmark show’s the performance of a zfs pool
providing storage to a kvm virtual machine with three different formats:
raw image files on plain dataset
qcow2 image file on plain dataset
zvol
For each of those several filesystem benchmarks from the phoronix-benchmark-suite are run with two different recordsizes:
8k
64k
Host Details:
cpu: Intel® Xeon® CPU E5320 @ 1.86GHz
ram: 6GB DDR2
sata: Intel Corporation 631xESB/632xESB SATA AHCI Controller (rev 09
os: Debian GNU/Linux 9.4 (stretch), fully upgraded as of 2018-03-15
zfs: 0.7.6-1~bpo9+1 (from stretch-backports)
ssd: 2x samsung 840 pro 256GB
KVM machine:
cpu: host
ram: 1024MB
disk: bus=scsi,cache=writeback,io=threads
os: Debian GNU/Linux 9.1 (stretch)
fs: ext4
The zfs pool used consists of a single mirrored vdev with samsung 840 pro ssd’s.
Each benchmark is run like this:
drop all caches
trim whole ssd’s
create zfs pool (ashift=13,compression=lz4,atime=on,relatime=on
benchmark,devices=off,exec=off,setuid=off,xattr=off)
create disk:
qemu-img create -f raw debian9.raw 50G
qemu-img create -f qcow2 -o cluster_size=8k,preallocation=metadata,compat=1.1,lazy_refcounts=on debian9.qcow2 50G
zfs create -o volblocksize=8k -V 50G benchmark/kvm/debian9
create kvm machine
take timestamp
let debian9 install automatically
save install time
install phoronix-test-suite and needed dependencies in the vm
run the pts
trim the filesystem and save the time it took
copy the results to the kvm host
destroy vm and zpool
other test results:
8k_raw - install time: 619s, trim: 39.401s
64k raw - install time: 589s, trim: 0m9.593s
8k qcow2 - install time: 615s, trim: 1m45.421s
64k qcow2 - install time: 590s, trim: 0m7.598s
8k zvol - install time: 621s, trim: 0m11.353s
64k zvol - install time: 605s