AW: AW: AW: [GE users] resource allocation and race condition

Olesen, Mark Mark.Olesen at arvinmeritor.com
Mon Oct 18 16:52:19 BST 2004


> > Then, AFAICS, the license would be tracked as follows (here I've
> invented a
> > new 'count' attribute for 'qconf -se global' to show the internal
> > consumption):
> >
> > 0) Start - no licenses used:
> >     complex_values shpc=8
> >     load_values    shpc=8
> >     count          shpc=0
> >
> > 1) Start 6 license job via SGE:
> >     complex_values shpc=8
> >     load_values    shpc=2
> >     count          shpc=6
> >
> > 2) Start 2 license job via SGE ?
> >
> > Following the logic of host_conf(5), the quota definition (shpc=8) will
> be
> > replaced by the current load value (shpc=2).  From the 2 licenses that
> are
> > now registered as being available, *none* can be granted, since the
> internal
> > count is already at 6!
> 
> What is your definition of count in the complex and and global
> definition? If it's a consumable it should count down, not up. - Reuti

For convenience of discussion, I introduced 'count' to indicate what I
presume the internal bookkeeping is doing to track the allocated resources.
For a process to start, the allocated and the requested resources must be
less-than-equal the resource quota.  The resource quota is the minimum of
the complex_values and load values.

Thus, as an expression:
   count + request <= Resource_Quota = min(complex_values, load_values)

Revisiting my example:
0) Start - no licenses used:
   count = request = 0
   Resource_Quota = complex_values = load_values = 8

1) Start 6 license job via SGE:
   count = 0
   request = 6
   Resource_Quota = complex_values = load_values = 8
   count (0) + request (6) <= Resource_Quota (8) is TRUE

... some time elapses ... 
2) Start 2 license job via SGE:
   count = 6
   request = 2
   Resource_Quota = min(complex_values, load_values) = 2
   count (6) + request (2) <= Resource_Quota (2) is FALSE


SGE cannot start the new job, since the current state (count = 6) already
exceeds the new quota (2) that has been altered via the load sensor.

Or is it possible that the internal bookkeeping is actually cleared when a
quota is adjusted via a load report?

/mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list