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] 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

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