# Roadmap

> Orca's resource roadmap: measuring each run's memory and CPU, admitting runs by what they need, containing an overrun to its own run and adapting in-flight work inside a run, with the issues for each step and the papers behind them.

[magmalake](https://magmalake.dev/) [Orca](https://magmalake.dev/s/orca)

The goal for resources: a run that needs more memory than expected fails alone and is retried bigger, instead of taking other runs down with it, and a pipeline on a new machine uses its cores without hand-set concurrency settings.

"Never out of memory" isn't promised. Some memory use depends on the data, such as a very large repository's clone or an unusually busy hour, and is only known while the step runs. Packing runs onto a machine optimally is a bin-packing problem; the aim is to keep the machine busy without anything being killed.

## Four layers

| Layer | What it does | Today | Next |
| --- | --- | --- | --- |
| Measure | Know what each run actually used | Nothing is recorded | [orca #200](https://github.com/magmalake/orca.mojo/issues/200) Record each run's peak memory and CPU |
| Admit | Start a run only if its request fits what's free | max\_runs counts runs, not their size | [orca #171](https://github.com/magmalake/orca.mojo/issues/171) Resource requests and grants, "auto"[orca #202](https://github.com/magmalake/orca.mojo/issues/202) Admission by memory pressure |
| Contain | An overrun hits only its own run | first\_to\_go makes a run's processes the kernel's first choice; a memory cap on control-placed runs | [orca #201](https://github.com/magmalake/orca.mojo/issues/201) A cgroup memory limit per run, retry bigger after an OOM |
| Back pressure inside a run | A job adapts how much work it keeps in flight | Hand-set: DISTA\_WORKER\_SLOTS, DISTA\_MAX\_QUEUED, DISTA\_STORE\_BYTES, and each pipeline's own settings | [dista #123](https://github.com/magmalake/dista.mojo/issues/123) Size in-flight work from the run's grant and live memory |

## Order

orca #200, then #171, then #201, then #202 and dista #123\. Each step needs the one before it: grants need measurements, containment needs grants to use as limits, and adaptive in-flight work needs both grants and the pressure signal.

## Prior art

What each of these gives the plan:

- Abhishek Verma, Luis Pedrosa, Madhukar Korupolu, David Oppenheimer, Eric Tune and John Wilkes, "Large-scale cluster management at Google with Borg", EuroSys 2015\. requests against usage, and limits. [Link](https://doi.org/10.1145/2741948.2741964)
- Krzysztof Rzadca et al., "Autopilot: workload autoscaling at Google", EuroSys 2020\. limits set from usage history, which is what "auto" means here. [Link](https://doi.org/10.1145/3342195.3387524)
- Christina Delimitrou and Christos Kozyrakis, "Quasar: resource-efficient and QoS-aware cluster management", ASPLOS 2014\. learning what a job needs instead of trusting its declaration. [Link](https://doi.org/10.1145/2541940.2541941)
- Ali Ghodsi, Matei Zaharia, Benjamin Hindman, Andy Konwinski, Scott Shenker and Ion Stoica, "Dominant Resource Fairness: fair allocation of multiple resource types", NSDI 2011\. admitting with CPU and memory together. [Link](https://www.usenix.org/conference/nsdi11/dominant-resource-fairness-fair-allocation-multiple-resource-types)
- Robert Grandl, Ganesh Ananthanarayanan, Srikanth Kandula, Sriram Rao and Aditya Akella, "Multi-resource packing for cluster schedulers" (Tetris), SIGCOMM 2014\. the same, as packing. [Link](https://doi.org/10.1145/2619239.2626334)
- Matt Welsh, David Culler and Eric Brewer, "SEDA: an architecture for well-conditioned, scalable internet services", SOSP 2001\. admission control and bounded queues. [Link](https://doi.org/10.1145/502034.502057)
- Kathleen Nichols and Van Jacobson, "Controlling queue delay", ACM Queue, 2012\. sizing in-flight work from measured delay. [Link](https://doi.org/10.1145/2208917.2209336)
- Johannes Weiner et al., "TMO: transparent memory offloading in datacenters", ASPLOS 2022\. memory pressure (PSI) as the signal. [Link](https://doi.org/10.1145/3503222.3507731)
- Viktor Leis, Peter Boncz, Alfons Kemper and Thomas Neumann, "Morsel-driven parallelism: a NUMA-aware query evaluation framework for the many-core age", SIGMOD 2014\. work in small units sized to the cores and memory available. [Link](https://doi.org/10.1145/2588555.2610507)

[A magmalake project](https://magmalake.dev/)

Apache 2.0 · © 2026 Marius Seritan
