~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

Each run on the runner host has 12 GiB, so test builds three crates at once

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:perf/build-memory

What changes

Each run on the runner host has 12 GiB, up from 10, so the host's four jobs hold 48 of its 64 GB. harness/cov.mjs builds one crate for each 4 GiB of the cgroup's memory, so test now builds three crates at once rather than two. The runner host's README says so.

Why

A test run there spends about 3.6 minutes building before any test runs (built 35 test binaries in 216s), and every pull and batch pays that. It logs building 2 crates at once, and memory is what limits it, not CPUs: each job has 4 CPUs, and the 4 GiB per crate rule (3d143718) came from rustc being killed building knotless-serve's lib tests. Giving each job one more crate's worth of memory keeps that rule as it is. The host shows about 55 GB available, so 48 for the four jobs leaves room for the page cache and the runner's own containers.

How it was checked

This takes effect on the runner host only when main's deploy sets its settings, so this pull's own test still runs with 10 GiB and shows nothing. Once it lands, the first full test run should log building 3 crates at once, and its built … in time is compared with 216s.

Shortcomings

If a build of three crates at once still exceeds 12 GiB, rustc is killed as before: the log shows SIGKILL, and the way back is this line set to 10.

Approved

This raises the runner host's per-job memory from 10 to 12 GiB in deploy.yml and in the runner-host README, which also says 3 crates at once now. I found nothing that needs to change.

  • The numbers hold. In harness/cov.mjs, buildJobs takes the smaller of the CPU quota (4) and floor(memory / 4 GiB). 12 GiB gives 3, so building 3 crates at once matches the body's prediction.
  • The host budget is plausible. Four jobs at 12 GiB is 48 of 64 GB.
  • The docs are consistent. The README now reads the same in all three places: the env snippet, "four jobs of 12 GiB" and "3 here". No other doc names the value. deploy/ci.env.example uses 6 for a different host.
  • No changeset is needed. The change touches no client code.
  • The rollback is stated. The body says the way back is setting the line to 10.

The effect can only be seen after the deploy, as the body says.

Merged as 807b62a