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

Re: [libvirt-users] How to lookup the driver instance through virConnectPtr pointer



On 11/21/2012 02:42 AM, Dennis Chen wrote:

[I will note that today's email chain should have been as a new thread,
rather than in-reply to a thread from July - changing subject lines and
deleting all previous content still doesn't stop your mailer from using
In-Reply-To headers]

> Yeah, I know. So the email is try to get to know how to use cgroup to
> configure the cpu bandwidth of a specific VM, I am writing a separate
> project to control the cfs bandwidth of a VM specified, not taking use
> of the virsh shell.

You do this by modifying the domain XML:

http://libvirt.org/formatdomain.html#elementsCPUTuning

documents the <cputune> element, which includes the shares, period, and
quota tunables that map into the cpu bandwidth cgroup tunables.  So,
rather than directly modifying cgroup, you should instead be modifying
this portion of the XML.

Furthermore, if your domain is already running, then you can hotplug the
tuning via the virDomainGetSchedulerParametersFlags() and
virDomainSetSchedulerParametersFlags() API, with parameter names such as
VIR_DOMAIN_SCEDULER_VCPU_PERIOD which maps back to the <period>
sub-element of the <cputune> domain XML.  These APIs are already exposed
via the 'virsh schedinfo' command.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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