On Thu, May 17, 2012 at 01:25:48PM +0800, Wen Congyang wrote: > At 05/17/2012 01:09 PM, KAMEZAWA Hiroyuki Wrote: > > (2012/05/17 14:07), Wen Congyang wrote: > > > >> At 05/17/2012 12:46 PM, KAMEZAWA Hiroyuki Wrote: > >>> (2012/05/17 12:54), Wen Congyang wrote: > > > >>>> So, if we donot limit the hypervisor, the behavior shoule not be > >>>> changed. So we should limit the whole vm. If the hypervisor threads > >>>> are limited, there is no need to limit the whole vm. > >>>> > >>> > >>> > >>> need to tune hypervisor quota to limit vcpu-only quota ? > >>> Sounds strange to me. > >> > >> No, current implemetion is: > >> 1. limit vcpu and hypervisor: vm is not limited > >> 2. limit vcpu only: vm is limited > >> 3. limit hypervisor: vm is not limited > >> 4. vcpu and hypervisor are not limited: vm is not limited. > >> > > > > > > In 2. > > > > vm ----- quota_is_limited > > |- hypervisor ----- quota is unlimited > > |- vcpu[0...x] ----- quota is limited > > > > Hm...vm is limited. It seems user need to tune vm's quota...can user > > makes vm's quota to be unlimited and limit *only* vpcus as Xen ? > > Without this patchset, the vm will be limited if the vcpu is limited. > We cannot know whether the hypervisor is unlimited or the user does not > set it. If the user does not set it, we should not change the behavior. > So I donot find an easy way to limit only vcpus. Can we change the implementation like these: 1. <cputune> <vcpu> <period>period</period> <quota>quota</quota> </vcpu> </cputune> Limit vcpus only, does not limit vm or hypervisor. 2. <cputune> <hypervisor> <period>period</period> <quota>quota</quota> </hypervisor> </cputune> Limit hypervisor only, does not limit vm or vcpus. 3. <cputune> <period>period</period> <quota>quota</quota> </cputune> Limit the whole vm, in this case vcpus and hypervisor are also limited. 4. <cputune> <period>period</period> <quota>quota</quota> <vcpu> <period>period</period> <quota>quota</quota> </vcpu> <hypervisor> <period>period</period> <quota>quota</quota> </hypervisor> </cputune> Limit vm, vcpus and hypervisor. I'm not sure how cpu cgroup behaves in this case, but I suppose vcpus' and hypervisor's values will not exceed vm's value. -- Thanks, Hu Tao -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list