Slow disk speeds on KVM guest

azop

Renowned Member
Feb 6, 2012
44
1
73
I have a zfs pool containing of 4 x 750GB "enterprise" sata drives. On the host and in containers I get fairly good disk speeds, however in a KVM guest the disk speeds fall on their face. I've tried various KVM disk cache settings including no cache, write back, write through and nothing seems to fix the disk speed issue.

If I spin up a container, I get very close to host disk speeds.

Host:

root@pve:/home/curt# dd if=/dev/zero of=speedtest bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 0.125674 s, 834 MB/s
root@pve:/home/curt# dd if=/dev/zero of=speedtest bs=1M count=100 conv=fdatasync
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 0.161026 s, 651 MB/s
root@pve:/home/curt# dd if=/dev/zero of=speedtest bs=64k count=3200 conv=fdatasync
3200+0 records in
3200+0 records out
209715200 bytes (210 MB, 200 MiB) copied, 0.409027 s, 513 MB/s

KVM guest:

root@slowkvm:~# dd if=/dev/zero of=speedtest bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 0.988097 s, 106 MB/s
root@slowkvm:~# dd if=/dev/zero of=speedtest bs=1M count=100 conv=fdatasync
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 1.6643 s, 63.0 MB/s
root@slowkvm:~# dd if=/dev/zero of=speedtest bs=64k count=3200 conv=fdatasync
3200+0 records in
3200+0 records out
209715200 bytes (210 MB, 200 MiB) copied, 3.32568 s, 63.1 MB/s
 
Hi,

dd (especially with /dev/zero) is a good benchmark test. Use fio instead.

What vdisk bus do you use at the KVM?
Only virtio or scsi with a virtio controller provides good performance.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!