You submit a ten-second lint run on source files you haven't modified since the last time you linted them. It waits in line, then runs again anyway.
If you've worked in HPC, ML model training, or chip design, you are very familiar with this flow: write a job, submit it to a batch scheduler like Slurm or IBM's LSF, and wait your turn. For a six-hour regression, this makes sense. As a default compute mechanism, it is a strange paradigm.
This post is about what batch schedulers are built for, what they are not great at, and why the interactive dev loop (increasingly with agents in it) wants something else, ideally without giving up the scheduler underneath.
Why Do We Need Schedulers at All?
If you've built or run web services, your first instinct for spreading work across machines probably doesn't involve a scheduler. You put work on a queue (or behind a load balancer), run a pool of identical workers, and let each one take the next item. That design is simple, scales by adding workers, and powers a huge amount of production software.
It works because the work is interchangeable. Requests are small and similar, every worker can handle any of them, and a bad assignment costs milliseconds. "Scheduling" reduces to picking any free worker.
A queue and identical workers is enough when any worker can take any job. When jobs are shaped differently, something has to match each job to the right machine.
Suppose one job needs 3 EDA tool licenses and a lot of memory, another needs 10 GPUs, another runs for six hours, and several teams are competing for the same machines. Handing the next item to whichever worker is free no longer works: it might not have the memory, or the licenses might not be available. (An EDA license is a token that a tool checks out from a license server when it starts and returns when it finishes. They are expensive, so companies buy a limited number of them.)
The natural fix is to stretch the design. You could run one pool of workers per job type: a high-memory pool, a GPU pool, a licensed pool, each with its own queue. Or you could keep one pool and parametrize the workers, so each advertises what it has (memory, GPUs, licenses), each job states what it needs, and the queue only hands a job to a worker that matches. Remote execution backends for build systems do a version of this, routing actions to worker pools by platform properties.
This gets you surprisingly far, but you end up rebuilding a scheduler piece by piece. Well, what if some jobs are more urgent than others? Add in a concept of priorities! What if one team keeps crowding out everyone else? Just add fair-share (and a way to keep low-priority jobs from starving)! What if an urgent job arrives when everything is busy? That's what preemption is for! The list goes on and on...
Your operating system solves a similar problem on one machine: more runnable threads than cores, and a scheduler that decides what runs where, for how long, and what gets bumped. Distributed work needs the same kind of decision-maker, with one big difference: moving work is slow. Getting binaries and data onto a machine takes seconds or minutes, not microseconds, and preempting a job often means killing and requeuing it. That, more or less, is how I think of a scheduler: it decides which job goes on which machine, in what order, and what happens when there isn't enough to go around.
What Batch Schedulers Are Built For
Batch schedulers like LSF and Slurm are the classic answer to this problem: you describe each job by what it needs, submit it to a queue, and the scheduler runs it when those resources free up. LSF, being more than 30 years old (wow!), was built for coarse-grained, long-running jobs like EDA regressions and scientific simulations, scheduled onto vertically-scaled machines with hyperspecific requirements (CPU cores, memory, GPUs, software licenses). They are perfect for that: the scheduler turns each job's requirements into a set of properties and uses complex algorithms to maximize job throughput and machine load.
Picture a data center running LSF or Slurm: one node runs a job that needs EDA tool licenses and high memory, the next one needs GPUs, and so on. Zoom out and the scheduler is continuously repacking a fleet of uniquely shaped jobs.
This is perfect if you:
- • Truly take advantage of the complex scheduling capabilities being provided: each job correctly identifies what it needs and with what priority. The scheduler is only as good as those declarations. Over-request memory and it can't pack the machine; under-request and the job may fail.
- • Prioritize throughput (number of jobs executing and moving through the queue) over latency (this interactive user build is going to run quickly). A batch scheduler is happy to make a job wait if that keeps every machine and license busy, which is a good trade for a six-hour run and a bad one for a ten-second one.
- • Have a low cardinality of job types and resource queues, making it easier for the scheduler to fill a fixed number of partitions. In LSF, a queue carries a scheduling policy that every job in it shares, so a few well-chosen queues (short, long, GPU) keep things simple for the scheduler, while hundreds of one-off queues and job shapes give it far more to juggle.
Some workloads fit that profile. The core dev loop is the opposite: builds, lints, and smoke tests are short, repetitive, and care about latency more than throughput.
The Cost of Scheduling Complexity
Those first two properties are pretty costly :(. Matching many differently shaped jobs against many resource constraints (cores, memory, licenses, GPUs) is a multi-dimensional packing problem (formally, vector bin packing), which is NP-hard in the general case. So real schedulers don't search for an optimal placement; they run periodic scheduling passes with heuristics and bounded look-ahead (e.g. the Tetris scheduler). Every queue, resource requirement, reservation, and preemption rule adds work to that pass, and every job in the system pays for it whether or not it uses the feature.
That cost shows up as queue time and scheduling overhead: the gap between a job being ready to run and actually starting. For a four-hour regression, a few seconds of dispatch latency is invisible. For a lint run or a smoke test that takes ten seconds, it is the whole job. And the schedulers' own tuning guides describe the tradeoff directly: LSF's docs note that a lower scheduling interval gets jobs scheduled faster but leaves the master daemon less time to respond to users, and Slurm's scheduling guide warns that a longer backfill look-ahead means more overhead and less responsiveness.
This is the pain developers feel when they try to use a batch scheduler for everyday work. A simple interactive job waits in line before it even starts. Or the queue backs up because of poor scheduling, say a few huge jobs sitting ahead of the quick ones, and everything behind them stalls. From the developer's perspective, none of that looks like a hard packing decision. It just looks like the tool is slow.
The Sparrow paper from Berkeley makes this point sharply for very short tasks. With 100ms tasks, it argues, any scheduling delay beyond tens of milliseconds is intolerable, and a centralized scheduler can't make the million-plus decisions per second a large cluster needs, so Sparrow gives up many sophisticated scheduling features in exchange for throughput and latency. Its tasks are much shorter than what batch schedulers deal with, but the tradeoff has the same shape: the richer the scheduling model, the more each job pays in waiting time.
Case Study: Hardware Regressions
Let's take the case of hardware regressions. A regression is a large suite of tests that gets run regularly as the design evolves, to check that changes haven't broken anything that used to work (and, with randomly seeded runs, to keep hunting for new bugs). For a chip, each test means taking the design's source code (written in RTL, a hardware description language) plus a test harness, building them into an executable that simulates the chip, and then running that simulation on an input, which may be fixed or randomly seeded. All of the deterministic parts (compiling and running the non-random tests) can be cached by a modern build system. That leaves the randomly seeded runs, which make up most of the compute in a big regression, as the part that really needs a batch scheduler.
RTL designers (who write the chip's logic) and design verification (DV) engineers (who write the tests that check it) share the same loop: check out the design, make a change, build a simulation model, run smoke tests, and push, over and over, with CI repeating it on every push.
Nearly everything in that loop is a pure function of its inputs (the RTL, the testbench, the tool version, and the flags), which is exactly what content-addressed caching is good at. My former colleague Varun Koyyalagunta wrote up how this played out at Tenstorrent in Using a modern software build system to speed up complex hardware design: smoke runs that took over an hour from scratch dropped to about 3 minutes on a full remote cache hit, and a full hit doesn't check out a simulation license at all.
Top: an illustrative action graph for a small Verilog design. Each file is analyzed, VCS builds the simv binary, and tests run it. Each action is a pure function of its inputs. Bottom: BuildBarn, one open source backend that runs those actions on workers and caches the results. I describe how it works in So, What is a Build System Anyway?
If we view the hardware regression as a pipeline of mostly cacheable steps, we can break it up into smaller pieces, only some of which really need to run in a high-throughput, complex-resource environment.
A regression broken into pieces. If only unit A changed, only its branch re-runs, on persistent workers, while unit B's work is a cache hit. The large seeded runs are the part that still belongs on a batch scheduler.
This only pays off if the flow decomposes this finely. With one monolithic compile, any RTL edit invalidates everything and the cache buys you nothing, which is why things like partition compile and per-block elaboration matter.
Coincidentally enough, build systems also do extremely well when you have a low cardinality of scheduling complexity (the extreme case being that all workloads are the same size, or at the very least, can be chunked into groups like small, medium, and large). You have persistent workers that are able to instantly take your DAG of well-specified task dependencies, distribute it across a fleet of workers, and aggressively cache the results at every granularity of the DAG for subsequent builds.
Breaking the regression into pieces with different performance requirements gets you both: high throughput for the slow, expensive jobs, and fast turnaround for the interactive ones in the developer's (or possibly agent's) iterative development loop.
An illustration of the effect. Before, every job is a different shape and the scheduler is repacking a high-cardinality fleet. After, short cacheable actions move to uniform persistent workers, and the batch fleet is left with mostly one shape plus a few special cases.
That is the part that matters for the scheduler. Once the short, cacheable work is gone, the batch fleet sees a few repeated shapes instead of a different one for every job, which is the low-cardinality case batch schedulers are good at.
Doing This Idiomatically in LSF
Now, it is true that LSF and Slurm have features for expressing this kind of structure.
Here is an example of how you could translate your EDA regression into an "idiomatic" representation in LSF (job arrays, job groups, and job dependencies).
regress.sh (LSF)
# 0. Create the group first (limits can't be set on auto-created groups)
bgadd -L 500 /regress/$COMMIT
# 1. Build the simulatable executable
bsub -J build_simv -g /regress/$COMMIT -q build -n 8 \
-R "rusage[mem=64000, vcs_lic=1]" \
./build_simv.sh $COMMIT
# 2. Fan out seeded tests (default array max is 1000; raise MAX_JOB_ARRAY_SIZE for more)
bsub -J "sim[1-1000]%200" -g /regress/$COMMIT -q regress \
-w "done(build_simv)" \
-R "rusage[mem=16000, vcs_lic=1]" \
./run_test.sh \$LSB_JOBINDEX
# 3. Merge coverage once all elements have finished, pass or fail
bsub -J merge_cov -g /regress/$COMMIT -q merge \
-w "ended(sim)" \
./merge_coverage.sh $COMMIT
A regression expressed idiomatically in LSF: a job group to cap concurrency, an array of seeded runs, and job dependencies between stages. Queue names and the vcs_lic resource are illustrative.
This works, and for the big regressions it is the right shape: a big array of seeded runs, all the same shape, is exactly what job arrays are for. I wouldn't argue with that.
But at a certain point, you are essentially building a DAG overlay on top of batch-scheduled jobs, with the consequence that all of your
scheduling SLAs are satisfied by someone else's scheduling algorithm. And now you have to deal with the full complexity of batch jobs, random issues included: a host goes down, a license isn't free, a job gets preempted. And nothing knows that build_simv already ran on the same RTL, so skipping the rebuild means writing a hash check and a
cache directory into the wrapper script, which is a small build system written in bash.
It is fair to ask whether this is just a tuning problem. LSF has interactive queues, bsub -I, preemption, and slot reservation,
all aimed at the latency-sensitive case, and they do help. But they still run through the same scheduler, so they are part of the tradeoff
above, not an escape from it. Arrays and job groups reduce per-job overhead and let you cap load, which is a real improvement, but they only make it cheaper to run
many similar jobs. They can't tell you which of those jobs you didn't need to run (build/test caching).
A Hybrid Approach
The trick is to keep work out of the batch scheduler that doesn't need to be there. The seeded regression runs stay. The short, cacheable, latency-sensitive rest goes to the build system, whose persistent workers are just the queue-and-identical-workers design from the start of this post.
There are a few ways to wire the two together:
- • Translate each action into a scheduler request. Simple, but every action pays dispatch cost.
- • Run the workers as batch jobs, known as "pilot jobs". The scheduler hands machines and licenses to warm workers once, and the build system feeds them actions directly.
- • Run the build system on its own fleet, with the batch scheduler only for the big regressions. No dispatch latency, but a separate pool of machines.
As always, there is no free lunch. A big example of a challenge that arises is license management: in LSF, the LIM and its external-resource scripts (ELIM) are how the scheduler knows which seats are free, including ones it didn't dispatch. Remote build execution needs another mechanism (e.g. plugging into the ELIM). I'm curious how each plays out for hardware flows.
Why This Is a Strange Default
Batch schedulers are a beneficial abstraction for the big jobs. But most developers spend their time iterating, where low latency matters, and if batch is your default for everything, you end up pushing the scheduler to its limit just to partition machine quota. It is no longer 1992, so we can afford to stop trying to squeeze the mainframe for slots!