-
v0.11.0
Stablereleased this
2026-10-03 22:59:55 +02:00 | 554 commits to main since this releaseA minor version: the store can be replicated and the control plane doubled,
both set up by llmgw itself;sudo llmgwopens setup screens and a console;
usage is read from sums kept as it is written. Released without candidates.Upgrading. Migrations 0015 (usage sums, filled from the request table
already recorded — once, at the first start) and 0016 (control planes) run by
themselves. An agent older than this ignores the list of control planes and
keeps its configured one. Nothing inserver.yamloragent.yamlchanges
meaning;auth.usage_retentionandrouter.tenant_labelare new and optional.The GPU and fabric work below began from the field report in issue #2, after
a deployment on GPU nodes.GPU metrics that move, and charts of them
A GPU's utilisation and memory in use were read once, when the agent
started, and published from then on: a card busy since looked as idle as it
was at registration, and one idle since as busy. They are now sampled with
the temperatures and power every heartbeat (ten seconds at most), with the
memory bandwidth in use, the SM clock and uncorrected ECC errors besides.
An agent too old to send them still has its registration figures published,
and a figure the driver does not give is left out rather than shown as zero.- New series:
llmgw_gpu_memory_utilization_percent,
llmgw_gpu_sm_clock_mhz;llmgw_gpu_utilization_percent,
llmgw_gpu_memory_used_bytesandllmgw_gpu_ecc_errorsnow from the
sample. - The node page shows each card's utilisation, memory, clock and ECC
errors in its table, and charts of utilisation, memory, temperature and
power, one line per card. - The cluster page charts the fleet's GPUs by class: average utilisation
and memory in use. - Grafana (
deploy/monitoring/grafana/llmgw-overview.json) has a GPU row:
utilisation, memory, memory bandwidth, temperature, power against the
limit, clock, and what holds cards back. - Alerts:
GPUThermalThrottling(ten minutes slowed by heat),
GPUUncorrectedECCErrors,GPUHot(above 87 °C for ten minutes). - The cluster page's GPU map: every card a square, a row per node,
coloured by how busy, how full or how hot it is (?gpumap=util|memory|temp),
with what holds it and its figures under the pointer; free cards dashed. - Cards held and doing nothing: the replicas whose every card reads under
5% busy, with when they were last asked — the first place to find room. - What each model gets from its cards, on the cluster page and in
Grafana: output tokens a second per GPU and per watt-hour, with the cards'
draw and average utilisation, over the last quarter hour. - What wears a card out, read every minute: XID errors from the kernel's
log (counted from when the agent started), memory rows remapped or pages
retired and whether either waits for a reset, a card out of spare rows,
PCIe link retries and NVLink errors. Published asllmgw_gpu_xid_errors,
llmgw_gpu_last_xid,llmgw_gpu_remapped_rows,llmgw_gpu_remap_pending,
llmgw_gpu_remap_failure,llmgw_gpu_retired_pages,
llmgw_gpu_retirement_pending,llmgw_gpu_pcie_replays,
llmgw_gpu_nvlink_errors; said in words on the node page; a red outline
on the GPU map; a Grafana panel; and alerts —GPUXidError,
GPUOutOfSpareRows,GPUNeedsReset,GPUPCIeRetriesClimbing,
GPUNVLinkErrorsClimbing. - GPU time by owner on the usage page: the cards each owner's models
held over the window, charted and summed into GPU-hours, whether or not the
models were asked anything — the time a GPU quota is about. From the
metrics store, as far back as it keeps history. llmgw_gpu_assigned{node,gpu,model,replica,owner}: which replica holds
each card and whose quota it counts against, for joining the GPU series to
models and tenants.
Usage is read from sums kept as it is written
Every chart and total — the usage tab, quotas, the dashboard, a person's own
page, and budgets restored at start — summed the request table again on each
view: a row per request, scanned whole. Usage is now also summed as it is
written, in the same transaction, into five-minute slices, hours and days per
key, person, project and model (usage_5m,usage_1h,usage_1d; migration
0015 fills them from what is already recorded).- Charts read the coarsest of the three their slices are made of: a day in
20-minute slices from the five-minute table, a week or a month from hours. - Totals and budgets read the rows up to the next five-minute slice, then
slices, hours and days — exact, not rounded to a slice. On three million
requests over thirty days, a month's total per person went from 705 ms to
18 ms on PostgreSQL. - Latency and time to first token are kept as histograms in the sums, so a
percentile per team or model can be read after the rows are gone. auth.usage_retention(e.g.2160h) deletes request records older than
that, hourly. Totals, charts and budgets are unchanged by it — they read the
sums — butctl requestfinds nothing older. Unset keeps every record, as
before.
Alerts per tenant and per budget
llmgw_tenant_requests_total{tenant,outcome},llmgw_tenant_tokens_total
andllmgw_tenant_ttft_seconds: requests by outcome (ok, error, limited),
tokens and time to first token per tenant. The tenant is the level
router.tenant_labelnames —teamby default, ororg,project, or
none— named by its path, "acme/platform". One level rather than every
project, so a cluster of thousands of projects does not become a Prometheus
of millions of series.llmgw_budget_spent_ratio{scope,id,name,period}: this period's spend
over the budget for every organization, team, project and person given one,
refreshed every minute.- Alerts in
deploy/monitoring/llmgw-rules.yml:BudgetMostlySpent(80%),
BudgetSpent,TenantHittingLimits(a tenth of requests refused),
TenantErrors,TenantTrafficSpike(three times the weekly average) and
TenantSlowFirstToken. - A Grafana dashboard per tenant,
deploy/monitoring/grafana/llmgw-tenants.json
(uidllmgw-tenants): requests and tokens by tenant, the share failing and
refused by a limit, first-token p95, every budget's share spent, and who used
most in the last day — with a tenant chooser at the top.
How each team's requests fared, not only what they cost
- Percentiles from the sums. First token and latency, p50, p95 and p99,
per organization, team, project, person or model, read from the histograms
kept with the usage sums: on the usage tab's table, and in a branch's or
person's panel on the people page, beside the error rate and requests
refused by a limit. - Refused requests are counted against their owner. A request a rate,
token or budget limit refused was counted only in Prometheus, by model; a
team running into its limit looked like a team that had gone quiet. It is
now recorded as a 429 against its key, person and project — no tokens, no
cost — and shown as "Limited". - Usage by model is a grouping of the usage tab, by the model that
answered.
The console watches the cluster and holds every setting
sudo llmgwon a control plane is a console in three groups down the left:- Watch, refreshed every three seconds: the overview; nodes, with CPU,
memory, GPUs free, disk and agent version, and a node's detail — load,
engines, each card's busy, memory, temperature and power; every GPU in the
fleet and which model holds it; models, with a model's profiles, warnings
and replicas; replicas and where they run; the last day's use by team,
project or organization; and a node's agent log. - Settings: every key of
server.yaml, block by block, with what applies
when the file sets nothing and what each key is for, from its comment in
the code. Enter changes a key or opens a block; lists and maps of blocks
(endpoints, models, prices) take entries added and removed. A save is read
by the same loader the service uses first — nothing is written that would
not load — keeps the file's comments, leaves the old one beside it, and
offers to restart the service. - Do: add a node, replicate the store, leave.
On a node,
sudo llmgwopens the same settings for itsagent.yaml.The keys come from the configuration structs themselves, through the
generator that writesdocs/reference.md, so a setting added to the code is on
the screen without anyone listing it, and a test fails if the two drift.
That generator told blocks apart by name alone, sotlsconf.Config,
engines.Configandsupervisor.Configwere each taken for the agent's
Configand dropped: the reference had no TLS, engine or supervisor settings
at all. It now has 37 blocks, six more than before.A second control plane with
llmgw server add, and the screens as windowssudo llmgw server add [user@]host [--vip 10.0.0.160/24], run on a
control plane, makes another machine a standby: this llmgw copied over, a
certificate from the cluster's authority, the same configuration and store
address, the machine let into the store (for a store under Patroni, one
change through Patroni's API), and the service started. Every node is told
of it within half a minute and fails over to it untouched.--vipkeeps a
floating address on whichever control plane leads, with keepalived on both.
Tried on new machines: switching the leader off, the standby led after 14
seconds and the floating address answered from it after 23.- Nodes learn every control plane from the leader (a new
ControlPlanes
message, kept in/var/lib/llmgw-agent/control-planes.json), after the
ones in their configuration. - A node notices a dead control plane within a quarter of a minute. A
leader whose machine stopped dead left its nodes' streams open until the
kernel gave up retransmitting, about fifteen minutes; the agent now pings
the stream after ten quiet seconds, and bounds dialling too. GET /leader: 200 on the control plane that leads, 503 on a standby,
open like/ready— what keepalived follows.- The store's access rules live in Patroni's shared configuration for a
cluster set up byserver init --patroni, so another control plane is let
in without touching each member. - The screens are windows: full screen, a title bar, the steps or actions
down the left, the content in a bordered panel, the keys along the bottom,
questions and errors as dialogs over it — the setup, the console, adding a
node and one-machine init alike. Keyboard only.
Machines nothing may log into:
llmgw joinFor sites that allow no ssh into a machine, the setup screens offer a fourth
way to reach one: a join code. The setup listens on port 7444 while it waits
and shows a code for each such machine, with the commands that fetch llmgw
onto it; there,sudo llmgw join <code>dials out — nothing dials in —
checks by the certificate fingerprint in the code that it reached the setup
that made it, admits itself with the code's secret, and runs what the setup
sends, printing each step, until the setup says it is done. A code is good
for one machine and an hour, and is under 90 characters so it can be copied
whole from one screen into another.To the setup a joined machine is one more way of running a script there:
the checks, PostgreSQL, Patroni and etcd go over it unchanged. Tried with one
machine joining by code and another logged into with a password, in one
setup.Setting up from nothing in screens:
sudo llmgwRun with nothing after it in a terminal, as root,
llmgwopens full-screen
setup on a machine with nothing installed, and a console on a control plane.
In a pipe or a script it prints its help, as before.- Setup asks one machine or three. For three — this one as the control
plane and etcd's third vote, two more for the store under Patroni — it asks
how to reach the other two: the ssh agent, a key file, or a password, and a
sudo password where sudo asks for one. Passwords stay in memory for the run;
a sudo password grants the user passwordless sudo until the install
finishes, and the grant is removed after, failed or not. - Every machine is checked before anything is installed: login, system
(Ubuntu 22.04/24.04, Debian 12), architecture, CPUs, memory and disk for its
role, clock against this one, NTP, the ports its role needs, internet, and
whether it reaches the other machines. Failures stop it, with what to do;
warnings let it go on. - Then the plan, and the command line that does the same from a script,
then the install with its progress, and the administrator's password. - The console shows
ctl status, refreshed every five seconds, and offers
to add a node or, for a store on one machine, to replicate it. - Machines are reached with Go's ssh client rather than the system's, so a
password can be used; a host key is recorded on first sight and refused if it
changes.
Tried end to end on three new machines whose user logs in and sudoes only with
a password.A store that survives losing its machine
deploy/ha/now covers the store as well as the control planes: PostgreSQL
under Patroni on two machines, its leader lock in a three-member etcd, and
llmgw given every member withtarget_session_attrs=read-write. Measured: a
planned switchover cost one failed lease renewal; switching off the primary's
machine promoted the standby in 24 seconds with the gateway serving
throughout. Example configurations are beside it.llmgw server init --patroni user@host --patroni user@hostsets it up:
PostgreSQL, Patroni and etcd on those machines over ssh — this one as etcd's
third vote — the role and database, and the store already in use moved in.
Every step looks first; run against a cluster that is up, it changes nothing.
Tried from scratch on three new machines (two minutes, then a failover by
switching the primary off) and against the reference cluster (nothing
touched).Watching it: for a store of several hosts the control plane publishes
llmgw_store_member,llmgw_store_replica_lag_bytesand
llmgw_store_patroni_upfrom each member's Patroni, a member that stopped
showing asmissingrather than vanishing;llmgw ctl statushas a STORE
line; and four alerts —StoreHasNoLeader,StorePatroniUnreachable,
StoreReplicaNotStreaming,StoreReplicaBehind.Making an administrator on PostgreSQL (
init --admin,users promote)
failed: the flag was sent as a bool to an integer column, which SQLite takes
and PostgreSQL refuses. Every existing PostgreSQL store got its administrator
by being copied from SQLite, which is why nobody had met it.llmgw server backupreads a store address of several hosts. It took the
list for one host name and reached the database only by falling through to
the second; it now hands libpq the list, and dumps from a standby when there
is one.People, limits and usage are one page
Managing a team meant its members on the people page, its quota on the quotas
page and its spend on the usage page, each linking to the others. They are now
one page in three tabs — Organizations & people, Limits, Usage —
each at the address it had before, so links and bookmarks still land. The menu
has one entry for them, People.Choosing an organization, team, project or person in the tree, or a person in
the account list, opens a panel beside it with everything about that one
thing: its own limits and what it is held to from above, spend against its
budget, its per-member limit, its capacity quota, and its requests, tokens
and spend over the last week, drawn. Its limits can be set or changed there,
and the answer comes back to the same panel.The administrator's menu no longer has an Organizations entry beside it:
/org
and/org/<id>send an administrator to that organization's panel here. The
page stays as it was for an organization's managers, who cannot see this one.The chat page says whether a GPU or a CPU answered
A model can have replicas on a card and on CPUs at once, and the two answer
at very different speeds; the chat page gave no way to tell which one a reply
came from. The picker now says where each model runs —GPU,CPUor
GPU + CPU— and the line under each reply names what answered it:GPU 6000-24gorCPU, beside its tokens a second.Every answer through the gateway carries the same as
x-llmgw-hardware:
cpu, or the GPU class. An endpoint configured by hand, with no pool, sends
none.A card shared with something else is judged every heartbeat
A card with another process on it when its agent started was kept out of
placement, and stayed out — "5014 MiB already allocated by another process" —
after that process let go of it, until the agent was restarted. Found on a
node shared with ComfyUI. The other way round, a tenant arriving after
registration was never seen, and a card the agent's own engine held when the
agent restarted read as someone else's.The agent now reads every card's memory per process on each heartbeat,
leaves out what its own engines hold, and sends the rest; the control plane
keeps a card out of placement on that reading, and lets it back in when it
falls under 512 MiB.llmgw_gpu_memory_used_bytesreads the same figure. An
agent too old to send it keeps the reading from registration.A GPU placement no longer runs on the CPU unnoticed
llama.cpp placed on a GPU, with its CUDA backend unable to load (cuBLAS not
where the loader looks), came up on the CPU, answered at CPU speed, and was
reported ready while its GPU sat reserved and idle. Three checks now stop it:- Installing the CUDA build asks it which devices it sees
(llama-server --list-devices). None, on a node with GPUs, is a failed
install, with whatlddsayslibggml-cuda.sois missing. The binary's
ownlddcould not say it: the backend is opened at run time. - After the upgrade, engines the agent finds already running are held to
the same check when it adopts them: one serving a GPU placement on the CPU
is stopped, and its replacement starts through the check. The installed
CUDA build is checked again within ten minutes, and installed afresh if it
sees no GPU. - Starting a shard on GPUs is ready only when its process holds memory on
each of them (nvidia-smi --query-compute-apps, its process group
included). One that does not is stopped and reported failed: "placed on GPU
0 but computing on the CPU", with the devices the engine lists. This covers
a hand-installed binary (engines.llamacpp.bin), which nothing else checks. llmgw ctl engine-check llamacpp, run on a GPU node, now also fails
when the engine sees no GPU, and otherwise prints the devices it computes on.
Shards are also given
CUDA_DEVICE_ORDER=PCI_BUS_ID: placement numbers GPUs
as nvidia-smi does, by PCI bus, and CUDA's own order is fastest first — on a
node with two kinds of GPU, a shard could get a different card from the one it
was given.A model of many files, mirrored whole for vLLM
vLLM loads a directory — shards, config.json, the tokenizer — and does not
read GGUF. Mirroring one could go wrong several ways: the explorer offered the
shards alone, a node could be handed a version still downloading or missing a
shard, and a repository's page given as a model's source was fetched as one
file of HTML.- The explorer fetches a safetensors set with what the engine reads beside
it: config.json, generation_config.json, the tokenizer files, the shard
index, the quantisation config. Never code: a.pywould be the engine
running what the repository ships, which is to be chosen on purpose. - A version is offered to nodes only whole. The mirror refuses its
manifest (409, with what is missing) while a file is still downloading, or
while a shard itsmodel.safetensors.index.jsonnames, or a part of a
split (-00002-of-00004), is absent. A node reports "not complete on the
mirror yet" and is tried again. - Checksums go with the files. The mirror keeps each file's sha256 beside
it and the manifest carries it; a node checks every file of a set against
it before using the set, and fetches one that differs again. llmgw mirror addtakes several URLs into one version.- A Hugging Face repository page given as a source is read as the
repository id for a model vLLM or SGLang runs, which the engine downloads
itself (the node then needs to reach Hugging Face), and refused for one
llama.cpp runs, which needs a file.
With a vLLM profile of
tp: 4, placement reserves four GPUs of one node for
such a model, as before.Signing up with an address that has an account
On PostgreSQL, signing up with an address already registered showed
"something went wrong; try again": the store recognised a duplicate by the
word "UNIQUE", which is SQLite's, and PostgreSQL says it in lower case under
code 23505. It now knows both, and the address is answered as on SQLite —
with the same page as a new sign-up, so the page cannot be used to find out
who has an account. That page now also says what to do if the address had
one: sign in, or ask an operator to reset the password.An error the page does not explain says the account was not created and
gives a reference (err-…), logged beside the error, for an operator to find
it; the database's own words stay in the log.An adapter no fabric uses does not keep a node out
llmgw doctorfailed a node for a RoCE port with no RoCE v2 GID entry, or for
ib_uverbsnot being loaded, whether or not any fabric used them; on a node
added for single-node inference, with no fabric given, that refused it for
RDMA nobody had asked for.- Those are failures only for ports a declared fabric uses, and only when a
fabric is declared. Otherwise they are warnings saying nothing uses them yet. - Which fabric an undeclared InfiniBand port is on, and whether it has a
subnet manager LID, are notes rather than warnings;node addstill warns
once that adapters are up with no fabric given. node add --fabrichands its fabrics to doctor (doctor --fabric name:mlx5_0,…), so they are checked as declared even though agent.yaml is
written afterwards.
A restart with no room beside it
ctl restartplaces each replacement beside the replica it replaces. With
no room for it — one GPU, every card that fits held by the replica itself —
the old replica was stopped only after the drain grace period, five minutes
of "restart replacing" with nothing saying why, which read as a restart that
never happened; scaling to zero and back was the way out. And a replacement
that fit nowhere even with the old replica gone was stopped for all the same,
leaving the model with nothing. Now:- The replica is the only thing in the way, found by placing the
replacement on a copy of the inventory without it: stopped at once, the
replacement taking its place. - The replacement fits nowhere even then: the restart is given up and the
replica keeps serving.ctl replicasshowsrestart refused:and why. - Room being made — a lower class preempted, an idle on-demand replica
stopping — is waited for, as before. ctl restart --in-placestops each replica first, whatever room there is.
Every GPU node gets engine builds it can run, by itself
Which build of an engine a node installs follows its hardware — the CPU
architecture, the driver, and the oldest GPU on it — from what each project
publishes and how it was compiled. Each engine has a list of builds, best
first; the node takes the first its hardware meets, and the first of those
that installs and is seen to compute on the GPU. A build the table is wrong
about costs its download, and the next one is tried.llama.cpp vLLM Driver 580+, Turing and newer CUDA 13.3 the version asked for, CUDA 13 (PyPI) Driver 525–579 CUDA 12.8 (x64): its machine code for 8.6, 8.9, 12.0; the GPUs it ships as PTX need 570 the version asked for, CUDA 12.9 (vLLM's GitHub release, PyTorch's cu129 torch) Volta (V100) CUDA 12.8 on driver 570+, else Vulkan 0.19.1, the newest vLLM built for 7.0: no build of 0.20 or later has its kernels Pascal, Maxwell CUDA 12.8 on 570+, else Vulkan none: no vLLM is built for them arm64 GPU (GH200, Grace) CUDA 13.3, else Vulkan — never the CPU build CUDA 13 or 12.9, 8.0 and newer No NVIDIA GPU the CPU build none Read from the projects' release pipelines: vLLM's x86 builds start at 7.5
from 0.20.0, its PyPI build is CUDA 13 from 0.20, 0.19.1 was the last
compiled for 7.0 (PyPI's torch 2.10 is too); llama.cpp's CUDA 12.8 build
carries 5.0–9.0 as PTX and 8.6/8.9/12.0 as machine code, its CUDA 13.3 build
starts at 7.5.- A node running an older vLLM says so: the cluster page's vLLM build
column shows the version installed, and the installation's detail says why
("vLLM 0.19.1, the newest built for compute capability 7.0, instead of
0.30.0"). Profiles choose GPUs by class, so a model meant for the newer
vLLM is not placed on a V100 by accident. - The install computes on the GPU before it counts: a small tensor
operation for vLLM, the devices llama.cpp lists for its GPU builds. - The build can still be chosen per node on the cluster page (auto, CUDA
13, CUDA 12.9, none), withllmgw ctl engine-build NODE vllm BUILD, or
POST /api/v1/nodes/{id}/engines; kept in the store and sent to the node
at once. - Whether an engine computes on its GPUs is read from every process
nvidia-smi lists, not compute processes alone: the Vulkan build is a
graphics one. A llama.cpp shard is givenGGML_VK_VISIBLE_DEVICESbeside
CUDA_VISIBLE_DEVICES.
Engines per node, and nodes that do not run them all
A cluster with older GPUs could not add them cleanly:
node addrefused a
V100 node for the vLLM it could not run, though it was meant for llama.cpp,
and--ignore-checkspassed over every other problem with it.- What vLLM cannot do is a warning, in
llmgw doctorandnode add: the
node joins without it and serves what it does run.node addchecks the
vLLM the control plane installs, not the binary's own default. node add --disable-engine vllmkeeps an engine off a node for good:
written asengines.disabledin itsagent.yaml, never installed or
advertised there, and not checked by doctor.engine_overridesinserver.yamlgive nodes picked by GPU class, id
or labels a different version of an engine, or none — for exceptions; the
build each GPU generation needs is chosen without it (above).- The requirements follow the version, as the table above sets out; the
threshold had been CUDA 13's for every version. - An engine binary named in
agent.yamlis used. The agent had installed
its own beside it, which was then used first. - The node page shows each GPU's compute capability.
Serving from the mirror says where a model will run
The serve form put every GGUF model on the CPU: it offered no choice, and its
"Profile name" field, pre-filled "cpu", read as though renaming it would move
the model to a GPU. Placement is decided bygpu_class, which the form never
set. Now:- Runs on lists the fleet's GPU classes with how many cards are free, and
for llama.cpp the CPU. On a fleet with GPUs the class with the most free
cards is chosen. - GPUs per replica sets how many cards a replica takes on one node
(gpus_per_nodefor llama.cpp,tpfor vLLM), and parallel requests
how many a llama.cpp replica serves at once. - The profile is named for where it runs (
t4,t4-x4,cpu) rather than
typed. - A line under the form says what the model will run as — engine, CPU or how
many of which GPU, memory, context pool and how it is divided — and turns
red when the CPU is chosen with GPUs free. The message after adding repeats
it. - Choosing the CPU while GPUs are free is refused unless run on the CPU
anyway is ticked.
llama.cpp on several GPUs of one node
A llama.cpp profile takes several of a node's GPUs with
gpus_per_node: N:
placement reserves N cards of itsgpu_classon one node, the engine sees
those N (CUDA_VISIBLE_DEVICES) and spreads the layers over them
(--split-mode layer, in proportion to each card's free memory, which for
whole cards is even).tporppon a llama.cpp profile was a width nothing
placed — the replica stayed unplaced or ran on one card. It is now read as
gpus_per_node, so a profile written that way is placed on that many cards
after the upgrade, rather than dropped; only both given and disagreeing, or
nodesabove one, is refused.Downloads
- New series: