[CentOS-virt] Performance tunning CentOS / Xen

Sun Aug 23 13:26:40 UTC 2009
Pasi Kärkkäinen <pasik at iki.fi>

On Sun, Aug 23, 2009 at 01:34:08PM +0800, Ryan Chan wrote:
> Hello,
> 
> I have followed standard documents to install CentOS 5.3 & Xen.
> After playing around, stuffs are OK.
> 
> So I move forward to tune the performance, are there any recommended
> documents/tutorial that specialized on performance tuning VM
> host/guest, on CentOS / Xen architecture?
> 

I usually limit dom0 memory to 512 MB or 1024 MB to make sure memory
ballooning is not needed while creating new domUs/guests. It could cause weird
problems if you boot up your dom0 with all the physical memory available to
it (possibly multiple gigabytes), and later it gets ballooned down to only a few hundred MBs.

Also you might want to dedicate a cpu core only for dom0, so disk/network
IO requests from domUs will always have enough CPU power to be executed by dom0.

Xen hypervisor (xen.gz) boot options to play with: 
	- dom0_max_vcpus=
	- dom0_vcpus_pin
	- dom0_mem=

And possibly running "xm vcpu-pin" commands after startup to force dom0
vcpu(s) to a specific physical cpu(s)/core(s).

In addition to that you also need to limit the physical cpus the
domUs/guests can use (so the dom0 cpus/cores stay reserved only for dom0).

Also you might want to give dom0 more weight than domUs so it is always able 
to have enough cpu time.

References:
http://article.gmane.org/gmane.comp.emulators.xen.user/45042
http://lists.xensource.com/archives/html/xen-devel/2009-07/msg00875.html
http://lists.xensource.com/archives/html/xen-devel/2009-07/msg00873.html

-- Pasi