swarm_runner: the runner-unit fence (MemoryHigh=2G/MemoryMax=3G) overrides the raised 6G/8G and thrashes two concurrent jobs into swap on elitebook-03 #20
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/matou-distributed-servers#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happened (2026-09-25, elitebook-distributed-server-03)
idss release-publish (the run for idss #1880,
4378a9ff) sat on the dashboard'svue-tsctype-check for more than 35 minutes. That step normally takes about 2 minutes. At the time:Dstate).memory.current2.15 GB againstmemory.high2 GB, with 2.5 GB of it in swap.memory.eventscountedhigh224,558,957 times andmax2,421 times.capacity: 2put two jobs in that cgroup at once, the release publish and main's CI (vitest with 8 workers). Both run on the host executor, so both share the runner unit's fence, and the kernel throttled them into swap thrash.Cause: the raised limit is silently overridden
The runner unit has two conflicting memory settings:
/etc/systemd/system.control/forgejo-runner-swarm.service.d/50-MemoryHigh.confsetsMemoryHigh=6G, and50-MemoryMax.confsetsMemoryMax=8G. Someone ransystemctl set-propertyto raise the limit./etc/systemd/system/forgejo-runner-swarm.service.d/50-swarm-fence.conf, written by this repo'sroles/swarm_runner/templates/runner-service-fence.conf.j2, setsMemoryHigh=2GandMemoryMax=3G.Drop-ins apply in filename order, and
50-swarm-fence.confsorts after50-Memory*.conf, so the Ansible fence wins. The 2G/3G sizing came from "observed steady-state ~1.1G mid-run", measured for a single job. The runner now takes two jobs at a time, and the dashboard type-check plus vitest need more than 2 GB between them.A
systemctl set-property --runtimefix loses the same way: its file (/run/systemd/system.control/…/50-MemoryHigh.conf) also sorts before the fence file. Today's unblock wrote the live cgroup directly (memory.high6G,memory.max8G); that reverts on the unit's next restart.Fix
runner-service-fence.conf.j2, raise the fence toMemoryHigh=6GandMemoryMax=8G, the values the manual change was aiming for. Or size it per job (capacity× about 3 GB). Keep the etcd voter protection that D3 intends: the host has about 15 GB.set-property --runtimehint intasks/main.yml:170to match./etc/systemd/system.control/…/50-Memory*.confdrop-ins so there is one source of truth.Related hosts checked the same day
/is 96% full.🤖 Generated with Claude Code
2026-09-25 14:25Z: unblocked by hand.
memory.high=6G andmemory.max=8G, written directly throughiansudo. This reverts on the next restart; this ticket makes it permanent./tmpcleaned: 3.1 GB → 844 MB. The runner's swap use fell from 3.5 GB to 1.17 GB of 4 GB./tmp/matou-test-backend.log(1.8 GB) was emptied rather than removed. Its writer,/home/swarm/swarm-e2e/Matou/matou-app/backend/bin/server, was about 5 hours old and still writing DEBUG sync lines. It is either a live matou-app e2e run or a leaked one (the matou-app#331 class). It was not killed; whoever owns swarm-e2e should check it.The cancelled idss release-publish (30-min timeout, thrashed) was re-dispatched and published
4378a9ff(seq 2910).