On Wed, 2006-02-22 at 15:03 +0530, Srivatsa Vaddagiri wrote:
> On Tue, Feb 21, 2006 at 07:24:15AM -0800, Chandra Seetharaman wrote:
> > I think Vatsa is differentiating between "hard limit"(class will not get
> > any resource and the surplus resources will be wasted) and "soft
> > limit" (class can get resource over its soft limit if there is surplus).
> 
> Yes, this is what I meant earlier.
> 
> > IMO, advantage of using "soft limit" is that it can be used as a
> > relative priority when surplus resources are to be allocated to classes.
> > 
> > For example, consider 3 classes, which are CPU hogs, with soft limits
> >         Class A 20% 
> >     Class B 25% 
> >     Class C 30%
> > and when all of them reached their soft limit(total usage 75%), the
> > remaining 25% can be divided between them proportional to their soft
> > limit. i.e
> >     Class A would get => 25 * 20/(20+25+30) ==> 6.66%
> >         Class B would get => 25 * 25/(20+25+30) ==> 8.33%
> >     Class C would get => 25 * 30/(20+25+30) ==> 10%
> 
>
> The above calculation may not be that straightforward if not everyone is
> CPU hog. Consider this case:
> 
>       Class A  20%    -> CPU Hog
>       Class B  25%    -> Not a CPU Hog
>       Class C  30%    -> Not a CPU Hog
>       Class D  25%    -> CPU Hog
> 

In my example above, i was not referring to class's respective
guarantees. I was referring to their respective usages and their soft
limits.

> The remaining in this case is 0%, yet we may have surplus cycles (because of 
> underutilization by B and C). In this case "surplus" CPU cycles that has to 
> be 

Just to clarify:

Surplus resource doesn't mean resources that are not assigned (thru
guarantee) to classes. Any resource that is not used is defined as
surplus.

By definition, amount of resource that is guaranteed to a class but not
assigned (thru guarantees) to its children is the guarantee for the
class itself (to be used by the tasks that belong to the class). In
other words, surplus resource as defined by you doesn't exist.

Consider the following example (from Documentation/ckrm/cpurc):

                              /
                                effective_guarantee
                                = 100% - 50% - 30%
                                = 20%
              +---------------+---------------+
              /A guarantee=50%                /B guarantee=30%
                 effective_guarantee             effective_guarantee
                 = 50% - 10% - 25%               = 30% - 0%
                 = 15%                           = 30%
---------------+---------------+
/C guarantee=20%               /D guarantee=50%
   effective_guarantee            effective_guarantee
  = 20% of 50% - 0% = 10%        = 50% of 50% - 0 %
  = 10%                          = 25%

You can see class /root is assigned with 20% guarantee of the resource,
and hence there is no surplus. Similarly, class A is guaranteed 15%.


> distributed b/n A & D has to be calculated dynamically. Not sure how much of 
> overhead it imposes (SMP may make it more complex because of load balance 
> issues?).
> 
> 
-- 

----------------------------------------------------------------------
    Chandra Seetharaman               | Be careful what you choose....
              - [EMAIL PROTECTED]   |      .......you may get it.
----------------------------------------------------------------------




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
ckrm-tech mailing list
https://lists.sourceforge.net/lists/listinfo/ckrm-tech

Reply via email to