On 07/05/2011 02:06 AM, Wen Congyang wrote: > At 07/04/2011 07:19 PM, Nikunj A. Dadhania Write: >> On Thu, 30 Jun 2011 11:13:18 +0800, Wen Congyang <wency@xxxxxxxxxxxxxx> 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. > Nikunj is correct here. We only need to ensure that the bandwidth is distributed equally between all of the cpus. This can be accomplished internally by creating a cgroup for each vcpu and ensuring that 'cpu.share' is the same for each vcpu cgroup. -- Adam Litke IBM Linux Technology Center -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list