Playbook submitted: keeping vLLM up as a long-lived service (PR #104)

I’ve opened PR #104 with a
companion to the existing vLLM playbook. That one covers getting the server running;
this covers keeping it running. Three things I hit running one 24/7 on a GB10, each
measured rather than reasoned about.

--gpu-memory-utilization is spending your system RAM.

There’s no VRAM here, so that flag is a decision about the whole box, not just the
model server. At 0.75 on 121.7 GB, vLLM reserves ~91 GB at startup — 53.8 GB of it
KV cache, sized for 31 concurrent requests at a full 131k context. On my single-user
box that cache measured 0.0% idle and 0.5% under load. vLLM states the split in its
startup log:

gpu_worker.py:538]      Available KV cache memory: 53.84 GiB
kv_cache_utils.py:2146] GPU KV cache size: 4,073,445 tokens
kv_cache_utils.py:2147] Maximum concurrency for 131,072 tokens per request: 31.08x

Worth reading before copying a value out of a discrete-GPU example.

/health returns 200 on an engine that has stopped serving.

The scheduler can quietly stop accepting work — Running: 0 reqs, KV cache 0.0%,
nothing in the journal. So a real liveness check has to ask the model to generate.

But building that probe carelessly is worse than not having one. Mine sent no API
key. vLLM answered {"error":"Unauthorized"}, which contains no "choices", so the
watchdog concluded the engine was wedged — and acted on it. It restarted a perfectly
healthy vLLM on its 45-minute floor, four minutes of weight reload each time, while
logging WEDGED ... investigate and the server answered completions in three seconds
throughout.

A second version had the same shape: reading the model name from /v1/models with a
greedy match returns the permission object’s id, so the probe asks for a model that
doesn’t exist and the rejection looks identical to a wedge.

A monitor that can’t ask the question doesn’t detect outages — it manufactures them.
Every failure branch needs to separate “I couldn’t ask” from “the answer was wrong”,
because no restart has ever repaired a credential.

PrivateDevices=true takes the GPU away, and DeviceAllow doesn’t give it back.

If you sandbox a service that needs CUDA, this one is non-obvious. PrivateDevices
doesn’t forbid the nvidia nodes — it mounts a fresh minimal /dev where they were
never created, so there’s no node for a cgroup permission to apply to:

$ sudo ls -1 /proc/$(systemctl show my-agent -p MainPID --value)/root/dev/
char core fd full hugepages log mqueue null ptmx pts random shm
stderr stdin stdout tty urandom zero

BindPaths is what works. Exposure still went 7.8 EXPOSED → 4.0 OK with the binds in
place.