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

AW: [Xen-users] VCPU amount

To: "Fajar A. Nugraha" <fajar@xxxxxxxxx>, Vladislav Karpenko <vladislav@xxxxxxxxxxxxxx>
Subject: AW: [Xen-users] VCPU amount
From: Carsten Schiers <carsten@xxxxxxxxxx>
Date: Thu, 26 Mar 2009 14:51:00 +0100
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 26 Mar 2009 06:51:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

I don't want to hijack this thread. But as I lately posted a question which 
mainly was about weight and cap and this fits in perfectly (and also you seem
to be an expert here), I repeat it below. 

In the meantime I saw an academic article Ludmilla Cherkasova et al. from which 
I understood that you have to careful that a Dom0 doesn't get too much weight, 
as otherwise it's I/O hunger will slow down DomU activity. 

Therefore I have experimentaly set Dom0 to 512, Streaming to 1024, all others 
to 256.

Here my recent post:

Dear all,

currently, I run Xen on a AMD Dualcore CPU. I have

  Dom0 (clearly)
  DomU Firewall (Endian)
  DomU Fileserving (Samba)
  DomU Mail&Fax (Scalix, Hylafax)
  DomU Videostraming (Vdr) 
  DomU DMZ (web frontend, file sharing)
  DomU 64 Bit development
  DomU 32 Bit development

Dom0 uses clearly 2 VPCU, pinned (because of cpufreq mgmt).

I assigend only 2 VPCUs to the development machines.

Does this make sense?

Or does it make more sense to assign 2 VCPUs to all response critical DomUs, 
too.

Or does it make more sense to assign 1 VCPU only to all DomUs, because we are 
not
sure that a VPCU is a physical CPU and it could be that the 2 VCPUs of a DomU 
uses
the same physical core, which wouldn't make much sense.

Or does it make more sense to dedicate (as it is pinned anyhow) one VPCU (and 
thus
physical CPU) to all machines that don't need much response time and save one 
VCPU
for e.g. the Videostreaming DomU.

I am bit lost, not a lot of docs found so far...

Thanks and have a nice weekend,
Carsten.

----- Originalnachricht -----
Von: Fajar A. Nugraha <fajar@xxxxxxxxx>
Gesendet: Don, 26.3.2009 14:31
An: Vladislav Karpenko <vladislav@xxxxxxxxxxxxxx>
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Betreff: Re: [Xen-users] VCPU amount

On Thu, Mar 26, 2009 at 7:49 PM, Vladislav Karpenko
<vladislav@xxxxxxxxxxxxxx> wrote:
> 1. If i have only one domU and make 2 configs for it with vcpu=1 and vcpu 8,
> the domu will have same perfomance, yes?

Depends. In an oversimplified scenario where only CPU matters, then :

On a single core server : depending on the type of load, vcpus=8 will be slower.
Performance-wise, you should not create a domU with more vcpus than
available physical core.

On 8-core (or more) server : depending on the type of load, vcpus=8
will be much faster.

A special case is when on 8-core server and you set "cpu_cap=100" (or
less) on both domUs. In theory, they will have the same performance.
Again, this is only true if your xen version supports cpu_cap.

> 2. if i have 2 domu, one with vcpu=4 and second with vcpu=1, they will have
> same perfomance if one of them is idle, and half of perfomance if they are
> both loaded?

No, see above.
If both domUs have the same vcpus, cpu_weight, and cpu_cap, then the
answer is yes.

>
> 3. the only way to limit load is cpu_cap and for QOS is cpu_weight?

vcpus and cpu_cap can limit cpu load.
Note that there are other factors that can affect system load, one of
the them is disk I/O.

>
> 3. May be you mistake with:
>
>> In theory you can have something like a domU with vcpu=7 (note that
>> dom0 should have it's own dedicated core),  cpu_weight=65000, and
>> cpu_cap=1, which should create a high-priority (cpu-wise) 7-way system
>> whose total performance equals to that of one cpu. It could be handy
>> for testing multi-threaded application to see how it performs in a
>> fast CPU vs many slow CPUs.
>
>
> cpu_cap=1 - the system will have only 1% of 1 cpu power, may be mast be
> cpu_cap=x*100 (x is a number of cpu for domu) for high-priority (cpu-wise)
> %x-way system

You're half right :)
To emulate a SMP system whose performance equal to one CPU, cpu_cap
should be 100.
Note that this is just an example to demonstrate vcpu vs cpu_cap.

For practical usage in your setup (you have 8 core system, right?) You
can simply :
- assign core 0 to dom0
- set domUs to use core 1-7
- distribute the load using vcpus, with each domU uses 7 or less
vcpus. For example : db -> vcpus=1, terminal server -> vcpus=6

That should give most performance.
If the total number of vcpus (on dom0 and domUs) are greater than
available physical cores, then you may want to start playing with
cpu_weight and cpu_cap.

Regards,

Fajar

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

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

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