Disk mounted to VM 3x slower

Marx

New Member
Oct 16, 2020
18
2
3
51
Hi
I've measured disk speed when mounted directly to proxmox:
Bash:
root@silver:~# dd if=/dev/zero of=/mnt/xx/output.img bs=8k count=256k
262144+0 records in
262144+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 13.7445 s, 156 MB/s
Then I've run OMV VM and passed-through whole disk, mounted inside VM, and measured speed again:
Bash:
root@omv:~# dd if=/dev/zero of=/srv/dev-disk-by-label-seag1/output.img bs=8k count=256k
262144+0 records in
262144+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 35.8209 s, 60.0 MB/s

As disk was exclusively mounted in both examples, I was expecting to see similar speed. Maybe with VM it can be a little slower because of VM overhead, but it shouldn't be almost 3x times difference. What can be a cause of such behavior? How can I fix it?

Edit: I've enable write back cache and speed increased
Bash:
root@omv:~# rm /srv/dev-disk-by-label-seag1/output.img
root@omv:~# dd if=/dev/zero of=/srv/dev-disk-by-label-seag1/output.img bs=8k count=256k
262144+0 records in
262144+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 11.959 s, 180 MB/s
 
Last edited:

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!