Repository navigation
feat(park): berth unpark and a park on/off switch - #293
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 stopstill owns a running engine. With nothing parked it exits 0, so a long job can runberth unpark --allbefore it starts.berth park offswitches 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 onturns it back on, andberth park(orstatus) reports the switch.berth status --format jsoncarriespark_offwhile 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:
Unpark,SetParkOff,ParkOff;Parkrefuses while off, with anEvParkRefusedeventpark_offOpUnpark,OpParkMode,Msg.ParkOff,Status.ParkOffberth unpark,berth parkTests:
internal/broker/unpark_test.gocovers unpark by name, a running engine left alone, park off refusing and evicting, and park on.internal/cli/unpark_test.gocovers 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.10a269dsince 2026-11-02.