Changes between Initial Version and Version 1 of WorkFetchMaxConcurrent


Ignore:
Timestamp:
03/25/19 21:42:50 (6 months ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WorkFetchMaxConcurrent

    v1 v1  
     1= Work fetch with max concurrent constraints =
     2
     3current:
     4{{{
     5rr sim: (pick_jobs_to_run) if project reaches a MC limit,
     6        stop picking its jobs
     7        (and take it out of the simulation)
     8        Need to do this to avoid starvation.
     9work fetch: don't fetch from a project at MC limit
     10}}}
     11
     12problem:
     13we don't buffer work for projects with MC limits
     14
     15solution:
     16{{{
     17rr sim:
     18        keep simulating project even if at MC limit
     19        keep track of MI(P,R) = max # instances used by MC projects P
     20                how many instances the project is able to use, given its MC restriction.
     21                It may be all instances.
     22        maintain "MC shortfall" MCS(R,P) for each MC project P
     23                in update_stats()
     24                        y = MI(P,R) - #devices in use by P
     25                        x = min(y, nidle)
     26                        MCS(R,P) += x*dt
     27}}}
     28allow work fetch from MC project P,
     29        but use MCS(R,P) instead of shortfall; don't request if it's zero
     30
     31examples (suppose min_buf is 3, max_buf is 6)
     32{{{
     334 device instances
     34p = project with max concurrent constraint
     35x = other projects
     36. = idle
     37}}}
     38example 1:
     39P has lots of work, and can use only 2 instances
     40{{{
     417       pp..
     426       pp..
     435       pp..
     444       pp..
     453       pp..
     462       pp..
     471       pp..
     48}}}
     49In this case shortfall is 6,
     50but we don't want to request any more work from P
     51
     52example 2:
     53p has limited work.  It can use 1 or 2 instances, depending
     54on which app versions run
     55{{{
     567       ....
     576       **..
     585       p*..
     594       p*.x
     603       p*xx
     612       pxxx
     621       ppxx
     63}}}
     64In this case the MC shortfall for P is 5 (the *'s).
     65If P had the highest scheduling priority, we'd ask it for 3 units of work.
     66After that, it wouldn't be eligible for work fetch because
     67the MC shortfall would be zero.
     68But we'd be able to ask another project for 4 units.