WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Real CPUs (Dual Core) vs. VCPU count in HVM DomU

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Real CPUs (Dual Core) vs. VCPU count in HVM DomU
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Fri, 31 Aug 2007 04:23:08 +0100
Cc: George Lenzer <George.Lenzer@xxxxxxx>
Delivery-date: Thu, 30 Aug 2007 20:23:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <46D43564.6020005@xxxxxxx>
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: <46D43564.6020005@xxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6
> I have a server with two dual core Xeon CPUs.  So the real CPU count is
> two, but with the dual cores it's four and that's what 'top' and 'cat
> /proc/cpuinfo' reflect.  So when configuring a Xen HVM domain, should I
> set the VCPU count to 2 (equal to the number of physical processors in
> Dom0) or, should I set it to 4 (equal to the number of cores in Dom0)?

Well, you'll need a VCPU for each *core* you want to be able to run on.  So if 
you want a domain to be able to use the bandwidth of all the CPUs then you'd 
need to give it 4 VCPUs.  Potentially you'd also want to give it a CPU 
percentage of 400%, but this may not matter so much if you're not capping CPU 
usage and there aren't other domains contending with it.

> I am currently running with VCPUs set to 2 and things seem to be working
> much better (faster) than when it was set to 4.

That might be because your domains are contending over resources (e.g. because 
the domU is sometimes running on the core dom0 usually likes to run on).  I'm 
not sure how well HVM scales with number of VCPUs, though.  It's worth 
experimenting a bit and seeing what works well for your workload.

> However, it's kind of 
> weird to read /proc/cpuinfo and see two CPUs listed as dual core, but
> only have two CPUs...

That reading must be from a PV domain, right?

> The DomU HVM domain will be used for a high 
> traffic groupware server (Zimbra) which means high network and disk
> I/O.  So I suspect CPU performance should be up to snuff to keep up in
> HVM.  Any ideas?

A recommended approach is usually to dedicate a core to dom0, then use the 
other cores for domUs.  If you're only running one domU then if you were to 
pin dom0 to one core, and pin your domU to the other 3 then that ought to 
give decent performance.

Depending on workload you may also be able to give the domU 4 VCPUs and have 
it share one with dom0.  I suspect if you're doing lots of IO then dedicating 
a core to dom0 will be a performance win.  You probably don't need to give 
dom0 more than one core, but you could experiment!

Cheers,
Mark

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>