Windows + without writeback disk cache + cloudmin = slow

Hello all,

I recently migrated my windows machines to a dedicated cloudmin server running CentOs as host.

I found that my windowsxp and windows 2003 machines were terribly slow/lagged. Interestingly my windows 2008 machines were running fine.

After days of troubleshooting, I did a lookup on the running processes of the qemu-kvm and found out that cloudmin, when launching the vm, did not include the necessary parameters to enable the writeback disk cache.

As a quick solution, what I did was I manually launched my vm.

(For example:

/usr/libexec/qemu-kvm -name WindowsXPMachine.prj -m 3072 -drive index=0,media=disk,file=/virtualmachines/WindowsXPMachine.img,cache=writeback,if=ide -boot c -net tap,vlan=0,script=/virtualmachines/ -net nic,vlan=0,macaddr=00:07:e9:a0:f0:19,model=rtl8139 -vnc :19 -usbdevice tablet -monitor tcp:,server,nowait -smp 4


Then I used the option in cloudmin to “refresh the status of the machine”, and it came up as alive machine.

And that solved the problem. The windows xp machine is now lightening fast!

Now my question is, how can I enable writeback cache in the cloudmin? Or if there is no such feature, where can I amend the command line arguments/launching script that is used by Cloudmin while launching a vm?

This way I can retain the disk cache feature by simply using the ‘Startup System’ link, rather than manually launching the machine from console.


I looked into this writeback cache option, and it seems that it may be risky to use on a production VM as there is no guarantee that data written to the disk by the VM is actually written on the host. See

That said, you can enable it manually as follows :

  1. SSH into the Cloudmin master system as root
  2. Get the VM’s unique ID with the command cloudmin list-systems --host WindowsXPMachine.prj --id-only
  3. Edit the file /etc/webmin/servers/XXX.serv , where XXX is the ID from the previous step
  4. Find the line starting with kvm_drives and add cache=writeback in the correct place.

Dear Jamie,

All worked like a charm.


While it is true that writeback is somewhat risky, almost identical performance gains can be had by cache=none. As supporting evidence, here is a comparison:

This would provide the benefit, with no risk as far as I understand. Can this be made an option to Cloudmin when creating or modifying a machine? I believe the default is writethrough which is pretty slow in most cases, at least for me.

Allowing the cache type to be customized in Cloudmin is a reasonable request. I will look into this for the next release…

Just an FYI, on my virtual machine, I got 3x disk performance when changing to cache=none. I updated /etc/webmin/servers serv file for the VM.

I’ve just finished implementing a feature for the next Cloudmin release - you will be able to configure on a per-disk basis the cache mode used for KVM instances. You will also be able to set the default for new VMs.

This will go into Cloudmin 6.9.