---
title: 'SmartFill: Optimal Scheduling Under Concave Speedups'
url: https://www.emergentmind.com/topics/smartfill-algorithm
type: topic
---

# SmartFill: Optimal Scheduling Under Concave Speedups

SmartFill is an optimal scheduling algorithm for parallel jobs under general concave speedup functions. It addresses the problem of allocating a total resource budget \(B\) across \(M\) jobs with sizes \(x_i\), where allocating more resources to a job accelerates its completion but with diminishing returns, and the objective is to minimize a weighted sum of job completion times, \(J=\sum_{i=1}^M w_i T_i\). The algorithm is developed in the context of a previously open problem: prior work, heSRPT, solved only some specific speedup functions with an exponential form, whereas SmartFill is designed for arbitrary concave speedup functions and combines a structural optimality condition, the Consistent Derivative Ratio (CDR) Rule, with the General Water-Filling (GWF) method to compute optimal allocations [2509.01811].

## 1. Problem setting and optimization objective

The SmartFill framework considers \(M\) jobs with sizes \(x_i\), a speedup function \(s(\theta)\), and a total resource budget \(B\). The speedup function is assumed to be strictly increasing, strictly concave, and smooth. At each time \(t\), the scheduler assigns a fraction \(\theta_i(t)\) to each job \(i\), subject to the feasibility constraint
\[
\sum_i \theta_i(t) \leq B.
\]
The optimization target is to minimize the weighted sum of job completion times,
\[
J=\sum_{i=1}^M w_i T_i,
\]
where \(T_i\) denotes the completion time of job \(i\) [2509.01811].

This formulation captures the setting in which additional computation resources improve performance but only with diminishing returns. The paper positions this as a fundamental problem in cloud and edge computing systems for AI-based applications. A plausible implication is that the model is intended to cover workloads whose parallel scaling behavior is not well approximated by a single power-law or exponential family, which motivates the move from heSRPT to a method that works for arbitrary concave speedup functions.

## 2. Consistent Derivative Ratio rule

The central structural result underlying SmartFill is the Consistent Derivative Ratio Rule. For the optimal allocation \(\theta_i^*(t)\), for any two active jobs \(i\) and \(j\), the ratio of the derivatives of the speedup functions remains constant in time:
\[
\frac{s'\left(\theta_i^*(t)\right)}{s'\left(\theta_j^*(t)\right)}=c_{i,j},
\]
for some constant \(c_{i,j}\), over all times at which both jobs receive a positive allocation. The associated corollary states that there exist constants \(c_1,c_2,\dotsc,c_M\) such that
\[
\frac{s'\left(\theta_i^*(t)\right)}{s'\left(\theta_j^*(t)\right)}=\frac{c_i}{c_j}.
\]
In words, the relative marginal gain of resource across jobs is pinned throughout the scheduling [2509.01811].

The CDR Rule significantly reduces the search space for optimal schedules because only policies satisfying this property need to be considered. It also changes the qualitative picture of optimal scheduling outside the heSRPT regime. For non-power-law speedups, it may be optimal to give zero resource to some jobs at some times, rather than allocating resources to all active jobs. This is one of the main conceptual distinctions between SmartFill and heSRPT.

