[libvirt] CFS Hardlimits and the libvirt cgroups implementation

Adam Litke agl at us.ibm.com
Fri Jun 10 12:32:52 UTC 2011



On 06/10/2011 05:25 AM, Taku Izumi wrote:
> 
>> --- snip ---
>> <cputune>
>>   ...
>>   <cfs_period>1000000</cfs_period>
>>   <cfs_quota>500000</cfs_quota>
>> </cputune>
>> --- snip ---
> 
>  I think the element name should be generic and
>  the percentage (0..100 or 0..vcpu*100) is better as 
>  the element value. That's intuitive to me.
> 
>  How about the follwing?
> 
>   <cputune>
>     <capping>50</capping>
>   <cputune>
> 
>  If it is not possible to control enough only one
>  "capping" parameter, how about passing the other parameter
>   as qemu driver's parameter via /etc/libvirt/qemu.conf ?
> 

I think it is important to be able to set the period.  The reason that
cpu.cfs_period_us is exposed at all by the cgroup controller is because
the setting might need to be changed.  What about making period optional
by defining the units for period and quota as follows:

period: An optional attribute specified in microseconds.
quota: A percentage of the period that the cpus may run.

This way 'period' can be omitted or changed independently from quota.

-- 
Adam Litke
IBM Linux Technology Center




More information about the libvir-list mailing list