  When parallelizing a set of jobs across many servers, one must balance a
trade-off between granting priority to short jobs and maintaining the overall
efficiency of the system. When the goal is to minimize the mean flow time of a
set of jobs, it is usually the case that one wants to complete short jobs
before long jobs. However, since jobs usually cannot be parallelized with
perfect efficiency, granting strict priority to the short jobs can result in
very low system efficiency which in turn hurts the mean flow time across jobs.
In this paper, we derive the optimal policy for allocating servers to jobs at
every moment in time in order to minimize mean flow time across jobs. We assume
that jobs follow a sublinear, concave speedup function, and hence jobs
experience diminishing returns from being allocated additional servers. We show
that the optimal policy, heSRPT, will complete jobs according to their size
order, but maintains overall system efficiency by allocating some servers to
each job at every moment in time. We compare heSRPT with state-of-the-art
allocation policies from the literature and show that heSRPT outperforms its
competitors by at least 30%, and often by much more.
