Skip to content

feat: a shared machine keeps its GPUs, a lane shows its own (ADR-0115) - #600

Merged
7schmiede merged 1 commit into
mainfrom
feat/gpu-share-cap-and-lane-usage
Nov 20, 2026
Merged

7schmiede merged 1 commit into
mainfrom
feat/gpu-share-cap-and-lane-usage

Conversation

@7schmiede

Copy link
Copy Markdown
Member

A shared machine offered every GPU no lane held: its owner could not keep one, and a pool lane could get a GPU the owner was using right then. A lane's usage never showed its GPU, and the machines table showed one only as a badge. ADR-0115 records what was built.

Review card

Approved by the owner in the conversation on 2026-11-20, points 1 to 4 ("alle accepted").

# Category Point Beats Reversing costs
1 term The machines table's "Shares" column says the GPUs too: 14.2 CPU · 6.7 GB · 1 GPU free or held. A "GPU" badge with a tooltip Low: display only
2 contract A lane holding GPUs shows a fourth tile "GPU" on its lane card and usage page: their load and memory, with their history; the values come from its node. No GPU in a lane's usage Medium: a field in the usage API
3 trust The share switch takes max_gpus: the most GPUs it offers the pool; 0 keeps them for its owner; not set, as before, all. Every GPU of a shared machine free for the pool Low: an optional key; old files load as before
4 trust A GPU whose memory processes outside the pool's lanes use for more than a quarter is not offered; it shows as "in use on the machine". A pool lane given a GPU its owner is using Low; the threshold is an assumption

Decided on my own (also in the ADR):

  • No GPU tile for a lane on this machine (it holds no GPU of its own), no GPU column per process (container pids do not match nvidia-smi's), no share_percent for GPUs.
  • A GPU a lane holds is never busy; lowering the cap takes nothing from a running lane.
  • The hub passes --max-gpus only when set, so an older agent in a WSL distribution still starts.
  • The node measures a lane's GPUs (nvidia-smi, once a round) only while a lease holds one, and writes them into the lane's file with its containers' load; the daemon keeps them out of the lane's expected memory need.

Changes

  • devstack-node: share::offered_gpus (cap, busy, held), assign_gpus from that view, Settings::max_gpus, --max-gpus; laneinfra::refresh writes the lease's GPUs.
  • devstack-daemon: external.rs reads gpus, usage.rs reports the lane's gpu.
  • devstack-hub: the switch's max_gpus, passed to the agent.
  • Dashboard: GPU tile on the lane card, · 1 GPU free in the machines table, "in use on the machine", GPU cap in the share switch and setup dialog.
  • Docs: docs/pool.md, docs/dashboard-api.md, CHANGELOG, ADR-0115.

Verification

🤖 Generated with Claude Code

- The share switch takes a GPU cap (`max_gpus`, the agent's `--max-gpus`):
  the most GPUs other members' lanes hold; 0 keeps them for the owner.
- A free GPU whose memory is more than a quarter used by processes on the
  machine is not offered (`busy`, "in use on the machine").
- The node writes a lease's GPUs into the lane's file; the lane's daemon
  reports them as the lane's `gpu`, and its card and usage page show a GPU
  tile.
- The machines table's "Shares" column says the GPUs a machine offers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit f42f59a into main Nov 20, 2026
14 checks passed
@7schmiede
7schmiede deleted the feat/gpu-share-cap-and-lane-usage branch November 20, 2026 15:38
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