[libvirt] [PATCH 06/10] vcpubandwidth: introduce two new libvirt APIs

Nikunj A. Dadhania nikunj at linux.vnet.ibm.com
Wed Jul 6 08:56:38 UTC 2011


On Wed, 06 Jul 2011 14:56:27 +0800, Gui Jianfeng <guijianfeng at cn.fujitsu.com> wrote:
> On 2011-7-5 16:41, Nikunj A. Dadhania wrote:
> > On Tue, 05 Jul 2011 15:06:06 +0800, Wen Congyang <wency at cn.fujitsu.com> wrote:
> >> At 07/04/2011 07:19 PM, Nikunj A. Dadhania Write:
> >>> On Thu, 30 Jun 2011 11:13:18 +0800, Wen Congyang <wency at cn.fujitsu.com> wrote:
> >>>> We want to control bandwidth for each vcpu, so we can not use the
> >>>> API virDomainSetSchedulerParameters(). Introduce two new APIs to
> >>>> change and query bandwidth for each vcpu.
> >>>>
> >>> Will we have different cpu bandwidth for different vcpus?
> >>>
> >>> Something like this:
> >>>
> >>> vcpu1: 1000000/250000
> >>> vcpu2: 1000000/500000
> >>> vcpu3: 1000000/300000
> >>> vcpu4: 1000000/400000
> >>>
> >>> IMO, that is not required, we can have a top level bandwitdh for the VM
> >>> and then redistribute it among vcpus equally, without user knowing about
> >>> it.
> >>>
> >>> Something like this:
> >>>
> >>> VM1(4vcpu) has to be throttled at 1CPU bandwidth using SetSchedParamters.
> >>>
> >>> Internally libvirt splits it equally:
> >>> vcpu1: 1000000/250000
> >>> vcpu2: 1000000/250000
> >>> vcpu3: 1000000/250000
> >>> vcpu4: 1000000/250000
> >>>
> >>> So why introduce VCPU level apis?
> >>
> >> Adam Litke said IBM's performance team nead to control cpu bandwidth for each
> >> vcpu.
> > Right, but we do not export that as a User API, that was my suggestion.
> > We can internally control each vcpu's bandwidth, i.e. divide equally.
> 
> Hmm, I heard that some server could run CPUs at different speed.
> May be this patch can simulate this behavior. 
That happens on my laptop as well, depending on the machine load CPU
frequency is changed but it is done transparently.

I am not sure if we are trying to simulate that here.

Regards
Nikunj




More information about the libvir-list mailing list