I can confirm Fabian's tip about the cache=writeback tip. I've one more
tip for you: if you are using image files for virtual disks, then using
ext3 as the filesystem for the host OS will greatly improve the disk I/O
of your guest operating systems. With a Lucid+ext4+KVM+WindowsXP guest
combination I've measured a write throughput of 1-3 MB/s during a
Windows XP installation. Awfully slow. Regardless of the image format
(qcow2 or raw) or the virtual I/O controller (IDE or virtio).

However using the same parameters with an ext3 host filesystem, I've
measured 20-30 MB/s with raw images and IDE controller (note that this
was still during a standard Windows XP installation, not in a disk
performance test). I've not yet tested qcow2 images and virtio, but I'm
pretty certain that they will show similiar performance boost.

So either use cache=writeback, or switch back to ext3. Or if you're
familiar with ext4 tweaks, you might already know which option you've to
disable to get back the ext3-like disk performance of qemu.

P.S.: one might argue whether this is a libvirt, a qemu or ... "bug".
Qemu will most probably not change it's default cache policy, thus I see
the best chance for fixing this problem in libvirt. It already handles
tons of special cases where this or that option has to be applied if
this or that environment is present. I guess libvirt could (silently)
use cache=writeback for guests that have their booting hard disk in an
image file that is on an ext4 filesystem.

P.S.2: virt-manager's (a GUI to libvirt) latest version (0.8.5-1) introduces 
the option to manually specify the cache mode for a disk in a guest. However 
the current version honors libvirt's cache mode for disks. Thus if you manually 
edit libvirt's guest definition (eg. using virsh's edit command) and specify a 
cache mode for a disk, virt-manager will keep it intact throughout further 
guest modifications.
The virt-manager change for this is here: 
http://hg.fedorahosted.org/hg/virt-manager/rev/0241648684d1
The virt-manager 0.8.5 changelog is here: 
http://hg.fedorahosted.org/hg/virt-manager/file/0b54eb67ce31/ChangeLog

-- 
Slow disk IO for all guests with all disc modes and types.
https://bugs.launchpad.net/bugs/550409
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to