[libvirt-users] CFS BWC related question

Dennis Chen xschen at tnsoft.com.cn
Mon Dec 17 03:15:48 UTC 2012


On 12/14/2012 11:04 PM, Eric Blake wrote:
> On 12/14/2012 12:37 AM, Dennis Chen wrote:
>> Hi,
>>
>> Seems this question is not related with libvirt directly, but I still want to ping this list to see if someone can be help.
>>
>> The OS in my desktop box is Ubuntu 12.10, the kernel is 3.5.1. I installed the cgroup utility package with:#apt-get install cgroup-bin, but after I installed these packages successfully, I can't find cpu_quota/cpu_period controller in the /sys/fs/cgroup/cpu folder. So the essential question is:
>>
>> What I need to do to make cgroup can support CFS BWC feature?
> Your kernel sounds new enough, and since you have cgroups turned on, 
> libvirt should just be able to use it.  Did you restart libvirtd after 
> turning on cgroups?

I tried restart the libvirtd but seems this approach is not effective...

>> Specifically, how to make the cpu_quota/cpu_period to be available within cgroup/cpu?
> Have you tried using the libvirt XML markings that control cpu quota 
> and period?  If so, it either works (you have everything you need), or 
> else it would be helpful if you posted the error message you get when trying.
>   For reference, the XML to use is documented at:
> http://libvirt.org/formatdomain.html#elementsCPUTuning
> and you can also do hot-plug modifications by using virsh schedinfo.
>
Yes, I tried. Below is the error info when I tried to start the vm with the modified xml file:
virsh # create /etc/libvirt/qemu/odm.xml
error: Failed to create domain from /etc/libvirt/qemu/odm.xml
error: Unable to get cpu bandwidth period: No such file or directory

As the hot-plug method, the virsh will complain:

virsh # schedinfo odm --set cpu_period=1000000
Scheduler      : posix
error: invalid scheduler option: cpu_period=1000000

So I think the root cause is no cpu_period/quota in my installed cgroup folder. Interesting, I remembered a couple of weeks ago, I had an older Linux distribution installed, the cpu_period/quota is there.

BRs,
Dennis





More information about the libvirt-users mailing list