How to get more I/O performance from Citrix XenServer

hard driveperformancexen

I have a Citrix XenServer 6.1 installed on a HP Server (1x Intel Xeon E5630 @ 2.53GHz (4 cores, 8 threads, RAM: 752MB for dom0 and 55286MB for the guests). The server has 2 scsi mirrored disks and is used for dev/testing.

The host runs 5 guests that I powered on or off during the tests. Most of the perf tests gave poor results. But I'd like to tune Xen: for instance, a "dd if=/dev/zero …" gives 130MB/s on the host, but only 75MB/s on a lone guest.

If I run a dd if=/dev/urandom on a guest, the CPU is saturated and I get 7MB/s.

Via tune-vcpus, I managed to give 8 vCPUs to dom0 and I got less perfs. The default is 4 vCPUs and I'd like to give dom0 only 1 vCPU but it doesn't work.

Here is what I tried:

  • Edit /etc/sysconfig/tunes-vcpus > NR_DOMAIN0_VCPUS=1 and MAX_NR_DOMAIN0_VCPUS=1
  • /etc/init.d/tune-vcpus start min
  • reboot the host

I also tried

/opt/xensource/libexec/xen-cmdline -set-dom0 blkbk.reqs=256

to get more perf from the storage it doesn't change anything.

And I enabled Qos on the VBDs and gave the highest priority to the one where I do my tests.

After all that, I don't get any gain in I/O performance. Is there anything else to do?

Best Answer

You can try to find a good value for max_sectors_kb. By default it set to 512 or 1024. For example you can set it to 128 and test again (dom0 as well as domU).

echo 128 > /sys/block/[your blockdevice]/queue/max_sectors_kb 

This setting is not persistent. Put an entry into /etc/rc.local to set it on startup.

Please post your results.

Related Topic