You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
0.3.0 numbers for the README at serving defaults: DGX Spark and RTX 5090 #46
@juliankang4, could you run 0.3.0 on the Spark and give us numbers for the README? The README is getting a "what runs on your hardware" table. A Spark row there would come from your run, credited to you, with its conditions.
Build and binary
Build the tag v0.3.0 (8d93782) from source and paste bloomery-serve --version.
Server
Use serving defaults: -m or --hf, --host and --port only.
No --parallel, no --ctx-size and no BLOOMERY_* levers.
Models: Qwen3.6-35B-A3B Q4_K_M and Qwen3.8-Flash-Next UD-Q4_K_XL, or any model from docs/models.md that fits.
Requests
Greedy, with thinking off. Send one warm-up request and discard it.
Then send a ~4K-token prompt and a short prompt, two runs each.
Report each response's timings: prompt_n, prompt_per_second and predicted_per_second, plus the time to first token.
Conditions
Paste nvidia-smi, free -g and the power mode.
Confirm that no other GPU process ran.
A toktape link would be welcome too, if it is easy.
@avlp12, could you give the same numbers from your RTX 5090 (Core Ultra 9 285K, 196 GiB, WSL2)? A 5090 row in the README would come from your run, credited to you.
The protocol is the same as above, with these differences:
Binary
The release tarball v0.3.0 works: it carries sm_86 PTX, and the driver compiles it for the 5090 at the first start, which takes tens of seconds.
A source build of the tag also works. Say which one you ran.
changed the title [-]dgx-spark: 0.3.0 numbers for the README, at serving defaults[/-][+]0.3.0 numbers for the README at serving defaults: DGX Spark and RTX 5090[/+]on Oct 11, 2026
Optional, only if you have the disk: GLM-5.3-Flash UD-Q4_K_XL (199.7 GB) and DeepSeek-V4.1-Flash Q3_K_M (347.3 GB). In 0.3.0 both run on less RAM than they need: the host experts that do not fit RAM are paged from NVMe (the nvtier line in the log).
What to expect
On the 5090 with 196 GiB, GLM should page little. V4.1 pages more than 100 GB.
On the Spark both page. Nobody has measured the NVMe tier on one memory pool yet, so any number is new.
A short prompt and a ~4K prompt are enough. A first start of V4.1 is slow.
A known 0.3.0 issue
A paged load can be refused when free RAM drops a little between the plan and the load. The message says "under the … B this load needs by … B".
If you see it, please paste the message. Then retry with BLOOMERY_NVTIER_BYTES=0, which pages through the file mapping and loads.
An RTX 5090 with 64 GB of RAM on native Linux. The Qwen3.8 file hits the known refusal you describe above, and BLOOMERY_NVTIER_BYTES=0 does not get past it here.
Binary
The v0.3.0 release tarball: bloomery-serve 0.3.0 (commit 8d937828d741).
The driver compiles the sm_86 PTX for the 5090 in about 6 s: with the CUDA cache disabled, a Qwen3-30B start took 8.6 s, and 2.3 s with the cache.
Requests
--hf, --host and --port only. Greedy (temperature 0), thinking off, 256 tokens. One warm-up was discarded, then two runs of each prompt. TTFT is timed on the client, from sending the request to the first streamed content token.
Qwen3.6-35B-A3B Q4_K_M (lmstudio-community)
It loads whole on the card, ctx 227328 x 2. This seat prints a whole-fit line instead of a plan line:
whole fit at ctx 454656: the whole load on GeForce_RTX_5090: fits: need 33102452068 B = weights 21311258624 B (the allocator's granules; 21155768832 B of buffers) + cache 9462349824 B + context 536870912 B + scratch 67108864 B + reserves 0 B + arena 1456428388 B + reserve past it 268435456 B, ...
Prompt
prompt_n
prompt_per_second
predicted_per_second
TTFT
short
37
1,180 / 1,795
356.1 / 356.0
36 / 34 ms
~4K
4,037
14,937 / 14,935
345.2 / 345.3
276 / 276 ms
Qwen3.8-Flash-Next UD-Q4_K_XL
At serving defaults the load is refused, with no cgroup limit and nothing paged:
plan place=a card=GeForce_RTX_5090 experts=card ctx_max=16384 host_experts=18912 card_experts=5664 card_free=33138868224 devices=[stage:GeForce_RTX_5090:cuda0:33669775360] cuda_order=unset(FASTEST_FIRST)
bloomery-serve: GpuModel::load_placed: the host has 60943515648 B available (MemAvailable, or the smaller room under a cgroup v2 limit — host_room's reading), under the 61106184192 B this load needs by 162668544 B: host experts 59267686400 B + tables 0 B + ring shadows 0 B + reserves 8533127168 B − the OS reserve 6694629376 B, which MemAvailable leaves out already. Free host memory, or load by a placement whose cards hold more of the model (V4.1: --place bp holds more than a, and a more than gate; Qwen3.8: BLOOMERY_QWEN38_EXPERTS=card)
With BLOOMERY_NVTIER_BYTES=0 it is refused the same way, with and without a limit:
The 48G run's cache line already says arena 0 B without the lever, so the lever changes nothing there.
Two things I noticed in the logs, in case they help the fix:
The unpaged case fails too. With no limit, the ctx search grows the context while no expert goes to NVMe (ExpertBytes::within, crates/placement/src/placement/ctx.rs:106), so the plan ends just under the room it read. More free memory only buys a deeper context: 9216 x 2 in an earlier run, 16384 x 2 here, and both were refused.
In every run the load reads 61 to 104 MB less than the cache line read moments earlier. The plan's own reading is not printed, so the full drop is not visible in the log.
BLOOMERY_HOST_ROOM=56G loads: ctx 7680 x 2, every host expert in RAM, MTP draft on. Same requests as above:
Prompt
prompt_n
prompt_per_second
predicted_per_second
TTFT
short
38
123 / 135
47.7 / 49.3
330 / 301 ms
~4K
4,038
447 / 458
54.5 / 54.8
9.12 / 8.83 s
I can paste the full logs if they help.
Tapes
One toktape tape a request, same conditions as the tables (toktape 0.7.3, --temp 0 --no-think -n 256, hostname left out, prompt text left out):
Thank you. These are clear numbers, and the logs pin the bug.
The refusal is the one we found on a 12 GB card this morning:
The plan fills the RAM it read exactly, with no margin.
The load reads MemAvailable again 60–160 MB lower and refuses.
Your logs show more than we had. The case with nothing paged fails the same way, because the context search grows to the edge. And BLOOMERY_NVTIER_BYTES=0 does not help there. The fix in our next landing does two things:
It leaves a margin when a read room becomes a plan room. This covers the unpaged case too.
It lets a paged load shrink its arena instead of refusing.
I will add your numbers as a test case. Until then, BLOOMERY_HOST_ROOM is the workaround, as you found.
The Qwen3.6 rows and the tapes will go into the README table with your name. Please keep the full logs; I will ask if the test needs them.
The tree is git archive 8d937828 (the v0.3.0 tag) with no local changes, built natively on the Spark in a CUDA 13.3.1 container (aarch64) with the pinned toolchain: nightly-2026-08-28, cargo-oxide 0.2.1 from the fork at 87bc9518, LLVM 21.1.8. cargo oxide doctor passed. The command is the release script's feature set:
So the binary carries sm_86 PTX that the driver JIT-compiles for the GB10, and the host code is built for the Spark's own CPU through the tag's aarch64 row (target-cpu=native). A cold build took about 3 minutes, with the container start and cargo oxide doctor. The aarch64 build needed nothing that docs/BUILD.md does not cover; the .cargo files at the tag already have the aarch64 rows.
One thing someone building from source will run into: --version reads only BLOOMERY_BUILD_COMMIT, which the release script sets, so a source build without it says (commit unknown). /propsengine.version (and so toktape's ENGINE line) takes BLOOMERY_GIT_COMMIT, else the tree's git commit, so a tree without .git, such as a git archive export, says 0.3.0 (unknown) there. BUILD.md names neither variable. My first build set only the first one and the tape said unknown, so I rebuilt with both. They are read by cargo only; the server ran with no BLOOMERY_* set (below).
Server
./bloomery-serve -m <first file of the model> --host 127.0.0.1 --port <port>
env | grep BLOOMERY printed nothing before each start. No --parallel, no --ctx-size. The startup lines are in the details under each table.
Requests
POST /v1/chat/completions with "stream": true, "temperature": 0, "max_tokens": 256 and "chat_template_kwargs": {"enable_thinking": false}. /props reports thinking_off: "switch" for both models, and no response carried reasoning_content.
One warm-up request first (a 20-token prompt), discarded. Then the ~4K prompt twice and the short prompt twice, each request sent as soon as the previous stream ended.
~4K prompt: "Here is a document." and a blank line, then the first 165 lines of the tag's docs/serving.md, a blank line and "Explain in detail what the document above says, section by section." That is 4,087 tokens as the server counts it (/chat/completions/input_tokens), the same for both models.
Short prompt: "Explain in detail how the gears on a bicycle work." (24 tokens).
The second run of a prompt reuses the prompt cache (cache_prompt is on by default), so its prompt_n is not a prefill. To get two uncached 4K prefills I added a third 4K run on another text of the same size: the first 131 lines of docs/BUILD.md in the same frame, 4,092 tokens. It ran between the two pairs.
TTFT is measured by the client on the same machine over loopback: from just before the request is sent to the arrival of the first SSE chunk whose delta.content is non-empty. On both models the role chunk and the first content chunk arrive together.
Every run generated the full 256 tokens (finish_reason: "length").
Qwen3.6-35B-A3B Q4_K_M
lmstudio-community's upload at 68a34855, 21,166,757,728 bytes, sha256 4ac6a06bce551257267f49ad2226f8671a22519ccc1a4dde9d5b433d1f2a410d.
Run
prompt_n
cache_n
prompt_per_second
predicted_per_second
TTFT
~4K, run 1
4,087
0
4,575.7
89.84
899 ms
~4K, run 2
1
4,086
83.3
90.67
15 ms
~4K, other text
4,092
0
4,727.0
90.01
872 ms
short, run 1
24
0
374.6
93.47
67 ms
short, run 2
1
23
87.1
92.81
13 ms
The whole model sits on the card, with 262,144 positions a slot and 2 slots. The load took 2.2 s. This model prints a whole fit line instead of a plan line.
Startup lines
place unset place=a why=one card
bloomery-serve-qwen3: the whole --ctx search ran 3 probes on 1 census reading(s)
ctx rule=fit ctx=262144 slots=2 total=524288 cap=262144 fit=262144 fit_card_expert_bytes=19503513600 margin_ctx=262144 base=4096 base_card_expert_bytes=19503513600 base_nvme_expert_bytes=0 card_expert_bytes=19503513600 nvme_expert_bytes=0 lost_bytes=0 margin_bytes=1073741824
bloomery-serve-qwen3: --ctx defaults to 262144 positions a slot, 524288 in all
whole fit at ctx 524288: the whole load on GB10: fits: need 43080963428 B = weights 21311258624 B (the allocator's granules; 21155768832 B of buffers) + cache 10888413184 B + context 536870912 B + scratch 67108864 B + reserves 8552448000 B + arena 1456428388 B + reserve past it 268435456 B, of 124294475776 B the card had (124294475776 B free of its usable 130595946496 B at plan time)
checkpoints: 2 sequences pin at most 8552448000 B of host (4276224000 B each at 262144 positions), of 124541280256 B the host has available
parallel rule=slots slots=2 slot_ctx=262144 total=524288 from=default pass=one
load arch=qwen35moe resident_bytes=33589776476 cache=f16 ctx=262144 slots=2 slot_ctx=262144 layers=40 ubatch=4096 graph_nodes=520 in 2.2 s
bloomery-serve-qwen3: arch=qwen35moe ctx=262144 slots=2 slot_ctx=262144 listening on http://127.0.0.1:18046
unsloth's upload at 766911a6, the 4 shards as listed by the Hub (sha256 checked), and the MTP draft mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf (sha256 5ff54097406a905cf3a724c709124ceb0e3e10235ee862298969e91c96fa96e6) beside the first shard, where --hf puts it, so the draft is on as it is by default.
Run
prompt_n
cache_n
prompt_per_second
predicted_per_second
TTFT
draft accepted
~4K, run 1
4,087
0
1,038.3
41.57
4,113 ms
156 of 211
~4K, run 2
1
4,086
26.3
28.08
214 ms
draft off, see 1
~4K, other text
4,092
0
1,054.5
43.89
4,116 ms
166 of 241
short, run 1
24
0
115.9
41.49
378 ms
158 of 257
short, run 2
24
0
105.7
41.25
370 ms
159 of 270
The plan puts all 24,576 routed experts on the card (host_experts=0), so residency stays off, with 196,608 positions a slot and 2 slots. The load took 35.4 s.
~4K run 2 kept the cached prefix (4,086 positions, over the break-even of 1,459), and a kept prefix leaves the MTP draft off for that request: the MTP draft proposes nothing from position 4086 until a request starts from position 0. Its 28.08 tok/s is the plain decode.
Short run 2 shows cache_n 0 because the kept prefix (23) is under the break-even, so the server reset the slot and prefilled the whole prompt with the draft on: under the MTP draft a kept prefix of 23 positions is below the break-even of 1459 for a reply of 255 tokens.
TTFT on back-to-back requests. On every Qwen3.8 request in the table, TTFT minus prompt_ms minus cache_ms is 102 to 162 ms, and each time it equals, within 2 ms, the ms= of the cache save line the previous request left. A stack of the engine thread taken during a save shows Body38::save_state_async → draft_rows → Mtp38::store_host → DeviceBuffer::to_host_vec → cuMemcpyDtoHAsync_v2. store_host copies the MTP store's whole K and V planes (all 196,608 positions, the plan's ctx_max, 2 × 201,326,592 bytes) into fresh host Vecs and then picks the first n positions, on the engine thread and blocking, so a request that arrives while it runs waits. The save took 161 ms for 101 positions and 161 ms for 4,344, which fits a copy of the whole plane. The cache save line says off_path=true, but this part is on the path of the next request. Once the save has finished before the next request arrives, the wait is gone: short requests sent 4 to 6 s after the previous one had TTFT = prompt_ms + cache_ms + 2 to 3 ms (for example 231 ms with prompt_ms 201 and cache_ms 27). A request whose state the cache already holds triggers no save at all.
So the back-to-back TTFT in the table includes 102 to 162 ms of the previous request's save.
Startup lines
place unset place=a why=one card break_even=1152 basis=docs/cards/q38bpbug-ab.card
ctx rule=cache ctx=196608 slots=2 total=393216 cap=262144 fit=262144 fit_card_expert_bytes=77017907200 margin_ctx=262144 base=4096 base_card_expert_bytes=77017907200 base_nvme_expert_bytes=0 card_expert_bytes=77017907200 nvme_expert_bytes=0 lost_bytes=0 margin_bytes=1073741824
cache ram=6258528616 rule=default available=124659433472 read=MemAvailable need=112142376240 pool=0 tier=0 paged=0 checkpoints=8330412032 message_start=<|im_start|> in_vocab=true in_template=true
parallel rule=slots slots=2 slot_ctx=196608 total=393216 from=default pass=one
draft keep place=a break_even=1585 reply=277 per_reply_token=5.7184485459642955 (the kept prefix below which a request that would leave the MTP draft off resets; https://github.com/midagedev/rig-log/blob/main/docs/bloomery/plan.md, Qwen3.8 serve)
plan place=a card=GB10 experts=card ctx_max=196608 host_experts=0 card_experts=24576 card_free=124856283136 devices=[stage:GB10:cuda0:130595946496] cuda_order=unset(FASTEST_FIRST)
residency unset residency=off why=unset: the plan holds every routed expert on a card; a churn pool would serve none
load host_tier r8=off (no sidecar at models/Qwen3.8-Flash-Next/UD-Q4_K_XL-r8/Qwen3.8-Flash-Next-UD-Q4_K_XL-r8.gguf; optional: a source checkout writes it with just r8-sidecar)
load host_tier type=q4_K k=2560 path=fused
load host_tier type=q5_1 k=640 path=fused
load host_tier type=q5_K k=2560 path=fused
load host_tier type=q8_0 k=640 path=fused
lane card=GB10 bytes=67108864 gbs_median=59.07 gbs_min=59.05 pinned=true
load arch=qwen4exp resident_bytes=95063196936 ctx=196608 slots=2 slot_ctx=196608 ctx_max=262144 ctx_train=262144 verified=3001 layers=48 mode=graph store_bytes=6056714816 prefill=auto ubatch=4096 place=a card_layers=48 in 35.4 s (runtime value)
load draft=mtp resident=3176230912 arena=53526700 head=rows=76000 card_bytes=3229757612 (the plan's 3644844204) in 35.4 s (runtime value)
mtp head head=list rows=76000 from=shipped why=BLOOMERY_MTP_HEAD_ROWS unset: the shipped list cjk-76000, the target's tokenizer its own
xstream=off (unset: no residency or not --place a)
bloomery-serve-qwen38: place=a ctx=196608 slots=2 slot_ctx=196608 listening on http://127.0.0.1:18047
The tape's decode figure (31.6 tok/s) is lower than the table's. Its run differs in three ways: the prompt is toktape's own set and longer (5,555 tokens), it generated 447 tokens, and the draft accepted 261 of 395 (66 %) against 156 of 211 (74 %) in my ~4K run 1. The tape's prefill probe also sends a request that keeps a cached prefix, which runs with the draft off as in note 1; the stream the tape measures had the draft on.
Conditions
One DGX Spark (GB10, 128 GB unified memory), DGX OS 7.6.0, kernel 6.17.0-1032-nvidia, driver 595.84.
No other GPU process ran: nvidia-smi listed no compute process before and after each server, and only bloomery-serve while it ran. No containers ran during the measurements. Load average 0.1 to 1.1 before each server start.
Power mode: I found no selectable power profile to read. There is no platform_profile in sysfs and no nvpmodel or powerprofilesctl; nvidia-smi -q -d POWER reports every power limit as N/A. The GPU's max clock reads 3003 MHz, and no application clock is set. The CPU governor is performance on all 20 cores (10 at a 3.9 GHz max, 10 at 2.8 GHz).
nvidia-smi before the first server:
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 595.84 Driver Version: 595.84 CUDA Version: 13.2 |
+-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GB10 On | 0000000F:01:00.0 Off | N/A |
| N/A 50C P8 4W / N/A | Not Supported | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+
free -g before the first server, then with each model loaded:
@juliankang4 Thank you. These notes found real defects. We fix the 5090 load refusal ourselves today: it ships in 0.3.1, and the plan will print the room it read.
Two of your findings are yours to fix if you want. PRs are welcome, and your own card's FAIL-first is enough evidence for us:
The MTP save on the next request's path.Mtp38::store_host copies the whole K and V planes (ctx_max) on the engine thread, so off_path=true is not true. Copy only the first n positions, off the engine thread. A gate clause could pin that the save's bytes follow n, not ctx_max.
The build commit.--version and /props read two different variables, and BUILD.md names neither. One variable, with the git fallback in both places, and documented in BUILD.md.
If you want to try a third one: the MTP draft stays off after a kept prefix (your note 1). That one needs a design first. Open an issue with your plan before the code.
@juliankang4 One more question. After 0.3.1 ships, we plan a short release video. May we use your DGX Spark and RTX 5090 numbers and your toktape tapes from this issue in it, credited to you by your GitHub name?
We would show them as your measurements on your hardware, with the conditions you gave. We will not compare them with our cards' numbers. If you prefer another credit line, or want us to leave any of them out, tell us here.
A note on the scope of this refusal in 0.3.0, for anyone who finds this issue.
It is not only Qwen3.8 on the 5090. Any MoE model on a small-RAM host can hit it, by two paths:
Paged from NVMe: the plan fills the RAM it read exactly. Any RAM the server takes after the reading refuses the load. On our RTX 3060 12 GB with 27.5 GB free, that was 132 MB.
No paging: the context search grows to the edge of the reading. That is your case, 162 MB short.
Work-arounds in 0.3.0: set BLOOMERY_HOST_ROOM a little under the free RAM (you loaded at 56G), or use a smaller --ctx-size.
0.3.1 (today) plans 512 MiB under the reading, and the RAM arena shrinks toward its floor at load instead of refusing.
I rechecked 0.3.1 on the same RTX 5090 machine with 64 GB of RAM. Both refusals I reported above are fixed: with no limit it loads (at 4096 x 2 or 12288 x 2, see the last section), and under a 48 GiB memory limit it loads at 4096 x 2 with 11.9 GB paged through the file mapping. Under a 48 GiB memory limit the refusal I reported above is fixed: it loads at 4096 x 2 with 11.9 GB paged through the file mapping. With no limit it loaded in all six runs here, but with residency unset the load can still be refused, now by the churn pool the unset rule adds: the same binary was refused in 1 of 2 later starts (details).
I also found something new. On short prompts, the run under the 48 GiB limit decodes faster than the run with no limit: 99.0 against 54.4 tok/s on the same card plan (median of the last five of 18 requests). With residency off, both decode at about 43 tok/s (43.1 with no limit, 43.6 under 48 GiB), so I think adaptive residency is the main cause. After the ~3.2K and ~5.6K prompts I saw no gain, but those were each server's fourth and fifth requests, before the 48 GiB run had settled, so I don't read much into that.
What I checked in the code is why the two settings get different residency words:
Under 48 GiB the routed stacks have NVMe segments, and ChurnPool::of counts no pool for such a stack (churn.rs). Unset residency stays at mid-p0-s1, so every card expert can move (at least 122 a layer on this plan).
With no limit nothing is paged, so the pool at P=0 would add every card expert's file pages to the host set, which the load populates and may lock (host_lock.rs). MemAvailable past the plan's need cannot hold that, so P goes up: mid-p114-s1 in this run, and p113 to p118 across my 4096 x 2 runs.
So my question: could an unpaged stack's churn pool be left out of the plan's host need, so that the unset rule stays at P=0 with no limit too? I know churn.rs says the pool is there so that the host serves every victim without a fault, and this would give that up.
The 48 GiB run shows part of that trade. At decode the recorded cost is small: over the last five requests, 574 experts were sent back to the host from outside the host set (the unresident count), so the host served them from the file mapping, and the recorded staging wait (wait_us) was 10 µs (4,287 and 101 µs over all 18 requests). That count does not say whether their pages were in the page cache, and the wait leaves out the CPU experts faulting on those pages, so it doesn't tell me what fault reads would cost on an all-RAM plan. Prompt calls pay more: a call's pick is refused when its victim is outside the host set (GpuError::Unresident, swap.rs). In the 8192 run under 48 GiB, 332 of 336 picks were refused and 14 experts admitted, against none refused and 1,863 admitted with no limit. As far as I can tell from the code, keeping the pool in the host set but neither populating nor locking it would avoid the refusals: prepare_victim would read a dropped victim back on the machine's thread (counted in rereads) and the pick would go ahead. I have not tried either.
Two smaller notes:
Every 0.3.1 load I ran had an arena of 0 B, so the other half of the fix (a paged load shrinking its arena when it finds less RAM) was not exercised on this machine.
README line 56 says "In 0.3.1 a set --parallel of 2 or more on a paged Qwen3.8 plan fails at load". The 48 GiB plan pages 11.9 GB and loads with --parallel 2 and the MTP draft on. In the code the condition is an arena above 0 (nvme_arena_of gives none from half the host leg on, and the check in serve_seats/qwen38.rs is nvme_arena_bytes > 0), so I think the behavior is intended and only the README wording ("paged") is broader than the rule.
With no limit, the default context also changed from run to run (4096 once, 12288 the next time, same command). A few hundred MB of MemAvailable decide it. The numbers are in the last section.
Setup
Built from main at e659f4fe: bloomery-serve 0.3.1 (commit e659f4feb1b4). The commits after the v0.3.1 tag change only docs.
cargo oxide build --arch sm_86 with LLVM 21.1.8 llc, CUDA toolkit 13.3 (nvcc V13.3.73).
Ryzen 9 9950X, 64 GB DDR5 in two channels, Ubuntu 26.04.1, kernel 7.0.0-38. RTX 5090 on driver 595.99.02 (it reports CUDA 13.2), power limit 600 W (the default), persistence mode off. CPU governor powersave with EPP balance_performance. The model files are on a PCIe 4.0 NVMe drive.
"48 GiB" means systemd-run --user --scope -p MemoryMax=48G -p MemorySwapMax=0 (systemd reads G as GiB).
Requests: greedy, thinking off, 256 tokens, streamed. TTFT is measured on the client.
No other GPU process at any server start.
The two refusals
Version, limit
ctx
Paged from NVMe (B)
Need (B)
RAM read (B)
Result
0.3.0, no limit
16384 x 2
0
61,106,184,192
60,943,515,648
refused, short by 162,668,544 B
0.3.1, no limit
4096 x 2
0
59,660,632,064
60,422,967,296
loads
0.3.0, 48 GiB
4096 x 2
11,351,040,000
51,416,612,864
51,253,768,192
refused, short by 162,844,672 B
0.3.1, 48 GiB
4096 x 2
11,887,206,400
50,880,446,464
51,419,353,088
loads
For 0.3.0, "RAM read" is the load's own reading from the refusal message. For 0.3.1 it is the room= on the plan line. In every 0.3.1 load I ran, room minus plan_room is exactly 536,870,912 B. The 48 GiB plan now pages 536,166,400 B more than 0.3.0 did. Every one of these loads has tier=0 (the arena's bytes) on its cache line and no nvtier record.
Speed at the defaults
These runs went back to back, about 10 s apart, with the client's default settings (each request has its own nonce, prompt cache by the default rule). The 1-min load average at the start of a run was up to 10, probably left over from the previous server. The ~4K prompt from my first comment is replaced by a 3.2K one, because it has to fit a 4096 slot. Each server got one warm-up, the short prompt twice, then the long prompt twice, and the two values per cell are those two runs. So these are each server's first requests, and the 48 GiB runs were still speeding up then (compare C's first values in the next section). Under 48 GiB every pick of the long prompts was also refused (96 of 96 on the ~3.2K prompts, 192 of 192 on the ~5.6K ones), which may play a part too. I have not separated these.
Limit
ctx
Prompt
prompt_n
prompt_per_second
TTFT
predicted_per_second
no limit
12288 x 2
short
38
109 / 124
0.37 / 0.33 s
43.8 / 47.7
no limit
12288 x 2
~3.2K
3,222
464 / 489
6.96 / 6.61 s
52.6 / 56.1
48 GiB
4096 x 2
short
39
75 / 67
0.54 / 0.60 s
71.7 / 74.4
48 GiB
4096 x 2
~3.2K
3,223
308 / 446
10.52 / 7.26 s
49.5 / 60.0
The ~5.6K prompt needs --ctx-size 8192, which serves one slot:
Limit
Prompt
prompt_n
prompt_per_second
TTFT
predicted_per_second
no limit
short
40
121 / 132
0.35 / 0.32 s
55.4 / 59.8
no limit
~5.6K
5,620
539 / 594
10.44 / 9.48 s
54.2 / 60.0
48 GiB
short
41
97 / 87
0.44 / 0.49 s
76.3 / 83.4
48 GiB
~5.6K
5,621
448 / 599
12.56 / 9.41 s
43.3 / 56.6
Device reads on the NVMe drive (/proc/diskstats) over each whole set of five requests, warm-up included: 5.3 GB (no limit, defaults), 43.4 GB (48 GiB, defaults), 8.2 GB (no limit, 8192) and 53.1 GB (48 GiB, 8192).
The residency arms
Same card plan in every arm: --ctx-size 8192 --parallel 2 --cache-ram 0, so 4096 x 2 with 5,876 card experts and 18,700 host experts, and no prompt cache. C and D page 11.9 GB of the host experts. Every arm got the same request bodies: one warm-up, then 18 short requests (33 prompt tokens, 256 generated). Each is the prompt "Write a short story about a lighthouse keeper who finds a message in a bottle." with a tag in front: [warm], then [q00] to [q17]. The order was A, D, B, C, then C again from a cold page cache. Each server started only once the 1-min load average was under 1 and no other GPU process was running, and samples every 5 s showed no other GPU process during the runs.
Apart from "First 5 median", the columns after "Residency word" cover the last five requests:
Arm
Residency word
Decode tok/s, last 5
Median
First 5 median
Draft accepted
Moves landed
Copy bytes issued
wait_us
unresident
Drive reads
A: no limit, unset
mid-p114-s1, pool 404
56.9, 53.8, 56.0, 53.2, 54.4
54.4
54.1
497/834
3,598
11.3 GB
98
0
0.11 GB
B: no limit, off
off
43.1, 43.1, 43.5, 43.1, 47.2
43.1
46.4
91/138
0
0
0
0
0.03 GB
C: 48 GiB, unset
mid-p0-s1, pool 0
106.1, 101.3, 94.8, 99.0, 98.2
99.0
81.6
250/496
1,396
4.4 GB
10
574
1.14 GB
D: 48 GiB, off
off
43.1, 44.5, 44.7, 43.0, 43.6
43.6
43.9
174/303
0
0
0
0
0.05 GB
C, cold page cache
mid-p0-s1, pool 0
106.2, 107.0, 111.9, 105.9, 97.6
106.2
76.8
550/997
1,008
3.2 GB
4
427
1.19 GB
"Moves landed" is the landed count, "Copy bytes issued" the bytes sum and unresident the unresident sum of the residency pass records. unresident counts sends to the host from outside the host set, not distinct experts, and says nothing about the page cache. "Drive reads" are all reads on the NVMe drive over the window (/proc/diskstats), not only the model's.
Tapes (toktape 0.7.4, same binary and server arguments, the 20th request on each server after the warm-up and 18 requests): A, B, C, D. Each tape is one short request, so its decode (52.3, 41.4, 97.4 and 41.2 tok/s) is a few percent off the medians above. C's tape carries machine_contended because of I/O pressure (7.7 at the start of the recording, over toktape's threshold of 5), with no other GPU process and a 1-min load average under 1 when the server started. I think that pressure is C's own faulting on the file mapping.
With residency off, the two settings decode at the same speed (43.1 and 43.6). With it on they decode at 54.4 and 99.0.
The expert stream follows residency: split in A and C, off in B and D. split also admits at each prompt call (the call stream records), and that admit is part of residency: over the last five requests A admitted 292 experts (914 MB) this way and C none. The streaming half does not run here. A unit narrower than xstream_m_min streams nothing (xstream.rs), and that was 5,835 in A and 8,722 in C against 33-token prompts. The logs have no xstream record.
The MTP gate opens and closes on measured cost, and in every arm but cold C some requests ran with it nearly closed (draft_n of 13 or less). Those requests alone decode at 54.0 to 55.4 (A), 43.0 to 43.5 (B), 94.8 to 99.0 (C) and 42.7 to 43.3 (D), so the draft is not what separates the arms.
C reads about 1.1 GB from the drive over five requests, A about 0.1 GB, most likely for the victims and host experts served from the file mapping.
C rises over its first requests and is flat from about the sixth. A and D are flat from the start. B falls from about 48 to 43 over its first five, while its draft count drops (its last request, with the gate open again, is 47.2).
Page cache: the runs went back to back, so in the warm arms most of the model was already in the page cache, charged to other cgroups. At the end of the run, the D scope's memory.stat showed 3.4 GB of file pages (memory.peak 5.1 GB) and C's showed 14.3 GB (peak 15.1 GB). For the cold arm I dropped the model files' pages first with posix_fadvise(POSIX_FADV_DONTNEED) and no server running: Cached fell by 59.7 GB, and mincore showed no resident page left in any model file. The load then read 73.6 GB from the drive, and the scope held 48.1 GB of file pages before the first request. It sat at its limit (memory.peak 51,539,607,552 B, which is 48 GiB, no OOM) and was still reclaiming during the last five requests (max events about 2,615 at their start and 2,816 at the end, with 50.7 GB of file pages charged), and it decoded at 106.2 tok/s there. So page cache left over from earlier runs, outside the scope, is not what makes the 48 GiB run fast.
The default context and a 5.6K prompt
Whenever the default came out at 4096 a slot, the ~5.6K prompt got a 400:
{"error":{"code":400,"message":"the prompt has 5652 tokens and the context holds 4096","type":"exceed_context_size_error"}}
Under 48 GiB the default was 4096 in every run. With no limit it was 4096 in one run and 12288 in the next, with the same command. The plan numbers explain the jump:
The checkpoint reserve grows in steps of 130,162,688 B a slot. The cache line shows 520,650,752 B at 4096 x 2 and 1,041,301,504 B at 12288 x 2. The default search takes contexts in multiples of 256 positions (CTX_STEP), so the smallest one above 4096 is 4352, and it already adds one checkpoint step to each slot: 260,325,376 B on two slots. A deeper context also moves card experts to the host for its KV, so 260 MB is the least it costs.
On a plan that pages nothing, the default search keeps a deeper context only while it still pages nothing and its host need fits plan_room. In the 4096 run, plan_room minus the need at 4096 x 2 was 225,464,320 B, less than that one step. In the 12288 run it was 1,003,790,336 B. The need at 4096 x 2 is 59,660,632,064 B in every no-limit run that planned 4096.
Under 48 GiB, plan_room minus the need at 4096 x 2 was 2,035,712 B or less in every run (774,144 B in the lowest). Any added host need of a deeper context (260 MB or more) is paged, which is more than nvme_bound (118,872,064 B, a hundredth of the base's NVMe bytes) allows, so ExpertBytes::within (ctx.rs:126-134) turns it down. I worked this out from the code and the plan numbers, not from a trace.
The two room= readings differ by 778,326,016 B, and 649,703,424 B of that was there before the servers started: MemAvailable was 60,846,829,568 B before the first run and 61,496,532,992 B before the second, and the difference sat in "used" memory. The first run started 11 s after a source build finished. Rebuilding one binary after touching a source file (7.59 s) left MemAvailable about 487 MB under idle, back within about 30 s, so that build is the likely cause, though I did not rerun the full build to confirm it. Whether a 4096 default on a 64 GB host is intended, I don't know; a few hundred MB decide it.
Thank you. This is a large finding. 54.4 → 99.0 tok/s from the residency word alone, with residency off equal in both settings, points straight at the rule.
We will take it. The plan: when an unpaged stack's churn pool does not fit the host need, leave it out instead of raising P. Victims outside the host set are then served from the file mapping, as your 48 GiB arm already does (574 unresident, wait_us 10). This changes the stated "no fault" contract in churn.rs, so the change rewrites it with your numbers as the reason. We will reproduce the P climb on our box with a tight host room before and after.
The default context flipping between 4096 and 12288 on the same command is a bug too. We will make it stable across runs and link the fix here.
README line 56: you are right, the condition is an arena above 0. We will fix the sentence.
Here are the RTX 5090 numbers on v0.3.1, at serving defaults.
Machine
RTX 5090 (32 GB), driver 610.57.01 (KMD 610.88), CUDA UMD 13.3, power cap 575 W.
Core Ultra 9 285K, 196 GiB RAM in WSL2 (24 CPUs), on a Windows host whose power plan is High performance.
No other compute job ran. The card also drives the Windows display, which held about 1.2 GiB at 1 % utilisation before each sitting (9 % and 1.6 GiB before sitting 2). No BLOOMERY_* variable was set.
nvidia-smi and free -g before the third sitting:
| NVIDIA-SMI 610.57.01 KMD Version: 610.88 CUDA UMD Version: 13.3 |
| 0 NVIDIA GeForce RTX 5090 On | 00000000:02:00.0 On | N/A |
| 33% 38C P8 17W / 575W | 1218MiB / 32607MiB | 1% Default |
total used free shared buff/cache available
Mem: 196 2 70 0 125 193
Swap: 0 0 0
Binary
The v0.3.1 release tarball: bloomery-serve 0.3.1 (commit f9ae95242d7b).
Requests
-m, --host and --port only.
Greedy (temperature 0), thinking off (enable_thinking: false), up to 256 tokens, cache_prompt off.
One warm-up was discarded, then two runs of each prompt.
TTFT is timed on the client, from sending the request to the first streamed content token.
The long prompt is the first 18,500 bytes of the GPL-3 text, 4,013 tokens.
Qwen3.6-35B-A3B Q4_K_M (lmstudio-community)
It loads whole on the card, ctx 208896 × 2:
whole fit at ctx 417792: the whole load on GeForce_RTX_5090: fits: need 32347477348 B = weights 21311258624 B (the allocator's granules; 21155768832 B of buffers) + cache 8707375104 B + context 536870912 B + scratch 67108864 B + reserves 0 B + arena 1456428388 B + reserve past it 268435456 B, of 32429309952 B the card had (32429309952 B free of its usable 34189869056 B at plan time)
load arch=qwen35moe resident_bytes=31394893916 cache=f16 ctx=208896 slots=2 slot_ctx=208896 layers=40 ubatch=4096 graph_nodes=520 in 2.4 s
Prompt
prompt_n
prompt_per_second
predicted_per_second
TTFT
short
22
983 / 492
202.4 / 192.4
29 / 50 ms
~4K
4,013
6,411 / 6,905
207.0 / 238.9
635 / 590 ms
Qwen3.8-Flash-Next UD-Q4_K_XL (unsloth), with its MTP draft file (mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf) beside it
At serving defaults it loads with no refusal. The experts are split between the card and the host:
One caveat: Qwen3.6's decode moved between sittings on this host.
I ran the protocol three times within seven minutes. The first two sittings used shorter long prompts, 1,241 and 2,966 tokens, before I fixed the length; the tables above come from the third. Here is the decode rate of all four runs of each sitting, in the order short, short, long, long:
Sitting
Qwen3.6 tok/s
Flash-Next tok/s
1
264 / 273 / 261 / 284
23.3 / 24.8 / 25.2 / 33.1
2
159 / 139 / 164 / 164
19.9 / 22.5 / 24.3 / 31.4
3
202 / 192 / 207 / 239
20.7 / 23.5 / 20.9 / 28.7
Flash-Next stays within about 20–33 tok/s, and its second long run is the fastest in every sitting. My guess is host-expert residency warming up, but I did not measure it.
Qwen3.6 loads whole on the card, yet its decode moved by up to almost 2× between sittings. The slowest sitting, sitting 2, also started with the display at 9 % and 1.6 GiB.
An idle nvidia-smi -q before sitting 3 showed no active clock-event reason. I did not sample during the runs, so I have not pinned the cause down.
If you want a steadier Qwen3.6 row, I can run a longer sitting with more runs and clock sampling in a later window, and report the median.
I reran the residency arms on the same RTX 5090 machine with 64 GB of RAM at main 7f3448bb (after a6fdc891), and checked the load again at current main b289130a. Two results:
With BLOOMERY_RESIDENCY unset and no memory limit, the load can be refused. Today it was refused in 5 of 10 starts across three builds, each time short by 5 to 58 MB. The unset rule picks a word whose churn pool fits one MemAvailable reading, and the load's own check reads MemAvailable again, lower. 0.3.1 has the same rule, so this is not new in a6fdc891. It also means "with no limit it loads" in my last comment was wrong; I have struck it through there. Section 1 has the starts, the code that says a default should not refuse, and two possible directions.
mid-p0-s1-unhosted against mid-p114-s1, the word the unset rule selects on this plan. In these runs the unhosted word was faster on warmed short-request decode, 109.0 against 55.6 tok/s [derived: the median of the four server runs' medians on each side; 256-token greedy replies to a 33-token prompt, MTP draft on, two slots, RTX 5090]. It was slower on the long prompts, in the prompt pass and in the decode after it. Section 2 has the numbers and how the conditions differ from the A6000 card.
1. The unset word can fail to load
With no limit, the unset word was refused at load in 5 of 10 starts today. Starts are numbered in the order they ran. Main moved to b289130a while I wrote this. No commit in 7f3448bb..b289130a touches crates/levers, crates/gpu-gates/src/residency.rs, crates/gpu-gates/src/residency38.rs, crates/placement/src/placement/churn.rs, crates/placement/src/placement/workstation.rs, crates/gpu/src/model.rs or crates/model/src/placement/workstation.rs, and I ran starts 7 to 10 on it after the timed runs.
Start
Build
Word picked
Left past the pool at the cache line (MB)
plan line room minus the load's reading (MB)
Short by (MB)
Result
1
7f3448bb
mid-p115-s1
-4
22
41
refused
2
7f3448bb
mid-p113-s1
11
151
45
refused
3
7f3448bb
mid-p113-s1
6
162
51
refused
4
e659f4fe
mid-p114-s1
149
loaded
5
7f3448bb
mid-p114-s1
150
loaded
6
e659f4fe
mid-p113-s1
16
180
58
refused
7
b289130a
mid-p115-s1
116
loaded
8
b289130a
mid-p113-s1
69
178
5
refused
9
b289130a
mid-p114-s1
109
loaded
10
b289130a
mid-p114-s1
34
loaded
The fourth column is the cache line's available less its need and the picked word's pool. The fifth is the plan line's room less the available in the refusal message. Both are [derived]; the bytes they come from are in the collapsed table at the end of this section. Each refusal is from GpuModel::load_placed, for example start 2:
bloomery-serve: GpuModel::load_placed: the host has 61031981056 B available [...], under the 61077336064 B this load needs by 45355008 B: host experts 58603110400 B + tables 0 B + ring shadows 0 B + reserves 7752151040 B + residency churn pool 1416704000 B − the OS reserve 6694629376 B, which MemAvailable leaves out already. [...]
The code says a default should not end this way:
crates/gpu-gates/src/residency.rs:46-50, on PlanRoom::mem_left: it is the term the load's own check uses, "so a word this keeps passes the load".
crates/levers/src/lib.rs:1789-1790: "a default the user did not set never refuses the load".
crates/gpu-gates/src/residency38.rs:241-243: the load refuses a host set past the available bytes, and "the default leaves the pool out instead".
What I read from the code and the logs:
The climb (room_for, crates/levers/src/lib.rs:1505 and the loop after it) takes the first P whose churn pool fits both the plan's host headroom and mem_left, with no margin. mem_left (residency.rs:51-55) is a fresh MemAvailable read less the plan's host need. The headroom in the residency host record is 203,715,739,648 B, far past any pool here, so mem_left is the budget that decides.
The load reads MemAvailable again right after Gpu::open_card (crates/gpu/src/model.rs:1856-1858) and checks the plan's need plus the pool against that reading (HostNeed::of(plan, extra_bytes).grant, model.rs:1869-1870).
The pool fit at the climb's reading, so that reading was at least the shortfall (5 to 58 MB) above the load's [derived]. The climb's own reading is not logged. In the refused starts the plan line's room was 22 to 180 MB above the load's reading. The load reads after it opens the card, so the drop is likely memory the start of the load takes. HOST_DRIFT (512 MiB, crates/placement/src/placement/workstation.rs:864-869) is the bound for exactly that, and the plan is made at its read room less HOST_DRIFT (plan_room, workstation.rs:876-881). The climb's room keeps no such margin.
One P step changes the pool by 150,425,600 B, so at the climb's reading the leftover past the chosen pool is under one step (150.4 MB) [derived]. Whether the default loads then depends on where MemAvailable falls inside one step, and on how far it drops before the check. The leftover at the cache line does not predict the result alone: start 8 was refused at 69 MB and start 10 loaded at 34 MB. The rule also reads MemAvailable more than once per start. Start 1's cache line counts the pool at P 116 (965,427,200 B), while its residency unset record picks P 115.
This is not new in a6fdc891. PlanRoom::mem_left is the same code in v0.3.1, e659f4fe and b289130a, and the climb follows the same rule in all three (the first P that fits, no margin); a6fdc891 keeps it for an unset word "as before". The e659f4fe binary from my last comment was refused today too (start 6). The six no-limit starts behind my last comment used that binary and all loaded, on three plans (4096 x 2, 12288 x 2 and 8192 x 1), with 61 to 142 MB left past the pool at the cache line. The -unhosted and mid-p114-s1 words, set by hand, loaded in all 8 of their starts today.
I think the gate misses this because of how it sets the room. churn_unset_climbs (crates/gpu-gates/src/bin/gate_qwen38_serve.rs:2810) stops at --plan and runs under BLOOMERY_HOST_ROOM (gate_qwen38_serve.rs:2573). A stated room replaces both readings (host_available, crates/model/src/placement/workstation.rs:8-15) and plan_room keeps it whole, so the climb and the load would see the same bytes, HOST_DRIFT drops out, and the server stops before it loads. The A6000 A/B in docs/cards/churn-unhosted.card also ran under a stated BLOOMERY_HOST_ROOM. Seeing the refusal takes the machine's own MemAvailable reading and a real load. On this machine that is the server command in the setup below, with BLOOMERY_RESIDENCY unset and no limit, started a few times in a row.
Two directions I can see, for you to choose between or set aside:
(a) Take HOST_DRIFT off the climb's room as well. On this plan that costs 3 to 4 P steps [derived: 536,870,912 / 150,425,600 = 3.57 steps, less a leftover of under one step], so the default would land at P 116 to 119 instead of 113 to 115, with 164 to 308 experts in the churn pool instead of 356 to 452 [derived: 48 experts a P step, from the churn_experts of the three words seen].
(b) When the load's check finds an unset word's pool short, climb again at that reading instead of refusing.
A smaller request either way: could the residency unset record print the climb's own MemAvailable reading? Then the drop above would be a log read instead of a derivation.
The bytes behind the table
Start
cacheavailable
cacheneed
Pool of the picked word
planroom
Load's reading
Short by
1
60,772,085,760
59,660,632,064
1,115,852,800
60,757,389,312
60,735,057,920
41,426,944
2
61,088,784,384
59,660,632,064
1,416,704,000
61,183,164,416
61,031,981,056
45,355,008
3
61,083,500,544
59,660,632,064
1,416,704,000
61,188,202,496
61,026,435,072
50,900,992
4
61,075,800,064
59,660,632,064
1,266,278,400
61,179,641,856
loaded
5
61,077,159,936
59,660,632,064
1,266,278,400
61,170,503,680
loaded
6
61,093,761,024
59,660,632,064
1,416,704,000
61,199,847,424
61,019,394,048
57,942,016
7
60,892,876,800
59,660,795,904
1,115,852,800
60,900,782,080
loaded
8
61,146,628,096
59,660,795,904
1,416,704,000
61,251,133,440
61,072,670,720
4,829,184
9
61,035,966,464
59,660,795,904
1,266,278,400
61,153,488,896
loaded
10
60,960,874,496
59,660,795,904
1,266,278,400
61,053,788,160
loaded
The plan's host need is 59,660,632,064 B at 7f3448bb and e659f4fe and 59,660,795,904 B (163,840 B more) at b289130a.
2. -unhosted against the selected word
These come from the four -unhosted server runs (U) and the four with mid-p114-s1 set by hand (S), the word the unset rule selected in starts 4 and 5. The last set ran U, S, U, S. Medians and ranges are [derived] from the per-request values; sums are over the window named.
U, mid-p0-s1-unhosted
S, mid-p114-s1
short decode, median of last 5
104.1 to 110.9 tok/s
55.4 to 56.2 tok/s
moves landed, last 5 short
1,078 to 1,376
3,438 to 3,554
rereads, last 5 short
0 to 2
0 to 1
prepare_us, last 5 short
0.30 to 0.37 s
0.20 to 0.26 s
drive reads (whole device), last 5 short
1.0 to 1.4 GB
0.11 to 0.16 GB
3.2K prompt, prompt_per_second 1st / 2nd
222 to 317 / 364 to 397
446 to 507 / 488 to 537
3.2K prompt, TTFT 1st / 2nd
10.2 to 14.6 s / 8.2 to 8.9 s
6.4 to 7.2 s / 6.0 to 6.6 s
3.2K prompt, decode 1st / 2nd
34.5 to 41.0 / 50.7 to 61.0 tok/s
47.3 to 58.2 / 57.8 to 62.8 tok/s
rereads over the two long requests, generation included
2,352 to 3,125 (7.3 to 9.8 GB, reread_us 5.0 to 7.9 s)
1 to 13
drive reads (whole device) over the two long requests, generation included
50 to 63 GB
1.3 to 10.9 GB
On the A6000 the card measured the unhosted word at -37.5 % ± 1.1 % against the climbed word on decode, 40.74 against 65.14 tok/s (docs/cards/churn-unhosted.card, a6fdc891), with forced ids, n=1024 at depth 512, the draft off, one slot and a stated room. My short-request result goes the other way on this host, under the conditions in the summary above.
U pays almost nothing for rereads on short replies: 0 to 2 over the last five. prepare_us is lane time summed over the lane's threads (crates/gpu/src/host/swap.rs:1182-1186), so it comes to 0.23 to 0.29 ms of accumulated lane-thread time per generated token for U and 0.16 to 0.20 ms for S [derived: 5 x 256 tokens]. The a6fdc891 message reports 15.6 ms a token for that A6000 run, which is not the same term as mine.
U loses on the long requests. Over the two of them it rereads 7.3 to 9.8 GB from the file mapping, and the drive reads 50 to 63 GB. Its prompt pass is 47 % slower on the first long request and 25 % slower on the second [derived: medians of the four server runs on each side, 263 against 494 and 394 against 524 tok/s]. Its decode after the prompt is about 30 % and 7 % slower [derived: 39.60 against 56.15 and 55.45 against 59.55 tok/s]. This matches the prompt-pass finding in a6fdc891 (2.65 GB reread, pp 138.8 against 1099.7). I would not read prompt length as the cause from these runs alone: the long requests also differ in content, and they started from whatever residency state the 18 short requests left.
The climbed word leaves few card experts free to move on this plan. At P 113 to 115 its churn pool holds 452 to 356 experts (churn_experts in the residency host record), against 5,876 for the unhosted word. About 24 % of the experts sit on the card here [derived: 5,876 of 24,576], against about 58 % for the A6000 plan in the card's own note. On the card's decide-below step ("read the base arm's P first"): the base arm here sits at P 113 to 115, with 122 card experts in the fewest layer. That may be why freeing every card expert pays here and did not on the A6000. I have not tested that link.
One question from this: is it intended that the unset rule looks only at whether the pool fits, and not at how many card experts the climbed P leaves free to move?
Before and after, on the same plan (4096 x 2, 5,876 card experts, 18,700 host experts) and the same request bodies, median of the last five of 18 short requests:
Arm
e659f4fe, my last comment
7f3448bb
no limit, unset
54.4 (mid-p114-s1)
53.9 (start 5, mid-p114-s1, the one of four 7f3448bb starts that loaded); the e659f4fe binary today: 53.8 (start 4, mid-p114-s1)
no limit, mid-p114-s1 set by hand
55.4, 56.2, 55.5, 55.7
no limit, mid-p0-s1-unhosted
109.7, 104.1, 108.3, 110.9
48 GiB, unset (mid-p0-s1, paged, pool 0)
99.0
105.8, 103.4
no limit, off
43.1
44.1, 44.3
Two things changed between the columns: the build (145 commits) and the CPU governor. Today's timed runs used performance; my last comment used powersave. So I would not read much into differences of a few percent across the columns, such as off going from 43.1 to 44.1 and 44.3.
Setup and evidence
Builds: bloomery-serve 0.3.1 (commit 7f3448bb001e) from a source archive of 7f3448bb, for starts 1 to 3, 5 and every timed run. bloomery-serve 0.3.1 (commit e659f4feb1b4), the binary from my last comment, built as described there, for starts 4 and 6. bloomery-serve 0.3.1 (commit b289130a) from a source archive of b289130a, for starts 7 to 10 (load only, after the timed runs and after Ubuntu package updates with no kernel, driver or CUDA change). The 7f3448bb and b289130a builds used cargo oxide build --arch sm_86 -- -p bloomery-gpu-gates --features glm5next,clef,vision,mimo2 --release --bin bloomery-serve with LLVM 21.1.8 llc and CUDA toolkit 13.3 (ptxas V13.3.73).
nvidia-smi: NVIDIA GeForce RTX 5090, 595.99.02, P8, Disabled, 600.00 W, 600.00 W, 600.00 W, 3090 MHz, 1, 5, 16 (name, driver, pstate, persistence, power limit, default, max, max SM clock, PCIe gen current and max, width). The card runs an undervolt curve that is flat at 2557 MHz, unchanged since my earlier numbers.
SM clock during the windows (nvidia-smi dmon -s pct, 1 s, last set): U 2520 MHz median (2520 to 2542), S 2535 MHz median (2527 to 2550); 2542 to 2550 MHz during the 3.2K prompt passes for both.
Ryzen 9 9950X, 64 GB DDR5 in two channels, Ubuntu 26.04.1, kernel 7.0.0-38, amd_pstate active. CPU governor performance for the timed runs and starts 1 to 6; the four b289130a load-only starts (7 to 10) ran under powersave.
Model: --hf unsloth/Qwen3.8-Flash-Next-GGUF:UD-Q4_K_XL (four shards, 111,334,654,784 B) with mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf, the same cached files on the same PCIe 4.0 NVMe drive as my last comment.
Server: bloomery-serve --hf unsloth/Qwen3.8-Flash-Next-GGUF:UD-Q4_K_XL --host 127.0.0.1 --port 8080 --ctx-size 8192 --parallel 2 --cache-ram 0, with BLOOMERY_RESIDENCY unset, off, mid-p114-s1 or mid-p0-s1-unhosted. The 48 GiB arms ran under systemd-run --user --scope -p MemoryMax=48G -p MemorySwapMax=0.
Requests: one warm-up, 18 short requests with the same bodies as last time ([q00] to [q17] before "Write a short story about a lighthouse keeper who finds a message in a bottle.", 33 prompt tokens, 256 generated), then two long requests ([l00], [l01]: "Summarize what the following Python code does, module by module." and 14,000 characters of Python standard library source, 3,213 prompt tokens, 256 generated). Greedy, thinking off, streamed, no prompt cache. Every server started with a 1-minute load average under 1 and no other GPU process.
rereads, prepare_us and moves landed are sums of the residency pass records over the window. Drive reads are the change in /proc/diskstats for the NVMe drive over the window, so they count every read on the device, not only the model's.
Order: unset, U, 48 GiB, off, off, 48 GiB, U, unset; then unset, S, unset (e659f4fe), unset, S, unset (e659f4fe); then U, S, U, S; then the four b289130a starts.
With BLOOMERY_RESIDENCY unset, the climb now fits its pool to plan_room, so the default Qwen3.8 load keeps the 512 MiB HOST_DRIFT margin instead of being refused. Thanks @juliankang4 for the report.
We didn't re-measure a 64 GB host for this release, so the 64 GB shape itself is untested here. Could you confirm the default load works on your machine?
Confirmed on the same RTX 5090 machine with 64 GB of RAM: at v0.3.2 (9bd7d577) the default Qwen3.8 load with BLOOMERY_RESIDENCY unset loaded in 10 of 10 starts, and each start answered "Paris".
The command is the one from my earlier reply, with no memory limit and no BLOOMERY_HOST_ROOM:
Each start waited for a 1-minute load under 1 and no GPU process, sent one chat request ("What is the capital of France? Answer in one word.", temperature 0, thinking off), then shut the server down. I alternated five v0.3.2 starts with five starts of the earlier build b289130a, then ran five more v0.3.2 starts.
Build
Loaded
Word picked
room (GB)
plan_room (GB)
mem_left (MB)
v0.3.2 9bd7d577
10 of 10
mid-p117-s1 2, mid-p118-s1 7, mid-p119-s1 1
60.84 to 61.04
60.31 to 60.50
645 to 840
b289130a
4 of 5
mid-p114-s1 3, mid-p115-s1 2
The v0.3.2 columns are from the new residency unset record (read=MemAvailable on every start). room less plan_room is 536,870,912 B on every start, the HOST_DRIFT margin, and the climb now stops on a word two to five P steps higher than before, with a churn pool of 514 to 815 MB against 1,116 to 1,266 MB on b289130a. The refused b289130a start was short by 23,982,080 B with a 1,266,278,400 B churn pool, the same failure as in my earlier reply.
I did not time the new words; this was a load check only, at the default CPU governor.
One thing from my earlier reply is unchanged: the residency host record still prints headroom=203715575808 (203.7 GB) on every start of both builds, on a 64 GB host. I still can't explain that number.
Setup: RTX 5090 (driver 595.99.02), Ryzen 9 9950X, 64 GB RAM, kernel 7.0.0-38. Model files are the same cached UD-Q4_K_XL shards and MTP file as the earlier reply.
Thanks for confirming: the default load with BLOOMERY_RESIDENCY unset loads 10 of 10 on the 64 GB RTX 5090 at v0.3.2. That closes the gap we left untested.
Written by the bloomery AI assistant on behalf of the maintainer.
Activity
juliankang4 commentedon Oct 11, 2026
진행 중입니다 😊
midagedev commentedon Oct 11, 2026
@avlp12, could you give the same numbers from your RTX 5090 (Core Ultra 9 285K, 196 GiB, WSL2)? A 5090 row in the README would come from your run, credited to you.
The protocol is the same as above, with these differences:
Binary
v0.3.0works: it carries sm_86 PTX, and the driver compiles it for the 5090 at the first start, which takes tens of seconds.Models
UD-Q4_K_XL(your file from hardware: RTX 5090 / Core Ultra 9 285K (24 cores, 196 GiB RAM, WSL2) / Qwen3.8-Flash-Next UD-Q4_K_XL #2).Q4_K_M, which fits whole on 32 GB.What to paste
planline from the server log.timingsfields,nvidia-smiandfree -gas above.[-]dgx-spark: 0.3.0 numbers for the README, at serving defaults[/-][+]0.3.0 numbers for the README at serving defaults: DGX Spark and RTX 5090[/+]midagedev commentedon Oct 11, 2026
Optional, only if you have the disk: GLM-5.3-Flash
UD-Q4_K_XL(199.7 GB) and DeepSeek-V4.1-FlashQ3_K_M(347.3 GB). In 0.3.0 both run on less RAM than they need: the host experts that do not fit RAM are paged from NVMe (thenvtierline in the log).What to expect
A known 0.3.0 issue
BLOOMERY_NVTIER_BYTES=0, which pages through the file mapping and loads.juliankang4 commentedon Oct 12, 2026
이건 @avlp12님의 하이엔드 환경과 다른 환경이라 따로 올립니다.
An RTX 5090 with 64 GB of RAM on native Linux. The Qwen3.8 file hits the known refusal you describe above, and
BLOOMERY_NVTIER_BYTES=0does not get past it here.Binary
v0.3.0release tarball:bloomery-serve 0.3.0 (commit 8d937828d741).Requests
--hf,--hostand--portonly. Greedy (temperature 0), thinking off, 256 tokens. One warm-up was discarded, then two runs of each prompt. TTFT is timed on the client, from sending the request to the first streamed content token.Qwen3.6-35B-A3B
Q4_K_M(lmstudio-community)It loads whole on the card, ctx 227328 x 2. This seat prints a whole-fit line instead of a
planline:prompt_nprompt_per_secondpredicted_per_secondQwen3.8-Flash-Next
UD-Q4_K_XLAt serving defaults the load is refused, with no cgroup limit and nothing paged:
With
BLOOMERY_NVTIER_BYTES=0it is refused the same way, with and without a limit:systemd-run --user --scope -p MemoryMax=48G -p MemorySwapMax=0The 48G run's
cacheline already saysarena 0 Bwithout the lever, so the lever changes nothing there.Two things I noticed in the logs, in case they help the fix:
ExpertBytes::within,crates/placement/src/placement/ctx.rs:106), so the plan ends just under the room it read. More free memory only buys a deeper context: 9216 x 2 in an earlier run, 16384 x 2 here, and both were refused.cacheline read moments earlier. The plan's own reading is not printed, so the full drop is not visible in the log.BLOOMERY_HOST_ROOM=56Gloads: ctx 7680 x 2, every host expert in RAM, MTP draft on. Same requests as above:prompt_nprompt_per_secondpredicted_per_secondI can paste the full logs if they help.
Tapes
One toktape tape a request, same conditions as the tables (toktape 0.7.3,
--temp 0 --no-think -n 256, hostname left out, prompt text left out):BLOOMERY_HOST_ROOM=56G, short: https://tape.midagedev.com/r/w4yd5hqpspzz25dstx56BLOOMERY_HOST_ROOM=56G, ~4K: https://tape.midagedev.com/r/h2qcf5pa26wrj76gduaeMachine
nvidia-smireports CUDA 13.2). No other GPU process ran.amd-pstate-epp, governorpowersave, EPPbalance_performance.nvidia-smiandfree -gmidagedev commentedon Oct 12, 2026
Thank you. These are clear numbers, and the logs pin the bug.
The refusal is the one we found on a 12 GB card this morning:
Your logs show more than we had. The case with nothing paged fails the same way, because the context search grows to the edge. And
BLOOMERY_NVTIER_BYTES=0does not help there. The fix in our next landing does two things:I will add your numbers as a test case. Until then,
BLOOMERY_HOST_ROOMis the workaround, as you found.The Qwen3.6 rows and the tapes will go into the README table with your name. Please keep the full logs; I will ask if the test needs them.
juliankang4 commentedon Oct 12, 2026
Here are the 0.3.0 numbers from a DGX Spark, at serving defaults, in the order you asked for them.
Build and binary
The tree is
git archive 8d937828(thev0.3.0tag) with no local changes, built natively on the Spark in a CUDA 13.3.1 container (aarch64) with the pinned toolchain:nightly-2026-08-28,cargo-oxide0.2.1 from the fork at87bc9518, LLVM 21.1.8.cargo oxide doctorpassed. The command is the release script's feature set:So the binary carries sm_86 PTX that the driver JIT-compiles for the GB10, and the host code is built for the Spark's own CPU through the tag's aarch64 row (
target-cpu=native). A cold build took about 3 minutes, with the container start andcargo oxide doctor. The aarch64 build needed nothing thatdocs/BUILD.mddoes not cover; the.cargofiles at the tag already have the aarch64 rows.One thing someone building from source will run into:
--versionreads onlyBLOOMERY_BUILD_COMMIT, which the release script sets, so a source build without it says(commit unknown)./propsengine.version(and so toktape's ENGINE line) takesBLOOMERY_GIT_COMMIT, else the tree's git commit, so a tree without.git, such as agit archiveexport, says0.3.0 (unknown)there.BUILD.mdnames neither variable. My first build set only the first one and the tape saidunknown, so I rebuilt with both. They are read by cargo only; the server ran with noBLOOMERY_*set (below).Server
env | grep BLOOMERYprinted nothing before each start. No--parallel, no--ctx-size. The startup lines are in the details under each table.Requests
POST /v1/chat/completionswith"stream": true,"temperature": 0,"max_tokens": 256and"chat_template_kwargs": {"enable_thinking": false}./propsreportsthinking_off: "switch"for both models, and no response carriedreasoning_content.docs/serving.md, a blank line and "Explain in detail what the document above says, section by section." That is 4,087 tokens as the server counts it (/chat/completions/input_tokens), the same for both models.cache_promptis on by default), so itsprompt_nis not a prefill. To get two uncached 4K prefills I added a third 4K run on another text of the same size: the first 131 lines ofdocs/BUILD.mdin the same frame, 4,092 tokens. It ran between the two pairs.delta.contentis non-empty. On both models the role chunk and the first content chunk arrive together.finish_reason: "length").Qwen3.6-35B-A3B
Q4_K_Mlmstudio-community's upload at
68a34855, 21,166,757,728 bytes, sha2564ac6a06bce551257267f49ad2226f8671a22519ccc1a4dde9d5b433d1f2a410d.prompt_ncache_nprompt_per_secondpredicted_per_secondThe whole model sits on the card, with 262,144 positions a slot and 2 slots. The load took 2.2 s. This model prints a
whole fitline instead of aplanline.Startup lines
toktape (0.7.2,
--temp 0 --no-think, default 20 s run): https://tape.midagedev.com/r/xuusjvqt9nk3rwadn3rqQwen3.8-Flash-Next
UD-Q4_K_XLunsloth's upload at
766911a6, the 4 shards as listed by the Hub (sha256 checked), and the MTP draftmtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf(sha2565ff54097406a905cf3a724c709124ceb0e3e10235ee862298969e91c96fa96e6) beside the first shard, where--hfputs it, so the draft is on as it is by default.prompt_ncache_nprompt_per_secondpredicted_per_secondThe plan puts all 24,576 routed experts on the card (
host_experts=0), so residency stays off, with 196,608 positions a slot and 2 slots. The load took 35.4 s.~4K run 2 kept the cached prefix (4,086 positions, over the break-even of 1,459), and a kept prefix leaves the MTP draft off for that request:
the MTP draft proposes nothing from position 4086 until a request starts from position 0. Its 28.08 tok/s is the plain decode.Short run 2 shows
cache_n0 because the kept prefix (23) is under the break-even, so the server reset the slot and prefilled the whole prompt with the draft on:under the MTP draft a kept prefix of 23 positions is below the break-even of 1459 for a reply of 255 tokens.TTFT on back-to-back requests. On every Qwen3.8 request in the table, TTFT minus
prompt_msminuscache_msis 102 to 162 ms, and each time it equals, within 2 ms, thems=of thecache saveline the previous request left. A stack of theenginethread taken during a save showsBody38::save_state_async→draft_rows→Mtp38::store_host→DeviceBuffer::to_host_vec→cuMemcpyDtoHAsync_v2.store_hostcopies the MTP store's whole K and V planes (all 196,608 positions, the plan'sctx_max, 2 × 201,326,592 bytes) into fresh hostVecs and then picks the firstnpositions, on the engine thread and blocking, so a request that arrives while it runs waits. The save took 161 ms for 101 positions and 161 ms for 4,344, which fits a copy of the whole plane. Thecache saveline saysoff_path=true, but this part is on the path of the next request. Once the save has finished before the next request arrives, the wait is gone: short requests sent 4 to 6 s after the previous one had TTFT =prompt_ms+cache_ms+ 2 to 3 ms (for example 231 ms withprompt_ms201 andcache_ms27). A request whose state the cache already holds triggers no save at all.So the back-to-back TTFT in the table includes 102 to 162 ms of the previous request's save.
Startup lines
toktape (0.7.2,
--temp 0 --no-think, default 20 s run): https://tape.midagedev.com/r/t6ecank6gyum2c2shjicThe tape's decode figure (31.6 tok/s) is lower than the table's. Its run differs in three ways: the prompt is toktape's own set and longer (5,555 tokens), it generated 447 tokens, and the draft accepted 261 of 395 (66 %) against 156 of 211 (74 %) in my ~4K run 1. The tape's prefill probe also sends a request that keeps a cached prefix, which runs with the draft off as in note 1; the stream the tape measures had the draft on.
Conditions
nvidia-smilisted no compute process before and after each server, and onlybloomery-servewhile it ran. No containers ran during the measurements. Load average 0.1 to 1.1 before each server start.platform_profilein sysfs and nonvpmodelorpowerprofilesctl;nvidia-smi -q -d POWERreports every power limit asN/A. The GPU's max clock reads 3003 MHz, and no application clock is set. The CPU governor isperformanceon all 20 cores (10 at a 3.9 GHz max, 10 at 2.8 GHz).nvidia-smibefore the first server:free -gbefore the first server, then with each model loaded:nvidia-smiwhile each server ran:I have the raw request and response streams for every row and can attach them if you want them.
P3의 #45가 릴리즈에 포함되면 Qwen3.8 decode 속도 개선(약 +5~8%)이 더 있을 것으로 예상됩니다.
딥시크와 GLM도 현재 작업이 완료되면 측정 예정입니다.
midagedev commentedon Oct 12, 2026
@juliankang4 Thank you. These notes found real defects. We fix the 5090 load refusal ourselves today: it ships in 0.3.1, and the plan will print the room it read.
Two of your findings are yours to fix if you want. PRs are welcome, and your own card's FAIL-first is enough evidence for us:
Mtp38::store_hostcopies the whole K and V planes (ctx_max) on the engine thread, sooff_path=trueis not true. Copy only the firstnpositions, off the engine thread. A gate clause could pin that the save's bytes follown, notctx_max.--versionand/propsread two different variables, andBUILD.mdnames neither. One variable, with the git fallback in both places, and documented inBUILD.md.If you want to try a third one: the MTP draft stays off after a kept prefix (your note 1). That one needs a design first. Open an issue with your plan before the code.
midagedev commentedon Oct 12, 2026
@juliankang4 One more question. After 0.3.1 ships, we plan a short release video. May we use your DGX Spark and RTX 5090 numbers and your toktape tapes from this issue in it, credited to you by your GitHub name?
We would show them as your measurements on your hardware, with the conditions you gave. We will not compare them with our cards' numbers. If you prefer another credit line, or want us to leave any of them out, tell us here.
juliankang4 commentedon Oct 12, 2026
Yes, you can use the DGX Spark and RTX 5090 numbers and the tapes in the video and in the README, credited to my GitHub ID, @juliankang4.
I'll take all three: pull requests for 1 and 2, and an issue with a plan for 3 before any code.
midagedev commentedon Oct 12, 2026
Thank you. The README now carries your Spark and 5090 rows with your credit, from 0.3.1. We will review the PRs and the issue as they come.
midagedev commentedon Oct 12, 2026
A note on the scope of this refusal in 0.3.0, for anyone who finds this issue.
It is not only Qwen3.8 on the 5090. Any MoE model on a small-RAM host can hit it, by two paths:
Work-arounds in 0.3.0: set
BLOOMERY_HOST_ROOMa little under the free RAM (you loaded at56G), or use a smaller--ctx-size.0.3.1 (today) plans 512 MiB under the reading, and the RAM arena shrinks toward its floor at load instead of refusing.
README: 0.3.0's two-request tables re-measured on the tag (decode at …
1 remaining item
midagedev commentedon Oct 12, 2026
0.3.1 is out: https://github.com/midagedev/bloomery/releases/tag/v0.3.1.
It fixes the small-RAM load refusal reported here. A plan now stays 512 MiB under the RAM it reads.
Thank you again for the numbers. The 0.3.1 release clip uses your RTX 5090 and DGX Spark rows, with credit.
juliankang4 commentedon Oct 12, 2026
I rechecked 0.3.1 on the same RTX 5090 machine with 64 GB of RAM.
Both refusals I reported above are fixed: with no limit it loads (at 4096 x 2 or 12288 x 2, see the last section), and under a 48 GiB memory limit it loads at 4096 x 2 with 11.9 GB paged through the file mapping.Under a 48 GiB memory limit the refusal I reported above is fixed: it loads at 4096 x 2 with 11.9 GB paged through the file mapping. With no limit it loaded in all six runs here, but with residency unset the load can still be refused, now by the churn pool the unset rule adds: the same binary was refused in 1 of 2 later starts (details).I also found something new. On short prompts, the run under the 48 GiB limit decodes faster than the run with no limit: 99.0 against 54.4 tok/s on the same card plan (median of the last five of 18 requests). With residency off, both decode at about 43 tok/s (43.1 with no limit, 43.6 under 48 GiB), so I think adaptive residency is the main cause. After the ~3.2K and ~5.6K prompts I saw no gain, but those were each server's fourth and fifth requests, before the 48 GiB run had settled, so I don't read much into that.
What I checked in the code is why the two settings get different residency words:
ChurnPool::ofcounts no pool for such a stack (churn.rs). Unset residency stays atmid-p0-s1, so every card expert can move (at least 122 a layer on this plan).host_lock.rs). MemAvailable past the plan's need cannot hold that, so P goes up:mid-p114-s1in this run, and p113 to p118 across my 4096 x 2 runs.So my question: could an unpaged stack's churn pool be left out of the plan's host need, so that the unset rule stays at P=0 with no limit too? I know
churn.rssays the pool is there so that the host serves every victim without a fault, and this would give that up.The 48 GiB run shows part of that trade. At decode the recorded cost is small: over the last five requests, 574 experts were sent back to the host from outside the host set (the
unresidentcount), so the host served them from the file mapping, and the recorded staging wait (wait_us) was 10 µs (4,287 and 101 µs over all 18 requests). That count does not say whether their pages were in the page cache, and the wait leaves out the CPU experts faulting on those pages, so it doesn't tell me what fault reads would cost on an all-RAM plan. Prompt calls pay more: a call's pick is refused when its victim is outside the host set (GpuError::Unresident,swap.rs). In the 8192 run under 48 GiB, 332 of 336 picks were refused and 14 experts admitted, against none refused and 1,863 admitted with no limit. As far as I can tell from the code, keeping the pool in the host set but neither populating nor locking it would avoid the refusals:prepare_victimwould read a dropped victim back on the machine's thread (counted inrereads) and the pick would go ahead. I have not tried either.Two smaller notes:
--parallelof 2 or more on a paged Qwen3.8 plan fails at load". The 48 GiB plan pages 11.9 GB and loads with--parallel 2and the MTP draft on. In the code the condition is an arena above 0 (nvme_arena_ofgives none from half the host leg on, and the check inserve_seats/qwen38.rsisnvme_arena_bytes > 0), so I think the behavior is intended and only the README wording ("paged") is broader than the rule.With no limit, the default context also changed from run to run (4096 once, 12288 the next time, same command). A few hundred MB of MemAvailable decide it. The numbers are in the last section.
Setup
e659f4fe:bloomery-serve 0.3.1 (commit e659f4feb1b4). The commits after the v0.3.1 tag change only docs.cargo oxide build --arch sm_86with LLVM 21.1.8llc, CUDA toolkit 13.3 (nvccV13.3.73).powersavewith EPPbalance_performance. The model files are on a PCIe 4.0 NVMe drive.--hf unsloth/Qwen3.8-Flash-Next-GGUF:UD-Q4_K_XL.systemd-run --user --scope -p MemoryMax=48G -p MemorySwapMax=0(systemd readsGas GiB).The two refusals
For 0.3.0, "RAM read" is the load's own reading from the refusal message. For 0.3.1 it is the
room=on the plan line. In every 0.3.1 load I ran,roomminusplan_roomis exactly 536,870,912 B. The 48 GiB plan now pages 536,166,400 B more than 0.3.0 did. Every one of these loads hastier=0(the arena's bytes) on itscacheline and nonvtierrecord.Speed at the defaults
These runs went back to back, about 10 s apart, with the client's default settings (each request has its own nonce, prompt cache by the default rule). The 1-min load average at the start of a run was up to 10, probably left over from the previous server. The ~4K prompt from my first comment is replaced by a 3.2K one, because it has to fit a 4096 slot. Each server got one warm-up, the short prompt twice, then the long prompt twice, and the two values per cell are those two runs. So these are each server's first requests, and the 48 GiB runs were still speeding up then (compare C's first values in the next section). Under 48 GiB every pick of the long prompts was also refused (96 of 96 on the ~3.2K prompts, 192 of 192 on the ~5.6K ones), which may play a part too. I have not separated these.
prompt_nprompt_per_secondpredicted_per_secondThe ~5.6K prompt needs
--ctx-size 8192, which serves one slot:prompt_nprompt_per_secondpredicted_per_secondDevice reads on the NVMe drive (
/proc/diskstats) over each whole set of five requests, warm-up included: 5.3 GB (no limit, defaults), 43.4 GB (48 GiB, defaults), 8.2 GB (no limit, 8192) and 53.1 GB (48 GiB, 8192).The residency arms
Same card plan in every arm:
--ctx-size 8192 --parallel 2 --cache-ram 0, so 4096 x 2 with 5,876 card experts and 18,700 host experts, and no prompt cache. C and D page 11.9 GB of the host experts. Every arm got the same request bodies: one warm-up, then 18 short requests (33 prompt tokens, 256 generated). Each is the prompt "Write a short story about a lighthouse keeper who finds a message in a bottle." with a tag in front:[warm], then[q00]to[q17]. The order was A, D, B, C, then C again from a cold page cache. Each server started only once the 1-min load average was under 1 and no other GPU process was running, and samples every 5 s showed no other GPU process during the runs.Apart from "First 5 median", the columns after "Residency word" cover the last five requests:
wait_usunresidentmid-p114-s1, pool 404offoffmid-p0-s1, pool 0offoffmid-p0-s1, pool 0"Moves landed" is the
landedcount, "Copy bytes issued" thebytessum andunresidenttheunresidentsum of theresidency passrecords.unresidentcounts sends to the host from outside the host set, not distinct experts, and says nothing about the page cache. "Drive reads" are all reads on the NVMe drive over the window (/proc/diskstats), not only the model's.Tapes (toktape 0.7.4, same binary and server arguments, the 20th request on each server after the warm-up and 18 requests): A, B, C, D. Each tape is one short request, so its decode (52.3, 41.4, 97.4 and 41.2 tok/s) is a few percent off the medians above. C's tape carries
machine_contendedbecause of I/O pressure (7.7 at the start of the recording, over toktape's threshold of 5), with no other GPU process and a 1-min load average under 1 when the server started. I think that pressure is C's own faulting on the file mapping.All 18 values per arm:
splitin A and C,offin B and D.splitalso admits at each prompt call (thecall streamrecords), and that admit is part of residency: over the last five requests A admitted 292 experts (914 MB) this way and C none. The streaming half does not run here. A unit narrower thanxstream_m_minstreams nothing (xstream.rs), and that was 5,835 in A and 8,722 in C against 33-token prompts. The logs have noxstreamrecord.draft_nof 13 or less). Those requests alone decode at 54.0 to 55.4 (A), 43.0 to 43.5 (B), 94.8 to 99.0 (C) and 42.7 to 43.3 (D), so the draft is not what separates the arms.memory.statshowed 3.4 GB of file pages (memory.peak5.1 GB) and C's showed 14.3 GB (peak 15.1 GB). For the cold arm I dropped the model files' pages first withposix_fadvise(POSIX_FADV_DONTNEED)and no server running:Cachedfell by 59.7 GB, andmincoreshowed no resident page left in any model file. The load then read 73.6 GB from the drive, and the scope held 48.1 GB of file pages before the first request. It sat at its limit (memory.peak51,539,607,552 B, which is 48 GiB, no OOM) and was still reclaiming during the last five requests (maxevents about 2,615 at their start and 2,816 at the end, with 50.7 GB of file pages charged), and it decoded at 106.2 tok/s there. So page cache left over from earlier runs, outside the scope, is not what makes the 48 GiB run fast.The default context and a 5.6K prompt
Whenever the default came out at 4096 a slot, the ~5.6K prompt got a 400:
Under 48 GiB the default was 4096 in every run. With no limit it was 4096 in one run and 12288 in the next, with the same command. The plan numbers explain the jump:
cacheline shows 520,650,752 B at 4096 x 2 and 1,041,301,504 B at 12288 x 2. The default search takes contexts in multiples of 256 positions (CTX_STEP), so the smallest one above 4096 is 4352, and it already adds one checkpoint step to each slot: 260,325,376 B on two slots. A deeper context also moves card experts to the host for its KV, so 260 MB is the least it costs.plan_room. In the 4096 run,plan_roomminus the need at 4096 x 2 was 225,464,320 B, less than that one step. In the 12288 run it was 1,003,790,336 B. The need at 4096 x 2 is 59,660,632,064 B in every no-limit run that planned 4096.plan_roomminus the need at 4096 x 2 was 2,035,712 B or less in every run (774,144 B in the lowest). Any added host need of a deeper context (260 MB or more) is paged, which is more thannvme_bound(118,872,064 B, a hundredth of the base's NVMe bytes) allows, soExpertBytes::within(ctx.rs:126-134) turns it down. I worked this out from the code and the plan numbers, not from a trace.The two
room=readings differ by 778,326,016 B, and 649,703,424 B of that was there before the servers started: MemAvailable was 60,846,829,568 B before the first run and 61,496,532,992 B before the second, and the difference sat in "used" memory. The first run started 11 s after a source build finished. Rebuilding one binary after touching a source file (7.59 s) left MemAvailable about 487 MB under idle, back within about 30 s, so that build is the likely cause, though I did not rerun the full build to confirm it. Whether a 4096 default on a 64 GB host is intended, I don't know; a few hundred MB decide it.midagedev commentedon Oct 12, 2026
Thank you. This is a large finding. 54.4 → 99.0 tok/s from the residency word alone, with residency off equal in both settings, points straight at the rule.
We will take it. The plan: when an unpaged stack's churn pool does not fit the host need, leave it out instead of raising P. Victims outside the host set are then served from the file mapping, as your 48 GiB arm already does (574
unresident,wait_us10). This changes the stated "no fault" contract inchurn.rs, so the change rewrites it with your numbers as the reason. We will reproduce the P climb on our box with a tight host room before and after.The default context flipping between 4096 and 12288 on the same command is a bug too. We will make it stable across runs and link the fix here.
README line 56: you are right, the condition is an arena above 0. We will fix the sentence.
avlp12 commentedon Oct 12, 2026
Here are the RTX 5090 numbers on
v0.3.1, at serving defaults.Machine
BLOOMERY_*variable was set.nvidia-smiandfree -gbefore the third sitting:Binary
v0.3.1release tarball:bloomery-serve 0.3.1 (commit f9ae95242d7b).Requests
-m,--hostand--portonly.temperature 0), thinking off (enable_thinking: false), up to 256 tokens,cache_promptoff.Qwen3.6-35B-A3B
Q4_K_M(lmstudio-community)It loads whole on the card, ctx 208896 × 2:
prompt_nprompt_per_secondpredicted_per_secondQwen3.8-Flash-Next
UD-Q4_K_XL(unsloth), with its MTP draft file (mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf) beside itAt serving defaults it loads with no refusal. The experts are split between the card and the host:
prompt_nprompt_per_secondpredicted_per_secondOne caveat: Qwen3.6's decode moved between sittings on this host.
I ran the protocol three times within seven minutes. The first two sittings used shorter long prompts, 1,241 and 2,966 tokens, before I fixed the length; the tables above come from the third. Here is the decode rate of all four runs of each sitting, in the order short, short, long, long:
nvidia-smi -qbefore sitting 3 showed no active clock-event reason. I did not sample during the runs, so I have not pinned the cause down.If you want a steadier Qwen3.6 row, I can run a longer sitting with more runs and clock sampling in a later window, and report the median.
midagedev commentedon Oct 12, 2026
Thank you for the RTX 5090 numbers at serving defaults. We will read them against the machine notes and add them to the README table tomorrow.
placement: the default context is decided by the card; the host room …
Merge churn: an unset residency keeps the card's pool when the unpage…
juliankang4 commentedon Oct 13, 2026
I reran the residency arms on the same RTX 5090 machine with 64 GB of RAM at main
7f3448bb(aftera6fdc891), and checked the load again at current mainb289130a. Two results:BLOOMERY_RESIDENCYunset and no memory limit, the load can be refused. Today it was refused in 5 of 10 starts across three builds, each time short by 5 to 58 MB. The unset rule picks a word whose churn pool fits oneMemAvailablereading, and the load's own check readsMemAvailableagain, lower. 0.3.1 has the same rule, so this is not new ina6fdc891. It also means "with no limit it loads" in my last comment was wrong; I have struck it through there. Section 1 has the starts, the code that says a default should not refuse, and two possible directions.mid-p0-s1-unhostedagainstmid-p114-s1, the word the unset rule selects on this plan. In these runs the unhosted word was faster on warmed short-request decode, 109.0 against 55.6 tok/s [derived: the median of the four server runs' medians on each side; 256-token greedy replies to a 33-token prompt, MTP draft on, two slots, RTX 5090]. It was slower on the long prompts, in the prompt pass and in the decode after it. Section 2 has the numbers and how the conditions differ from the A6000 card.1. The unset word can fail to load
With no limit, the unset word was refused at load in 5 of 10 starts today. Starts are numbered in the order they ran. Main moved to
b289130awhile I wrote this. No commit in7f3448bb..b289130atouchescrates/levers,crates/gpu-gates/src/residency.rs,crates/gpu-gates/src/residency38.rs,crates/placement/src/placement/churn.rs,crates/placement/src/placement/workstation.rs,crates/gpu/src/model.rsorcrates/model/src/placement/workstation.rs, and I ran starts 7 to 10 on it after the timed runs.cacheline (MB)planlineroomminus the load's reading (MB)7f3448bbmid-p115-s17f3448bbmid-p113-s17f3448bbmid-p113-s1e659f4femid-p114-s17f3448bbmid-p114-s1e659f4femid-p113-s1b289130amid-p115-s1b289130amid-p113-s1b289130amid-p114-s1b289130amid-p114-s1The fourth column is the
cacheline'savailableless itsneedand the picked word's pool. The fifth is theplanline'sroomless theavailablein the refusal message. Both are [derived]; the bytes they come from are in the collapsed table at the end of this section. Each refusal is fromGpuModel::load_placed, for example start 2:The code says a default should not end this way:
crates/gpu-gates/src/residency.rs:46-50, onPlanRoom::mem_left: it is the term the load's own check uses, "so a word this keeps passes the load".crates/levers/src/lib.rs:1789-1790: "a default the user did not set never refuses the load".crates/gpu-gates/src/residency38.rs:241-243: the load refuses a host set past the available bytes, and "the default leaves the pool out instead".What I read from the code and the logs:
room_for,crates/levers/src/lib.rs:1505and the loop after it) takes the first P whose churn pool fits both the plan's host headroom andmem_left, with no margin.mem_left(residency.rs:51-55) is a freshMemAvailableread less the plan's host need. The headroom in theresidency hostrecord is 203,715,739,648 B, far past any pool here, somem_leftis the budget that decides.MemAvailableagain right afterGpu::open_card(crates/gpu/src/model.rs:1856-1858) and checks the plan's need plus the pool against that reading (HostNeed::of(plan, extra_bytes).grant,model.rs:1869-1870).planline'sroomwas 22 to 180 MB above the load's reading. The load reads after it opens the card, so the drop is likely memory the start of the load takes.HOST_DRIFT(512 MiB,crates/placement/src/placement/workstation.rs:864-869) is the bound for exactly that, and the plan is made at its read room lessHOST_DRIFT(plan_room,workstation.rs:876-881). The climb's room keeps no such margin.MemAvailablefalls inside one step, and on how far it drops before the check. The leftover at thecacheline does not predict the result alone: start 8 was refused at 69 MB and start 10 loaded at 34 MB. The rule also readsMemAvailablemore than once per start. Start 1'scacheline counts the pool at P 116 (965,427,200 B), while itsresidency unsetrecord picks P 115.This is not new in
a6fdc891.PlanRoom::mem_leftis the same code in v0.3.1,e659f4feandb289130a, and the climb follows the same rule in all three (the first P that fits, no margin);a6fdc891keeps it for an unset word "as before". Thee659f4febinary from my last comment was refused today too (start 6). The six no-limit starts behind my last comment used that binary and all loaded, on three plans (4096 x 2, 12288 x 2 and 8192 x 1), with 61 to 142 MB left past the pool at thecacheline. The-unhostedandmid-p114-s1words, set by hand, loaded in all 8 of their starts today.I think the gate misses this because of how it sets the room.
churn_unset_climbs(crates/gpu-gates/src/bin/gate_qwen38_serve.rs:2810) stops at--planand runs underBLOOMERY_HOST_ROOM(gate_qwen38_serve.rs:2573). A stated room replaces both readings (host_available,crates/model/src/placement/workstation.rs:8-15) andplan_roomkeeps it whole, so the climb and the load would see the same bytes,HOST_DRIFTdrops out, and the server stops before it loads. The A6000 A/B indocs/cards/churn-unhosted.cardalso ran under a statedBLOOMERY_HOST_ROOM. Seeing the refusal takes the machine's ownMemAvailablereading and a real load. On this machine that is the server command in the setup below, withBLOOMERY_RESIDENCYunset and no limit, started a few times in a row.Two directions I can see, for you to choose between or set aside:
HOST_DRIFToff the climb's room as well. On this plan that costs 3 to 4 P steps [derived: 536,870,912 / 150,425,600 = 3.57 steps, less a leftover of under one step], so the default would land at P 116 to 119 instead of 113 to 115, with 164 to 308 experts in the churn pool instead of 356 to 452 [derived: 48 experts a P step, from thechurn_expertsof the three words seen].A smaller request either way: could the
residency unsetrecord print the climb's ownMemAvailablereading? Then the drop above would be a log read instead of a derivation.The bytes behind the table
cacheavailablecacheneedplanroomThe plan's host need is 59,660,632,064 B at
7f3448bbande659f4feand 59,660,795,904 B (163,840 B more) atb289130a.2.
-unhostedagainst the selected wordThese come from the four
-unhostedserver runs (U) and the four withmid-p114-s1set by hand (S), the word the unset rule selected in starts 4 and 5. The last set ran U, S, U, S. Medians and ranges are [derived] from the per-request values; sums are over the window named.mid-p0-s1-unhostedmid-p114-s1rereads, last 5 shortprepare_us, last 5 shortprompt_per_second1st / 2ndrereadsover the two long requests, generation includedreread_us5.0 to 7.9 s)docs/cards/churn-unhosted.card,a6fdc891), with forced ids,n=1024at depth 512, the draft off, one slot and a stated room. My short-request result goes the other way on this host, under the conditions in the summary above.prepare_usis lane time summed over the lane's threads (crates/gpu/src/host/swap.rs:1182-1186), so it comes to 0.23 to 0.29 ms of accumulated lane-thread time per generated token for U and 0.16 to 0.20 ms for S [derived: 5 x 256 tokens]. Thea6fdc891message reports 15.6 ms a token for that A6000 run, which is not the same term as mine.a6fdc891(2.65 GB reread, pp 138.8 against 1099.7). I would not read prompt length as the cause from these runs alone: the long requests also differ in content, and they started from whatever residency state the 18 short requests left.churn_expertsin theresidency hostrecord), against 5,876 for the unhosted word. About 24 % of the experts sit on the card here [derived: 5,876 of 24,576], against about 58 % for the A6000 plan in the card's own note. On the card's decide-below step ("read the base arm's P first"): the base arm here sits at P 113 to 115, with 122 card experts in the fewest layer. That may be why freeing every card expert pays here and did not on the A6000. I have not tested that link.One question from this: is it intended that the unset rule looks only at whether the pool fits, and not at how many card experts the climbed P leaves free to move?
Before and after, on the same plan (4096 x 2, 5,876 card experts, 18,700 host experts) and the same request bodies, median of the last five of 18 short requests:
e659f4fe, my last comment7f3448bbmid-p114-s1)mid-p114-s1, the one of four7f3448bbstarts that loaded); thee659f4febinary today: 53.8 (start 4,mid-p114-s1)mid-p114-s1set by handmid-p0-s1-unhostedmid-p0-s1, paged, pool 0)offTwo things changed between the columns: the build (145 commits) and the CPU governor. Today's timed runs used
performance; my last comment usedpowersave. So I would not read much into differences of a few percent across the columns, such asoffgoing from 43.1 to 44.1 and 44.3.Setup and evidence
bloomery-serve 0.3.1 (commit 7f3448bb001e)from a source archive of7f3448bb, for starts 1 to 3, 5 and every timed run.bloomery-serve 0.3.1 (commit e659f4feb1b4), the binary from my last comment, built as described there, for starts 4 and 6.bloomery-serve 0.3.1 (commit b289130a)from a source archive ofb289130a, for starts 7 to 10 (load only, after the timed runs and after Ubuntu package updates with no kernel, driver or CUDA change). The7f3448bbandb289130abuilds usedcargo oxide build --arch sm_86 -- -p bloomery-gpu-gates --features glm5next,clef,vision,mimo2 --release --bin bloomery-servewith LLVM 21.1.8llcand CUDA toolkit 13.3 (ptxasV13.3.73).nvidia-smi:NVIDIA GeForce RTX 5090, 595.99.02, P8, Disabled, 600.00 W, 600.00 W, 600.00 W, 3090 MHz, 1, 5, 16(name, driver, pstate, persistence, power limit, default, max, max SM clock, PCIe gen current and max, width). The card runs an undervolt curve that is flat at 2557 MHz, unchanged since my earlier numbers.nvidia-smi dmon -s pct, 1 s, last set): U 2520 MHz median (2520 to 2542), S 2535 MHz median (2527 to 2550); 2542 to 2550 MHz during the 3.2K prompt passes for both.amd_pstateactive. CPU governorperformancefor the timed runs and starts 1 to 6; the fourb289130aload-only starts (7 to 10) ran underpowersave.--hf unsloth/Qwen3.8-Flash-Next-GGUF:UD-Q4_K_XL(four shards, 111,334,654,784 B) withmtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf, the same cached files on the same PCIe 4.0 NVMe drive as my last comment.bloomery-serve --hf unsloth/Qwen3.8-Flash-Next-GGUF:UD-Q4_K_XL --host 127.0.0.1 --port 8080 --ctx-size 8192 --parallel 2 --cache-ram 0, withBLOOMERY_RESIDENCYunset,off,mid-p114-s1ormid-p0-s1-unhosted. The 48 GiB arms ran undersystemd-run --user --scope -p MemoryMax=48G -p MemorySwapMax=0.[q00]to[q17]before "Write a short story about a lighthouse keeper who finds a message in a bottle.", 33 prompt tokens, 256 generated), then two long requests ([l00],[l01]: "Summarize what the following Python code does, module by module." and 14,000 characters of Python standard library source, 3,213 prompt tokens, 256 generated). Greedy, thinking off, streamed, no prompt cache. Every server started with a 1-minute load average under 1 and no other GPU process.rereads,prepare_usand moves landed are sums of theresidency passrecords over the window. Drive reads are the change in/proc/diskstatsfor the NVMe drive over the window, so they count every read on the device, not only the model's.off,off, 48 GiB, U, unset; then unset, S, unset (e659f4fe), unset, S, unset (e659f4fe); then U, S, U, S; then the fourb289130astarts.Short-request decode per server in the last set:
U starts slower and settles over its first five or six requests, like the 48 GiB arm last time. S is flat from the start.
midagedev commentedon Oct 13, 2026
이거 좀 치명적이네요... 이번 릴리즈에 좀 더 고쳐서 내보내겠습니다. @juliankang4
WIP(handoff): #46 the unset residency climb keeps HOST_DRIFT off a re…
midagedev commentedon Oct 13, 2026
The fix for this shipped in v0.3.2: https://github.com/midagedev/bloomery/releases/tag/v0.3.2
With
BLOOMERY_RESIDENCYunset, the climb now fits its pool toplan_room, so the default Qwen3.8 load keeps the 512 MiBHOST_DRIFTmargin instead of being refused. Thanks @juliankang4 for the report.We didn't re-measure a 64 GB host for this release, so the 64 GB shape itself is untested here. Could you confirm the default load works on your machine?
(Written by an AI assistant for @midagedev.)
juliankang4 commentedon Oct 13, 2026
Confirmed on the same RTX 5090 machine with 64 GB of RAM: at v0.3.2 (
9bd7d577) the default Qwen3.8 load withBLOOMERY_RESIDENCYunset loaded in 10 of 10 starts, and each start answered "Paris".The command is the one from my earlier reply, with no memory limit and no
BLOOMERY_HOST_ROOM:Each start waited for a 1-minute load under 1 and no GPU process, sent one chat request ("What is the capital of France? Answer in one word.", temperature 0, thinking off), then shut the server down. I alternated five v0.3.2 starts with five starts of the earlier build
b289130a, then ran five more v0.3.2 starts.room(GB)plan_room(GB)mem_left(MB)9bd7d577mid-p117-s12,mid-p118-s17,mid-p119-s11b289130amid-p114-s13,mid-p115-s12The v0.3.2 columns are from the new
residency unsetrecord (read=MemAvailableon every start).roomlessplan_roomis 536,870,912 B on every start, theHOST_DRIFTmargin, and the climb now stops on a word two to five P steps higher than before, with a churn pool of 514 to 815 MB against 1,116 to 1,266 MB onb289130a. The refusedb289130astart was short by 23,982,080 B with a 1,266,278,400 B churn pool, the same failure as in my earlier reply.I did not time the new words; this was a load check only, at the default CPU governor.
One thing from my earlier reply is unchanged: the
residency hostrecord still printsheadroom=203715575808(203.7 GB) on every start of both builds, on a 64 GB host. I still can't explain that number.Setup: RTX 5090 (driver 595.99.02), Ryzen 9 9950X, 64 GB RAM, kernel 7.0.0-38. Model files are the same cached
UD-Q4_K_XLshards and MTP file as the earlier reply.midagedev commentedon Oct 14, 2026
Thanks for confirming: the default load with
BLOOMERY_RESIDENCYunset loads 10 of 10 on the 64 GB RTX 5090 at v0.3.2. That closes the gap we left untested.Written by the bloomery AI assistant on behalf of the maintainer.
midagedev commentedon Oct 20, 2026
Done: README now has the DGX Spark and RTX 5090 rows, with credit to the contributors who measured them.