A common misconception, inherited from intuition built around heSRPT, is that an optimal scheduler should always allocate positive resources to every active job. The SmartFill analysis rejects that conclusion in the general concave case. Specifically, when \(s'(0)<\infty\), the optimal policy can set some \(\theta_i\) to zero during some time windows. This selective behavior is not a heuristic add-on; it follows from the derivative-ratio structure and the zero-allocation thresholds built into the constrained allocation problem [2509.01811].

## 3. General Water-Filling method

To operationalize the CDR Rule, the paper introduces the General Water-Filling method. GWF solves a constrained allocation problem for \(k\) jobs with constants \(c_1 \geq c_2 \geq \cdots \geq c_k > 0\), seeking allocations \(\theta_1,\ldots,\theta_k\) with total resource \(b\) such that
\[
\sum_{i=1}^k \theta_i=b,
\]
\[
\theta_1 \leq \theta_2 \leq \cdots \leq \theta_k,
\]
and, for \(i<j\), if \(\theta_j,\theta_i>0\),
\[
\frac{s'(\theta_j)}{s'(\theta_i)}=\frac{c_j}{c_i},
\]
while if \(\theta_i=0\) and \(\theta_j>0\),
\[
\frac{s'(\theta_j)}{s'(0)}\geq \frac{c_j}{c_i}.
\]
These conditions encode both the CDR property and the threshold behavior associated with zero allocation [2509.01811].

The method introduces a suitable auxiliary strictly decreasing function \(g(h)\), and defines for each job
\[
\theta_i(h)=
\begin{cases}
0 & \text{if } c_i g(h)\geq s'(0),\\
s'^{-1}\!\left(c_i g(h)\right) & \text{if } s'(b)<c_i g(h)<s'(0),\\
b & \text{if } c_i g(h)\leq s'(b).
\end{cases}
\]
The total allocated resource is then
\[
\beta(h)=\sum_{i=1}^k \theta_i(h),
\]
and the water level \(h\) is chosen so that \(\beta(h)=b\) [2509.01811].

The paper’s intuition is that the procedure is like pouring water into non-identical bottles, each bottle’s shape determined by \(s'^{-1}\) and the \(c_i/c_j\) tradeoff, raising the level \(h\) until the total water meets the resource limit. In algorithmic terms, one selects \(g(h)\) so that \(s'^{-1}\) is tractable and \(g(h)\) is strictly decreasing, evaluates \(\theta_i(h)\), computes the sum, and adjusts \(h\), for example via bisection, until the sum matches \(b\). For non-regular cases, each constrained allocation subproblem can be solved in \(O(k\cdot \log(1/\epsilon))\) time, where \(k\) is the number of jobs and \(\epsilon\) is the search granularity [2509.01811].

## 4. SmartFill algorithm and schedule representation

SmartFill builds a full schedule recursively from constrained allocation subproblems. The schedule is divided into phases: phase \(j\) is between the \((j+1)\)-th and \(j\)-th job completing. In phase \(j\), the set of active jobs is \(\{1,\ldots,j\}\), with allocations \([\theta_1^j,\ldots,\theta_j^j]\). The schedule is represented as an upper-triangular matrix \(\Theta\) [2509.01811].

Initialization begins with the last-job case:
\[
\theta_1^1=B,\qquad c_1=1,\qquad a_1=\frac{w_1}{s(B)}.
\]
The algorithm then iterates upward for \(k=1,\ldots,M-1\). First, it determines the allocation for the next job:
\[
\theta_{k+1}^{k+1}
=
\arg\max_{\mu}
\frac{\sum_{i=1}^{k+1} w_i-\sum_{i=1}^k a_i s(\mathrm{CAP}_i(B-\mu,c_1,\ldots,c_k))}
{s(\mu)}.
\]
Second, it allocates the remaining budget to jobs \(1,\ldots,k\):
\[
\theta_i^{k+1}
=
\mathrm{CAP}_i(B-\theta_{k+1}^{k+1},c_1,\ldots,c_k).
\]
Third, it updates the constants
\[
c_{k+1}=
\frac{s'(\theta_{k+1}^{k+1})}{s'(\theta_k^{k+1})}c_k,
\]
and
\[
a_{k+1}
=
\frac{\sum_{i=1}^{k+1} w_i-\sum_{i=1}^k a_i s(\theta_i^{k+1})}
{s(\theta_{k+1}^{k+1})}.
\]
This procedure is repeated until all jobs are allocated [2509.01811].

The paper also presents the following pseudocode:

```plaintext
Algorithm: SmartFill
Input: s(θ), B, M, x_i, w_i
Output: Allocation schedule Θ = [θ_i^j]

1. θ_i^j = 0 for all i > j
2. Set θ_1^1 = B, c_1 = 1, a_1 = w_1 / s(B)
3. For k = 1 to M-1 do:
    (a) Compute θ_{k+1}^{k+1} by solving:
        maximize over μ:
        [sum_{i=1}^{k+1} w_i - sum_{i=1}^k a_i s(CAP_i(B - μ, c_1,...,c_k))] / s(μ)
    (b) For i = 1 to k:
        θ_i^{k+1} = CAP_i(B - θ_{k+1}^{k+1}, c_1,...,c_k) via GWF
    (c) c_{k+1} = [s'(θ_{k+1}^{k+1}) / s'(θ_k^{k+1})] * c_k
    (d) a_{k+1} = [sum_{i=1}^{k+1} w_i - sum_{i=1}^k a_i s(θ_i^{k+1})] / s(θ_{k+1}^{k+1})
```

Its total complexity is \(O(M^2\log(1/\epsilon))\), because there are \(O(M)\) phases and each CAP is \(O(M\log(1/\epsilon))\) [2509.01811].

## 5. Regular and non-regular speedup functions

The paper distinguishes between regular and non-regular speedup functions. A speedup is regular if
\[
s'(\theta)=\alpha(\theta+z)^\gamma
\]
for constants \(\alpha\neq 0\), \(\gamma\neq 0\), and \(z\in\mathbb{R}\). Common cases include \(s(\theta)=a\theta^p\), \(0<p<1\), for which \(s'(\theta)=ap\theta^{p-1}\), and \(s(\theta)=\log(p\theta+1)\). In the regular case,
\[
s'^{-1}(y)=\left(\frac{y}{\alpha}\right)^{1/\gamma}-z.
\]
As a result, \(\theta_i(h)\) becomes a piecewise-linear, affine function of \(h\), and the water-filling step reduces to solving a piecewise-linear equation, which yields a closed-form solution [2509.01811].

For \(s(\theta)=\theta^p\), the solution coincides with heSRPT. This establishes that SmartFill contains the heSRPT allocation pattern as a special case rather than replacing it with an incompatible construction. The paper also states that closed-form solvability generally occurs when \(s'^{-1}\) and the corresponding sum equations are algebraically tractable, including polynomial, exponential, or log-like regular forms [2509.01811].

For non-regular functions, the GWF framework still applies. When \(s'^{-1}\) has no closed form, as with composite or more complex concave functions, the method uses numeric search, for example bisection on \(h\), and each evaluation computes \(\theta_i(h)\) numerically if necessary. This suggests that the main divide in the framework is not one of optimality but one of symbolic tractability: regular forms admit closed-form algebraic schedules, while non-regular forms require numerical inversion and search.

## 6. Selective allocation, relation to heSRPT, and reported results

The most visible operational difference from heSRPT is selective resource allocation. For \(s(\theta)=\theta^p\) with \(p<1\), heSRPT always allocates positive resource to every job at all times because \(s'(0)=\infty\), so it is never optimal to starve a job. By contrast, SmartFill can, and will, set some \(\theta_i\) to zero during some time windows when \(s'(0)<\infty\), because allocating resource to those jobs would not yield sufficient benefit under the CDR Rule [2509.01811].

The paper reports both theoretical and numerical results. SmartFill exactly matches heSRPT when \(s(\theta)=a\theta^p\). It is stated to be optimal for all regular and, numerically, for non-regular cases, with no optimality gap. In general concave \(s\), SmartFill yields lower mean slowdown and completion times than approximate heSRPT extensions because it can focus resources better [2509.01811].

The numerical examples given in the paper include two explicit comparisons at \(M=100\) jobs. For \(s(\theta)=\log(1+\theta)\), SmartFill reduces mean slowdown by \(13.6\%\). For \(s(\theta)=\sqrt{4+\theta}-2\), it produces a \(6.3\%\) lowering compared to “heSRPT with best-fit \(a\theta^p\)” [2509.01811].

The paper further states that the CDR Rule is conjectured to apply to even more general settings, including different speedup per job and time-varying resources, although SmartFill as presented applies only to the uniform, fixed-resource, uniform speedup case. This conjecture is explicitly framed as a generalization rather than a proved extension.

## 7. Significance and interpretive context

Within the paper’s framing, SmartFill generalizes prior solutions by providing an optimal method for arbitrary concave speedup functions rather than only for special functional forms. It also preserves closed-form solutions when possible and remains computationally efficient through a polynomial-time numerical procedure when closed form is unavailable. Its computational profile is summarized as numerically robust with complexity \(O(M^2\log(1/\epsilon))\) [2509.01811].

The key conceptual contribution is the synthesis of three ingredients: the CDR Rule as a structural characterization of optimal schedules, GWF as the mechanism for solving the constrained allocation problem implied by that structure, and the recursive SmartFill construction that assembles phase-by-phase optimal allocations. This suggests a unifying perspective in which parallel scheduling under concave speedup is governed by relative marginality rather than by unconditional sharing across all active jobs.

A further implication is methodological. Because SmartFill selectively concentrates resource when the speedup curve does not strongly favor “everybody gets a bit,” it replaces a blanket all-jobs-active intuition with a thresholded marginal-gain criterion. In that sense, its significance lies not only in extending the range of admissible speedup functions, but also in changing the qualitative form of optimal schedules under finite \(s'(0)\) [2509.01811].

Source: https://www.emergentmind.com/topics/smartfill-algorithm