Situation:
- ZFS on NVME, 1GB/s nvme read speed
- ARC (in ram) size about 120GB - fully heated
pve-manager/8.1.4 (running kernel: 6.5.13-1-pve)
CPU: E5-2683 v4
This CPU has a very poor per-core performance. This leads to:
- Windows 10 VM, Virtio-SCSI Single, iothread, 128kb block, cache=none -> 80MB/s linear read speed (1 thread)
As I understand, QEMU talks directly to /dev/zvol/vm-1111-disk-0 when using "cache=none"
This should lead to the max speed from zfs ARC -> QEMU -> virtio-scsi. (ZVOL native read speeds are in the range of 300MB/s single thread)
Now here comes the funny part, setting cache=writeback, DOUBLES the read speed. To about 150MB/s or more.
You say the page cache helps?
I thought so, so I did cold boots, where the page cache is empty. Also tested this after flushing the page cache with: echo 3 > /proc/sys/vm/drop_caches
Still the same conclusion. Tested on a different hardware = still the same.
The speedup is very noticable inside VMs, especially windows guests on poor per-core cpus.
Even with all caches cold, pagecache and ARC, the speed is almost double.
Why would, introducing page cache between QEMU and ZFS zvol, increase speed? The data is already in the ARC cache in memory. It should actually decrease it.
- ZFS on NVME, 1GB/s nvme read speed
- ARC (in ram) size about 120GB - fully heated
pve-manager/8.1.4 (running kernel: 6.5.13-1-pve)
CPU: E5-2683 v4
This CPU has a very poor per-core performance. This leads to:
- Windows 10 VM, Virtio-SCSI Single, iothread, 128kb block, cache=none -> 80MB/s linear read speed (1 thread)
As I understand, QEMU talks directly to /dev/zvol/vm-1111-disk-0 when using "cache=none"
This should lead to the max speed from zfs ARC -> QEMU -> virtio-scsi. (ZVOL native read speeds are in the range of 300MB/s single thread)
Now here comes the funny part, setting cache=writeback, DOUBLES the read speed. To about 150MB/s or more.
You say the page cache helps?
I thought so, so I did cold boots, where the page cache is empty. Also tested this after flushing the page cache with: echo 3 > /proc/sys/vm/drop_caches
Still the same conclusion. Tested on a different hardware = still the same.
The speedup is very noticable inside VMs, especially windows guests on poor per-core cpus.
Even with all caches cold, pagecache and ARC, the speed is almost double.
Why would, introducing page cache between QEMU and ZFS zvol, increase speed? The data is already in the ARC cache in memory. It should actually decrease it.