KVM performance tuning

hk@

Renowned Member
Feb 10, 2010
248
8
83
Vienna
kapper.net
Hi
we're trying to get as much performance out of KVM - while trying to get as many machines running on the hardware.

Here's how far we got: 32 GB RAM, 2 x QC Xeon E5620 and MegaRAID SAS 8708ELP for the SAS-HDDs (ST3300657SS).

I've seen so far that ",cache=none" seems to be a good idea for virtual harddisk.
Also deadline seems to be the scheduler of choice.
virtio for the guests is also preferred.

Now - we're talking Windows guests (specifically SBS2008 and soon 2010).

I'd appreciate any further thoughts and ideas as I'd love to impress the customer with some performance :)

regards
hk
 
I would also try:

- setting up hugepages;
- If you only use KVM (no openvz VMs) use the latest kernel (2.6.35-1-pve), and try KSM;
- offload network "work" as much as your network cards and drivers will allow.
 
Tom, I still don't understand if cache=none is only reserved for KVM-LVM, or can also be used (and benefit) RAW files (inside standard local storage)?
Also, is it possible/planned to have the installer to ask how much of available disk space leave as free, so I can then use for other partitions and LVM storage (so my kvm guests can be directly on lvm), or maybe optionally automatically prepare as additional LVM storage?
Now I have to install proxmox on one hd, and have a different one for LVM storage (that I have to add later through web interface). Also a "error free" procedure/script in the wiki to shrink local LVM and do what described above would be fabolous (I'm really afraid in rounding error when calculating sizes, but also would not like to waste space because of my ignorance).
Thanks a lot
 
yes, cache=none can also be used for raw disk images (just see 'man kvm').

regarding the auto partitioning: we got a lot of requests, we will see what can be done to be more user friendly.
 
Can I please ask what is the recommended way to set the scheduler?
1) add 'elevator=deadline' to grub's boot options for the PVE kernel?
2) change 'CONFIG_DEFAULT_IOSCHED' in /boot/config-2.6.**-pve
3) echo "deadline" > /sys/block/*/queue/scheduler as part of rc.local

Regarding setting cache=none, I understand this is done by manual modification of /etc/qemu-server/<vmid>.conf. Will proxmox "respect" those changes when changing the VM config through the web-interface (e.g. modifying assigned memory)? Or do I have to redo my changes afterwards again?

Thanks, hank
 
Can I please ask what is the recommended way to set the scheduler?

It is not recommended to set another scheduler.


Regarding setting cache=none, I understand this is done by manual modification of /etc/qemu-server/<vmid>.conf. Will proxmox "respect" those changes when changing the VM config through the web-interface (e.g. modifying assigned memory)?

yes