How to disable cache for QEMU/KVM storage?

vladimirfx

New Member
Jan 31, 2011
3
0
1
Hi there!

I've migrating virtual hosts from libvirt to proxmox. In process of migration I've notice performance degradation from 5 to 50% on same hardware. Hosts use nearly the same kernels - ubuntu 2.6.35.
Diffenences only in configuration:
1. IO shceduler : CFQ (proxmox) against Deadline (my old manualy tuned ubuntu server). I chage shceduler to Deadline for all proxmox hosts.
2. KVM storage configuration:
on old setup I've used virtio on LVM (backed by raid 1) with cache=none.
The question is how to change cache parameter of KVM on proxmox hosts?

Now that absolutly useless caching make presure on memory and brings to swap out VMs memory. In addition, that cache by itself descrease io throughput significantly.

ANY WORKAROUND is welcome.

Can someone point me to code where QEMU/KVM comandline is assembled.
 
Last edited:
Hi there!

I've migrating virtual hosts from libvirt to proxmox. In process of migration I've notice performance degradation from 5 to 50% on same hardware. Hosts use nearly the same kernels - ubuntu 2.6.35.
Diffenences only in configuration:
1. IO shceduler : CFQ (proxmox) against Deadline (my old manualy tuned ubuntu server). I chage shceduler to Deadline for all proxmox hosts.
2. KVM storage configuration:
on old setup I've used virtio on LVM (backed by raid 1) with cache=none.
The question is how to change cache parameter of KVM on proxmox hosts?

Now that absolutly useless caching make presure on memory and brings to swap out VMs memory. In addition, that cache by itself descrease io throughput significantly.

ANY WORKAROUND is welcome.

Can someone point me to code where QEMU/KVM comandline is assembled.
Hi,
edit the config-file /etc/qemu-server/VMID.conf

e.g.:
virtio0: a_sas_r0:vm-205-disk-1,cache=none

Udo
 
ANY WORKAROUND is welcome.

see 'man qm' (edit the config file and set 'cache=none' parameter) - Yes, we will put that on the we interface in V2.0.

Can someone point me to code where QEMU/KVM comandline is assembled.

/usr/share/perl5/PVE/QemuServer.pm (function config_to_command)
 
I will try to chage that file and build own deb. With 7 hosts and aprox. 25 vm it's good reason to not do that by hands.