This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-users] best way to optimize use of CPU and IO

To: "Fajar A. Nugraha" <fajar@xxxxxxxxx>
Subject: Re: [Xen-users] best way to optimize use of CPU and IO
From: "Fong Vang" <sudoyang@xxxxxxxxx>
Date: Fri, 25 Apr 2008 08:24:53 -0700
Cc: Xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 25 Apr 2008 08:32:36 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=kxDHXtuWjsCPAxOuoQKD0JNlv6MTuDXl/lYfmaASPak=; b=rnOLUwM7TNVXUnP3pW7wq5NdXPylEkSKGT5t1uPLMUUSCsiu5QQSts4PIFYV19rgPSEgIYYX6oL5Oeo40KybNqCPOU++qf1rlsnrQ1hCUdKXdUk5eyE9cS3hrGanUQPBs8LpZzmVx6H8INPCAqFuSqn6tOd3TSBoj+RhGp4YGAQ=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=D1p33qhjB6Y6P1txKIOp+FtvHAR5UERgHKOccrZtFAtT1W97HCAsR/XZSJMJCUkQvK1MbSYf4CD13t2tcICfcWVwab0w5ZiMbkhTxO4j/tTBGc6vfinS8t54b++mfN1KcGdZ2CxGXcGEG8+8DAR82RwqUeC+RrnTL5iZc2TL/fY=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <48114D7B.10400@xxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4f52331f0804241453ufca5a9cqc2c17adb6909a359@xxxxxxxxxxxxxx> <48114D7B.10400@xxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thank you the advice.  I'll try them out. 

in xentop, what do the numbers in the VBD number represent?  What units are they in (blocks?)?

On Thu, Apr 24, 2008 at 8:18 PM, Fajar A. Nugraha <fajar@xxxxxxxxx> wrote:
Fong Vang wrote:
I have a system with 2 quad core CPUs running Xen on CentOS 5.1 64-bit.  The kernel sees this system as having 8 CPUs.  If I were to create 6 domUs, what would be the best way to allocate the CPUs to get best CPU and IO performance?  Should all CPUs be allocated to all domU and let the system allocate as it sees fit or would the system perform better if each domU is restricted to fewer CPUs?

Each domU is running a custom Java application that utilizes MySQL heavily.  Application is heavily threaded.

As a rule of thumb, performance-wise, virtualization is best when you have under-utilized systems. Meaning, you'll need to know the load characteristic of each domU. Not-so-busy systems can be grouped togethere, while busy systems might be better of on a separate physical system. Since dom0 handles actual disk/network I/O, you should give it a dedicated core/cpu.

A somewhat simple way to get domU load :
- set each domU to have 1 cpu, each on different dom0 physical cpu (use vcpus and cpus on xen config file)
- limit dom0 to use only the CPU that domU doesn't use (xm vcpu-set, xm vcpu-pin)
- put each domU's disk on LVM on dom0.
- run all domU
- use "xm top", you'll get CPU and block device read/writes per domU
- use "iostat -x", you'll get disk usage rate of each LV

depending on the result, you might need to move some domUs to a separate server, assign some domUs more CPUs than others, or have several domUs share a single CPU.



Xen-users mailing list

Xen-users mailing list