[libvirt] CFS Hardlimits and the libvirt cgroups implementation
Adam Litke
agl at us.ibm.com
Fri Jun 10 13:17:05 UTC 2011
On 06/10/2011 04:45 AM, Wen Congyang wrote:
>>> === 3 ===
>>> Besides the above issues, I would like to open a discussion on what the
>>> libvirt API for enabling cpu hardlimits should look like. Here is what
>>> I was thinking:
>>>
>>> Two additional scheduler parameters (based on the names given in the
>>> cgroup fs) will be recognized for qemu domains: 'cfs_period' and
>>> 'cfs_quota'. These can use the existing
>>> virDomain[Get|Set]SchedulerParameters() API. The Domain XML schema
>>> would be updated to permit the following:
>>>
>>> --- snip ---
>>> <cputune>
>>> ...
>>> <cfs_period>1000000</cfs_period>
>>> <cfs_quota>500000</cfs_quota>
>>> </cputune>
>>> --- snip ---
>>
>> I don't think 'cfs_' should be in the names here. These absolute
>> limits on CPU time could easily be applicable to non-CFS schedulars
>> or non-Linux hypervisors.
>
> Do you mean the element's name should be period and quota?
>
> The name of the file provided by cfs bandwidth is:cpu.cfs_period_us
> and cpu.cfs_quota_us.
>
> I think he uses 'cfs_' because it's similar as the filename.
> But I do not mind the element's name.
>
> I am making the patch, so I want to know which element's name should
> be used.
I think it's a good idea to use 'period' and 'quota'. In my other email
I suggest that the unit for period should be microseconds and quota
should be a percentage of the period. That way quota can be used
without needing to know or change the default period.
Please Cc: me on your patch. We are very interested in this feature and
would like to review/test it.
--
Adam Litke
IBM Linux Technology Center
More information about the libvir-list
mailing list