[libvirt-users] CFS BWC related question

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? Specifically, how to make the cpu_quota/cpu_period to be available within cgroup/cpu? BRs, Dennis

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?
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. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 12/14/2012 11:04 PM, Eric Blake 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,
On 12/14/2012 12:37 AM, Dennis Chen wrote: 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

HI, I am trying to develop an application on windows which would connect to the hypervisor using libvirt.I am trying to analyse libvirt statically.I was able to figure out the list of APIs that should be used to connect to the hypervisor....But unable to make out the sequence of calls to be invoked to create a new virtual machine(domain)....Can some one pls help me out in this... Thanks in advance... Venkat

On 12/18/2012 02:03 AM, Sasidhar Khambhampati wrote:
HI, I am trying to develop an application on windows which would connect to the hypervisor using libvirt.I am trying to analyse libvirt statically.I was able to figure out the list of APIs that should be used to connect to the hypervisor....But unable to make out the sequence of calls to be invoked to create a new virtual machine(domain)....Can some one pls help me out in this...
Did you mean to attach this to an unrelated thread? In general, when asking a new question, it's best to start a new thread instead of replying to a random message. Have you looked at any of the code examples that ship as part of libvirt? For example: http://libvirt.org/git/?p=libvirt.git;a=blob;f=examples/hellolibvirt/helloli... Or more detailed, the source code for virsh is a great reference for how to use almost all of the libvirt APIs (but not quite as simple to follow). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Dennis Chen
-
Eric Blake
-
Sasidhar Khambhampati