[Swift-devel] coaster update

Mihael Hategan hategan at mcs.anl.gov
Thu Aug 27 12:58:51 CDT 2009


Cog r2453 contains a few updates:
- there was a busy spin in some cases in the worker queue processing;
this should be gone and a new log message should be printed every 10
seconds that says how much that particular thread worked and how much it
sleeped
- there's a new option (wrongly) called "parallelism". 

Short: parallelism = 0 means attempt to maximize parallelism,
parallelism = 1 means old behavior (if the workers can eventually run
all the jobs, don't request new ones)

Long: a bit of detail about the scheduling problem:

Coaster blocks are a bunch of 2d boxes. They have a width (number of
workers) and a height (walltime). Jobs are pretty much the same, except
they have a width of 1. The problem is that of "ordering" boxes subject
to some constraints (e.g. widths can only be a multiple of a certain
number, only n boxes can be had at one time, etc.) and fitting the jobs
into the boxes.

In order to amortize the queuing cost, boxes need to be a few times
taller then the jobs, so that one can eventually stack multiple jobs on
top of each other in boxes.

The allocator looks at the current amount of jobs, the current boxes and
the constraints to figure out whether to order more boxes and what sizes
those boxes should be. It won't order more boxes if the jobs fit. So
that brings us to the notion of size. It used to be that the size metric
was w*h, so a sufficiently tall box would fit multiple jobs by itself.
It was pointed out that while this is ok, it may be desirable to try to
maximize parallelism, such that it is at least attempted to get boxes
that would only have one stack of jobs. But this is pretty much the same
as saying that the "size" of a box is now w (rather than w*h) and the
size of a job is 1.

So there comes the parallelism option which dictates what the size of a
box and a job are, using sz = w * h^parallelism. If parallelism = 1,
size = w*h; if parallelism = 0, size = w.

The name "parallelism" is obviously wrong. If anybody feels like making
it size = w*h^(1-parallelism) and or changing the name to something more
sensible, feel free to do so.




More information about the Swift-devel mailing list