Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a guest VM running inside a 12.04 Ubuntu host. VM was created using the vmbuilder python script.

On the host the phoronix-test-suite "aio-stress" gives a performance speed of >1600MB/s Random Write throughput.

The VM (also running 12.04) gives random write throughput of around 3MB/s. Far, far poorer. http://openbenchmarking.org/result/1301161-BY-20130116176

I have changed the default file image type from qcow2 to raw on the host to improve the disk throughput and have ensured that the vmbuilder template is edited to use "virtio" as target dev.

This has resulted in a speed improvement to 7.5MB/s -- still way below what I would expect.

The same machine running 10.04 (with 10.04 VMs) last year was achieving 700MB/s throughput: http://openbenchmarking.org/result/1205239-BY-20120523168

Can anyone point me at what might be the problem?

share|improve this question

1 Answer 1

Following IBM recommendations, you should:

  1. Disable caching on your disks. If you use libvirt, simply put cache='none' in your driver section for the disk.

  2. Use noop as elevator in your VM to let hypervisor handle it. Use this as kernel CL in your VM: elevator=noop

  3. On the hypervisor, use deadline elevator: elevator=deadline

  4. On the hypervisor, disable swappiness. Put vm.swappiness = 0 in your /etc/sysctl.conf file. Then, use sysctl -p.

All this should greatly improve your performances. Then, given your (hardware) configuration, more specific hints can be used. I recommend you carefully read the IBM docs.

share|improve this answer
    
Thanks! For 1) I used "virsh edit <vmname>" to add "cache='none'" to the driver section of the xml file. Then started the VM. 2) I set the VM elevator to noop using "echo noop > /sys/block/vda/queue/scheduler" and added it to the file "/etc/rc.local" for persistence. 3) Repeated that for elevator=deadline on the host. 4) Put vm.swappiness in /etc/sysctl.conf and ran sysctl-p as advised. Best performance is now 14.75MB/s - an improvement but still way off what I am expecting. –  James Smith Jan 25 '13 at 15:24

Your Answer

 
discard

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.