Skip to content

feat(park): berth unpark and a park on/off switch - #293

Merged
T-Crypt merged 2 commits into
nextfrom
T-Crypt/park-control
Nov 3, 2026
Merged

T-Crypt merged 2 commits into
nextfrom
T-Crypt/park-control

Conversation

@T-Crypt

@T-Crypt T-Crypt commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Parking stays automatic. These two commands give you the final say over the RAM it uses.

berth unpark ENGINE (or --all) evicts a parked engine now instead of at its ttl. It touches parked and parking leases only; berth stop still owns a running engine. With nothing parked it exits 0, so a long job can run berth unpark --all before it starts.

berth park off switches parking off on every card and evicts what is parked. Each later drain stops its engine the way it did before parking existed. berth park on turns it back on, and berth park (or status) reports the switch. berth status --format json carries park_off while parking is off. The switch lives in berthd, so a daemon restart comes back with parking on.

Why: on a 64 GB box, a parked 33 GB NInfer sat in RAM while a ComfyUI job that needs 35 to 54 GB of system RAM started. The floor eviction fired only after the job had already squeezed the page cache.

Changes:

  • broker: Unpark, SetParkOff, ParkOff; Park refuses while off, with an EvParkRefused event
  • node: fan-out over cards; status merges park_off
  • proto: OpUnpark, OpParkMode, Msg.ParkOff, Status.ParkOff
  • cli: berth unpark, berth park
  • docs/gateway.md: a section under "Park in RAM"; CHANGELOG entry

Tests: internal/broker/unpark_test.go covers unpark by name, a running engine left alone, park off refusing and evicting, and park on. internal/cli/unpark_test.go covers usage errors, the nothing-parked exit, and the switch round trip in human and JSON. go build ./... && test -z "$(gofmt -l .)" && go vet ./... && go test ./... passes.

Running on aphotic as 0.4.1-next.10a269d since 2026-11-02.

berth unpark ENGINE|--all evicts parked engines from RAM now (running ones are
untouched; nothing parked is no error). berth park off|on|status switches RAM
parking off for every card, evicting what is parked, and back on; status
carries park_off. The switch lives in the daemon.
The human status gains a park line while berth park off is set, and the
agent skill gains a row for berth unpark and berth park.
@T-Crypt
T-Crypt merged commit adcd4c1 into next Nov 3, 2026
4 checks passed
@T-Crypt
T-Crypt deleted the T-Crypt/park-control branch November 3, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant