[pipelines.gharchive]
cpus = "1..16" # or a count, 4: MIN = MAX
memory_gb = "2..24" # GB, decimals allowed: "0.5..2"
# or "auto", "auto..24": learned from its runs (orca.recommend)
Requests. A pipeline asks for a range of CPUs and memory in orca.toml
([defaults] or its own table) or with orca register --cpus and
--memory-gb. Either can be left out. A pipeline with neither is started
as before: no admission check, no grant.
Admission. On the local runner and for control-placed runs, the
scheduler starts a run of a pipeline with a request only if its minimum
fits in what this host's running runs haven't been granted: the host's
CPUs and memory (host_capacity: cgroup limits if set, else
/proc/meminfo and the cores; sysctl on macOS; ORCA_HOST_CPUS and
ORCA_HOST_MEMORY_MB override both), less a reserve for the scheduler,
Postgres and the UI (ORCA_RESERVE_CPUS, 1, and ORCA_RESERVE_MEMORY_MB,
1536), less the grants of the runs going there. Otherwise the run waits,
queued, held with why (WAITING...): "waiting: needs 2 GB, 1.3 GB free of
grants". Runs without a request take no part: they're neither checked nor
counted. max_runs and fill_max_runs stay as caps on top; with
max_runs = "auto" (#266) the grants alone decide how many run at once, up
to its ceiling, and a pipeline with no request to weigh starts one at a time.
Grants. A run that starts gets up to its maximum from what's left,
fixed for that start's life, in ORCA_GRANT_CPUS and
ORCA_GRANT_MEMORY_MB, and recorded on the run (orca.runs.grant_cpus,
grant_memory_mb, with the request it had). A remote worker (orca worker) admits the runs it takes the same way against its own host, with
the same variables (its reserve defaults to 0 CPUs and 512 MB).
Learned requests. cpus and memory_gb may be auto, or have auto
as a range's lower end ("auto..24"): what the pipeline's runs suggest
(orca.recommend), at most the range's maximum, resolved each time a run
starts (resolve_request); without one, no request of that resource.
Request.of reads auto as cpus_auto or memory_auto with a minimum of
0 and the maximum given (0 for none).
"auto" in env. An env value "auto" is passed to the run as it
is, for the pipeline to size itself from the grant (auto_count), except
DISTA_WORKER_SLOTS, which dista reads as a number: orca gives it the
grant's CPUs over the run's local dista workers (ORCA_WORKERS), at least
1, or 0 (dista's one per core) for a run without a CPU grant.