docs(operations): document ModelPool in the GPU-sharing guide - #1508
Merged
Conversation
ModelPool shipped in defilantech#1393 and the GPU-sharing operations guide never mentioned it. The only prose was the design proposal, so an operator reading docs/operations/gpu-sharing.md saw three modes and no hint that a fourth pattern exists. It is a genuinely different shape from the other three. exclusive, partitioned and shared all divide a device between workloads running at the same time; a pool is for several models that each want the whole slot but are not needed simultaneously, with one resident and the rest held at replicas 0. Written from an exercised pool rather than from the type comments: NAME POLICY RESIDENT PHASE AGE pooltest sticky pooltest-a Ready 35m pooltest-a Ready replicas 1 pooltest-b Stopped replicas 0 That run also produced the gotcha now called out explicitly: editing spec.default on a WARM pool does not move the slot. default names the member to warm on a cold pool, and sticky keeps the incumbent, so the edit is inert until the pool next goes cold. Repointing default at the other member left the incumbent resident two minutes later. Also scopes the 'no dynamic pool rebalancing' limitation, which read as absolute and is specific to shared mode, and records that a router with a pooled backend is pinned to one replica because swap activation serialises through an in-process lock. Signed-off-by: Christopher Maher <chris@mahercode.io>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
What
Documents ModelPool in
docs/operations/gpu-sharing.md, and scopes one limitation that had become misleading.Why
ModelPool shipped in #1393 (2026-08-09). The GPU-sharing operations guide never mentioned it, so the only prose describing it is the design proposal. An operator reading the guide sees three modes and no hint a fourth pattern exists.
It is a genuinely different shape from the other three:
exclusive,partitionedandsharedall divide a device between workloads running at the same time, while a pool serves several models that each want the whole slot but are not needed simultaneously.Refs #1393
How
Adds a
## ModelPool: many models, one slotsection covering the spec, the observed steady state, the four status conditions, sticky semantics,swapBudget, and the single-replica router constraint.Two corrections to the existing text:
No dynamic pool rebalancingread as absolute. It is specific tosharedmode, and it now says so and points at ModelPool for the take-turns case.Written from an exercised pool, not from type comments
A real pool was stood up on-cluster:
Observed and now documented:
spec.default; non-resident members are set toreplicas: 0by the operator, andStoppedis the normal held state rather than a failureSlotAllocated=True/Residentnames the owner; with members missing it reportsFalse/MissingMembersand the pool sitsDegradedspec.defaulton a warm pool does not move the slot. Repointing it at the other member left the incumbent resident two minutes later. This is correct (sticky keeps the incumbent, anddefaultonly applies to a cold pool) but it is the first thing an operator will try, so it is called out explicitly.Not exercised
The demand-driven swap itself, and
swapBudgetexpiry returning503+Retry-After. Those are documented from the API contract. Driving a swap needs aProxydata-plane router, and the cluster's only router runsdataPlane: Gateway, so there was no way to exercise it without standing up new infrastructure. Flagging so a reviewer knows which claims are observed and which are read.Checklist
make testpasses locally — n/a, no code changedmake lintpasses locally — n/a, no code changedgit commit -s) per DCOAssisted-by: Claude Code (drafted the section). Before writing, the CRD schema and field semantics were read off the live cluster with
kubectl explain, a ModelPool was created and driven through Degraded, Swapping and Ready, and the warm-pooldefaultbehaviour was tested rather than assumed. What could not be exercised is labelled above.