Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Simple issue. I'm running 5 KVM/QEmu instances. the host machine is constantly freezing for about a half a second in every 5. Disk LED hints that it is disk write related. Host is FC14, guests of FC14/FC15/Windows 7/BSD

The host machine is 100% unresponsive during these small periods. Any kb/mouse input "catches up" after the pause.

Tried using different cache modes in libvirt, different disk types and the issue is constant regardless of the number of guests (though Windows makes it worse, even when paused).

Here is the typical cmd executed by libvirt.

/usr/bin/qemu-kvm -S -M pc-0.13 -cpu phenom,+wdt,+skinit,+osvw,+3dnowprefetch,+misalignsse,+sse4a,+abm,+cr8legacy,+extapic,+cmp_legacy,+lahf_lm,+rdtscp,+pdpe1gb,+popcnt,+cx16,+ht,+vme -enable-kvm -m 2048 -smp 3,sockets=3,cores=1,threads=1 -name devserver -uuid aaa-bbb-ccc-ddd-eee-fff -nodefconfig -nodefaults -chardev socket,id=monitor,path=srv.monitor,server,nowait -mon chardev=monitor,mode=readline -rtc base=utc -boot c -drive file=srv.img,if=none,id=drive-virtio-disk0,boot=on,format=raw -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 -drive file=srv_data.img,if=none,id=drive-ide0-0-0,format=raw -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive file=srv_home.vmdk,if=none,id=drive-virtio-disk1,format=vmdk -device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-virtio-disk1,id=virtio-disk1 -device rtl8139,vlan=0,id=net0,mac=aa:bb:cc:dd:ee,bus=pci.0,addr=0x3 -net tap,fd=51,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0x4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6

Any idea as to possible tweaks to help this issue?

Thanks in advance.

share|improve this question
up vote 4 down vote accepted

this is not your final answer - I would start by looking at disk iops - use tools like iostat and sar (sysstat) - find out what your practical iops are - and check if your swap is busy also

I have seen similar behavior with sata drives in a software raid (md), every time a kvm guest was doing a lot of writes the vm's responsiveness lagged quite a bit. I didnt take the time to tweak, we switched to a raid controller with cache, battery and writeback - still the same drives, that helped a lot - my hunch is the caching of writes was the trick. (that was a single quad xeon with 12GB of ram running 2 windows DC's and 5 small application servers, none was all that busy, used a 3ware 9690).

share|improve this answer
Thanks Stokkeland, sounds about right. My host is storing the disk images in md software raid. – Aiden Bell Jul 9 '11 at 12:23
maybe there is a way to allocate some memory for write cache, I am not expert on that - although risky, (data loss if it goes down) it should help performance. – Stokkeland Jul 9 '11 at 16:12
@Stokkeland linux does that by default, see for details. – sciurus Jul 9 '11 at 20:45
However, this only applies to qemu/kvm if cache=writeback is used; see – sciurus Jul 9 '11 at 21:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.