[Devel] Re: [RFC] CPU hard limits

Balbir Singh balbir at linux.vnet.ibm.com
Thu Jun 4 22:10:50 PDT 2009


* Balbir Singh <balbir at linux.vnet.ibm.com> [2009-06-05 12:49:46]:

> * Avi Kivity <avi at redhat.com> [2009-06-05 07:44:27]:
> 
> > Balbir Singh wrote:
> >> On Fri, Jun 5, 2009 at 11:33 AM, Avi Kivity <avi at redhat.com> wrote:
> >>   
> >>> Bharata B Rao wrote:
> >>>     
> >>>>> Another way is to place the 8 groups in a container group, and limit
> >>>>>  that to 80%. But that doesn't work if I want to provide guarantees to
> >>>>>  several groups.
> >>>>>
> >>>>>         
> >>>> Hmm why not ? Reduce the guarantee of the container group and provide
> >>>> the same to additional groups ?
> >>>>
> >>>>       
> >>> This method produces suboptimal results:
> >>>
> >>> $ cgroup-limits 10 10 0
> >>> [50.0, 50.0, 40.0]
> >>>
> >>> I want to provide two 10% guaranteed groups and one best-effort group.
> >>>  Using the limits method, no group can now use more than 50% of the
> >>> resources.  However, having the first group use 90% of the resources does
> >>> not violate any guarantees, but it not allowed by the solution.
> >>>
> >>>     
> >>
> >> How, it works out fine in my calculation
> >>
> >> 50 + 40 for G2 and G3, make sure that G1 gets 10%, since others are
> >> limited to 90%
> >> 50 + 40 for G1 and G3, make sure that G2 gets 10%, since others are
> >> limited to 90%
> >> 50 + 50 for G1 and G2, make sure that G3 gets 0%, since others are
> >> limited to 100%
> >>   
> >
> > It's fine in that it satisfies the guarantees, but it is deeply  
> > suboptimal.  If I ran a cpu hog in the first group, while the other two  
> > were idle, it would be limited to 50% cpu.  On the other hand, if it  
> > consumed all 100% cpu it would still satisfy the guarantees (as the  
> > other groups are idle).
> >
> > The result is that in such a situation, wall clock time would double  
> > even though cpu resources are available.
> 
> But then there is no other way to make a *guarantee*, guarantees come
> at a cost of idling resources, no? Can you show me any other
> combination that will provide the guarantee and without idling the
> system for the specified guarantees?

OK, I see part of your concern, but I think we could do some
optimizations during design. For example if all groups have reached
their hard-limit and the system is idle, should we do start a new hard
limit interval and restart, so that idleness can be removed. Would
that be an acceptable design point?

-- 
	Balbir
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list