chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
The prod host swaps under pressure, and its runner's runs are capped
Merged Approved
This caps the prod runner at --queue --jobs 2 --cpus 3 --memory 6 in deploy.yml, and setup.sh now adds an idempotent 4 GB swap file with swappiness 10. The README and the script header are updated to match. I checked that --jobs, --cpus and --memory are real flags in knotless-run's lib.rs. The swap block is guarded so a second run changes nothing, and it adds the fstab entry only once. I found nothing that must change.
The 6 GiB / 3 CPU figure is an estimate, and the description says so. Its fallback is to raise memory to 7 if a batch's test is killed. I have not run the script.
All checks have passed
9 passed, 1 skipped
Merged as 43d7520
What changes
The prod host's runner runs two jobs of 3 CPUs and 6 GiB.
deploy.ymlgives it--queue --jobs 2 --cpus 3 --memory 6rather than--queuealone, which left it the default four jobs with no limits.harness/cov.mjsalready sizes cargo's jobs from the container's limits, so atestbuilds within them. A run that goes past its memory now fails its step, not the host.setup.shgives a host a 4 GB swap file, with swappiness 10, so it is used only under pressure. Running it again leaves it as it is.Why
Prod stalled for several minutes today and had to be reset from Hetzner. The queue's batch and two queued pulls' pre-flight
testruns went at once on the host that serves knotless.dev. One coveragetestuncapped takes about 9.4 GiB and 7.5 of its 8 cores, and the host has 16 GB with no swap. With three running, it ran out of memory and kept dropping and rereading its programs from disk: 1.1 GB/s of reads while network traffic fell to nothing, and SSH timed out too.deploy.yml's comment assumed only main's own runs happen here, but a queued pull's pre-flights run here too. Two capped jobs hold CI to 6 cores and 12 GB, leaving serve, pages and the bots 2 cores and about 4 GB. They use about 1 GB. Swap is the margin for the rest.How it was checked
Both are already on prod by hand: the swap file is on, and
/etc/knotless/.envhas the new arguments, withrunrecreated. This pull makes them what the next deploy andsetup.shgive a host.bash -non setup.sh. The rest is left to CI.Shortcomings
6 GiB at 3 CPUs for
testis an estimate: the runner host'stestneeds more than 3 GiB, and passes at 7 GiB with 4 CPUs. If the next batch'stestis killed for memory, raise it to 7. The runner host gets no swap here.Changeset: none
🤖 Generated with Claude Code