Re: [RFC] Add persistent XML for cpu tunables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/3/29 Daniel Veillard <veillard@xxxxxxxxxx>:
> On Tue, Mar 29, 2011 at 02:32:18PM +0800, Osier Yang wrote:
>> Example of cputune XML:
>> Â <cputune>
>> Â Â <shares>2048</shares>
>> Â Â <vcpupin vcpu='0' cpuset='0-4,^1'/>
>> Â Â <vcpupin vcpu='1' cpuset='1,3'/>
>> Â Â <vcpupin vcpu='2' cpuset='0,2'/>
>> Â </cputune>
>>
>> "shares" is to define the the proportional weighted cpu share
>> for the domain.
>
> ÂHum, what does "2048" there means ? I assume there is an unit but
> it's not defined. Can we get a precide definition of the semantic of
> the shares construct. If I were to use it I need to know what it means,
> and I can't just from that description. Drivers in QEmu and LXC just
> pass that down to linux, but it still doesn't provide a semantic for
> it and "whatever linux implements at the time" is not really a good
> answer.

In case of ESX the CPU share is a relative number without a unit. From
the vSphere API docs [1]:

"The number of shares allocated. Used to determine resource allocation
in case of resource contention. [...]. There is no unit for this
value. It is a relative measure based on the settings for other
[virtual machines]."

A domain with CPU share 2048 will get twice as much CPU time as a
domain with CPU share 1024. The same is true for a domain with 20 and
a domain with 10. The only thing that matters is the relation, not the
absolute value.

Also in case of ESX the shares value is only relevant in case of
contention for CPU time between multiple domains.

The same pattern applies to memory.

[1] http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.SharesInfo.html

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]