[GH-ISSUE #4518] [Engine] 0.2.7 PLE residency policy turns the automatic conversation cache off on a 128 GB two-GPU PC #2033

Closed
opened 2026-11-04 01:56:07 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @alphastorm on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4518

Area

Engine

Desktop app, Terminal or source?

Source: stock setup.py at the v0.2.7 tag with the 0.1.52 Windows CUDA 13 engine package (0.2.7.1 keeps the Windows engine at 0.1.52).

What happened

At start the new PLE residency policy locks the 26.8 GiB PLE table in RAM, and the automatic conversation cache then turns itself off:

strata generate: --ple-io ram chosen by the residency policy (the table is 26.8 GiB, the expert arena still to fill 46.8 GiB and 117.8 GiB of RAM is available; STRATA_PLE_AUTO_RAM=0 keeps the direct reads, --ple-io direct forces them)
strata generate: PLE table locked in RAM (--ple-io ram chosen by the residency policy) in 31.4 s
...
strata serve: conversation cache off: not enough free RAM to park conversations (--conversation-cache-mib N asks for one anyway)

On 0.2.3 (engine 0.1.48) the same PC, model and flags sized the automatic conversation cache to 8,192 MiB (4 parked conversations). With STRATA_PLE_AUTO_RAM=0 on 0.2.7 the cache is back at 8,192 MiB and parks again.

The locked table also comes out of Windows commit: with the engine serving, commit headroom was 1.03 GiB of a 135.7 GiB limit on 0.2.7 (127.7 GiB RAM + 8 GiB page file), against 27.3 GiB on 0.2.3 with the same model and flags; a later bench sampled 0.63-1.33 GiB. Anything else that allocates on that PC (a browser, a game) then risks running out of commit.

Smallest steps or command that reproduce it

  1. Stock setup for two cards with --gpu-roles 0=main,1=helper (engine flag --pipeline-windows 2, no batch slots), Qwen3.8-Flash-Next IQ3_S at 262,144 tokens, text only.
  2. Start the server and read the start log, or automatic_conversation_cache.budget_mib in GET /metrics (0).

Reproduction status

Every default 0.2.7 start we made on this PC: a full requalification run (budget_mib 0) and two back-to-back bench starts. The one start with STRATA_PLE_AUTO_RAM=0 had the 8,192 MiB cache.

Strata version

0.2.7 (tag commit 5e8a4cca), engine 0.1.52.

Graphics card, memory and system

RTX 4090 24 GB + RTX 3090 24 GB layer split, 128 GB DDR4, Windows 11, NVIDIA driver 621.01.

Measured

One request per depth, 512 output tokens, back to back on the same PC:

Prompt 0.2.7 default (PLE in RAM, no cache) TTFT 0.2.7 STRATA_PLE_AUTO_RAM=0 (cache 8 GiB) TTFT 0.2.3 TTFT
8,192 5.60 s 5.63 s 5.69 s
32,768 11.36 s 11.53 s 11.54 s
65,536 19.92 s 20.21 s 20.24 s
102,400 30.40 s 31.15 s 31.23 s

Decode is the same in all three (161-172 tokens/s). So on this PC the policy trades parking (parking a 102K-token conversation took 1.1 s; returning to a parked conversation took 1.5-3.4 s in our earlier 0.1.43.1 measurements on this PC, against ~30 s to read it again) for ~2-3% faster prompt reading and a 31-37 s longer start. On a 192 GB RTX PRO 6000 both fit (PLE locked and the 8 GiB cache) and prompt reading did not get faster either (single samples, within noise).

Ask

Could the residency admission also count the automatic conversation cache's budget and Windows commit headroom (or size the cache first), so a PC that parks conversations today keeps doing so, with commit to spare, after 0.2.7?

Related: #4421 (the same policy's admission on the Mac).

Originally created by @alphastorm on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4518 ### Area Engine ### Desktop app, Terminal or source? Source: stock `setup.py` at the v0.2.7 tag with the 0.1.52 Windows CUDA 13 engine package (0.2.7.1 keeps the Windows engine at 0.1.52). ### What happened At start the new PLE residency policy locks the 26.8 GiB PLE table in RAM, and the automatic conversation cache then turns itself off: ``` strata generate: --ple-io ram chosen by the residency policy (the table is 26.8 GiB, the expert arena still to fill 46.8 GiB and 117.8 GiB of RAM is available; STRATA_PLE_AUTO_RAM=0 keeps the direct reads, --ple-io direct forces them) strata generate: PLE table locked in RAM (--ple-io ram chosen by the residency policy) in 31.4 s ... strata serve: conversation cache off: not enough free RAM to park conversations (--conversation-cache-mib N asks for one anyway) ``` On 0.2.3 (engine 0.1.48) the same PC, model and flags sized the automatic conversation cache to 8,192 MiB (4 parked conversations). With `STRATA_PLE_AUTO_RAM=0` on 0.2.7 the cache is back at 8,192 MiB and parks again. The locked table also comes out of Windows commit: with the engine serving, commit headroom was 1.03 GiB of a 135.7 GiB limit on 0.2.7 (127.7 GiB RAM + 8 GiB page file), against 27.3 GiB on 0.2.3 with the same model and flags; a later bench sampled 0.63-1.33 GiB. Anything else that allocates on that PC (a browser, a game) then risks running out of commit. ### Smallest steps or command that reproduce it 1. Stock setup for two cards with `--gpu-roles 0=main,1=helper` (engine flag `--pipeline-windows 2`, no batch slots), Qwen3.8-Flash-Next IQ3_S at 262,144 tokens, text only. 2. Start the server and read the start log, or `automatic_conversation_cache.budget_mib` in `GET /metrics` (0). ### Reproduction status Every default 0.2.7 start we made on this PC: a full requalification run (`budget_mib` 0) and two back-to-back bench starts. The one start with `STRATA_PLE_AUTO_RAM=0` had the 8,192 MiB cache. ### Strata version 0.2.7 (tag commit `5e8a4cca`), engine 0.1.52. ### Graphics card, memory and system RTX 4090 24 GB + RTX 3090 24 GB layer split, 128 GB DDR4, Windows 11, NVIDIA driver 621.01. ### Measured One request per depth, 512 output tokens, back to back on the same PC: | Prompt | 0.2.7 default (PLE in RAM, no cache) TTFT | 0.2.7 `STRATA_PLE_AUTO_RAM=0` (cache 8 GiB) TTFT | 0.2.3 TTFT | |---|---|---|---| | 8,192 | 5.60 s | 5.63 s | 5.69 s | | 32,768 | 11.36 s | 11.53 s | 11.54 s | | 65,536 | 19.92 s | 20.21 s | 20.24 s | | 102,400 | 30.40 s | 31.15 s | 31.23 s | Decode is the same in all three (161-172 tokens/s). So on this PC the policy trades parking (parking a 102K-token conversation took 1.1 s; returning to a parked conversation took 1.5-3.4 s in our earlier 0.1.43.1 measurements on this PC, against ~30 s to read it again) for ~2-3% faster prompt reading and a 31-37 s longer start. On a 192 GB RTX PRO 6000 both fit (PLE locked and the 8 GiB cache) and prompt reading did not get faster either (single samples, within noise). ### Ask Could the residency admission also count the automatic conversation cache's budget and Windows commit headroom (or size the cache first), so a PC that parks conversations today keeps doing so, with commit to spare, after 0.2.7? Related: #4421 (the same policy's admission on the Mac).
Author
Owner

@udqe commented on GitHub (Oct 28, 2026):

Same machine shape (Windows, source install, 2x RTX 4090, 127.9 GiB RAM, stock engine 0.1.52, Qwen3.8-Flash-Next UD-Q4_K_XL, layer split) - so here is our side of the same wall, plus the one number that seems to decide it.

1) The residency policy made the same choice here. Our 22:29 start log:

strata generate: --ple-io ram chosen by the residency policy (the table is 26.8 GiB, the expert arena still to fill 71.7 GiB and 117.7 GiB of RAM is available; STRATA_PLE_AUTO_RAM=0 keeps the direct reads...)
strata generate: PLE table locked in RAM (--ple-io ram chosen by the residency policy) in 32.3 s

We never hit your "conversation cache off" line because we ask --conversation-cache-mib 12288 explicitly - the cache is visibly alive (parked 124563 tokens in 1222.4 ms; parked=2 bytes=9692123400) across 42 engine starts on Oct 28 including a silent restart at 22:29, prompt reuse 99.6-99.9%. Your point stands: machines on the automatic budget lose the cache silently.

2) The decisive number looks like the commit limit, and pagefile sizing is the lever. Measured while serving:

yours (#4518) this box
RAM 127.7 GiB 127.9 GiB
pagefile 8 GiB 64 GiB explicit (auto-manage off, initial 65536 MiB)
commit limit 135.7 GiB 191.9 GiB
commit headroom while serving 1.03 GiB ~17 GiB

The engine alone wants a lot of commit: process private (committed) 134.2 GiB, working set 96.7 GiB, plus expert arena: locked 50253 MiB via working-set minimum + VirtualLock. So on a 128 GiB Windows box the working rule seems to be commit limit > engine private (~134 here) + everything else - and the residency policy's 26.8 GiB lands at engine start, before the model can serve anything. A policy that prices its added lock against the commit limit (or a docs line "on 128 GiB Windows, keep a pagefile that covers arena + PLE") would have prevented both of us finding this.

3) The same amplifier likely bites the updater path too (filed today as #4463). With the serving engine at ~93 GiB, strata update's test start loads a second copy and the new engine's memory guard refuses it - limit 127.9 GiB, current 93.0 GiB, available 34.9 GiB ... error 1450 - and the advised retry fails identically while the first engine holds. A second engine that first commits 26.8 GiB to the PLE table has even less room to fail into; stopping the serving model and re-running the identical command exits 0 (control).

(AI-assisted on our side too - static analysis and measurements cross-checked; the answering model is Qwen3.8-Flash-Next UD-Q4_K_XL served by this repo's engine 0.1.52; all numbers measured locally.)

<!-- gh-comment-id:6476719389 --> @udqe commented on GitHub (Oct 28, 2026): Same machine shape (Windows, source install, 2x RTX 4090, 127.9 GiB RAM, stock engine 0.1.52, Qwen3.8-Flash-Next UD-Q4_K_XL, layer split) - so here is our side of the same wall, plus the one number that seems to decide it. **1) The residency policy made the same choice here.** Our 22:29 start log: ``` strata generate: --ple-io ram chosen by the residency policy (the table is 26.8 GiB, the expert arena still to fill 71.7 GiB and 117.7 GiB of RAM is available; STRATA_PLE_AUTO_RAM=0 keeps the direct reads...) strata generate: PLE table locked in RAM (--ple-io ram chosen by the residency policy) in 32.3 s ``` We never hit your "conversation cache off" line because we ask `--conversation-cache-mib 12288` explicitly - the cache is visibly alive (`parked 124563 tokens in 1222.4 ms; parked=2 bytes=9692123400`) across 42 engine starts on Oct 28 including a silent restart at 22:29, prompt reuse 99.6-99.9%. Your point stands: machines on the **automatic** budget lose the cache silently. **2) The decisive number looks like the commit limit, and pagefile sizing is the lever.** Measured while serving: | | yours (#4518) | this box | |---|---|---| | RAM | 127.7 GiB | 127.9 GiB | | pagefile | 8 GiB | **64 GiB explicit** (auto-manage off, initial 65536 MiB) | | commit limit | 135.7 GiB | **191.9 GiB** | | commit headroom while serving | 1.03 GiB | ~17 GiB | The engine alone wants a lot of commit: process private (committed) **134.2 GiB**, working set 96.7 GiB, plus `expert arena: locked 50253 MiB via working-set minimum + VirtualLock`. So on a 128 GiB Windows box the working rule seems to be *commit limit > engine private (~134 here) + everything else* - and the residency policy's 26.8 GiB lands at engine start, before the model can serve anything. A policy that prices its added lock against the **commit limit** (or a docs line "on 128 GiB Windows, keep a pagefile that covers arena + PLE") would have prevented both of us finding this. **3) The same amplifier likely bites the updater path too** (filed today as #4463). With the serving engine at ~93 GiB, `strata update`'s test start loads a second copy and the new engine's memory guard refuses it - `limit 127.9 GiB, current 93.0 GiB, available 34.9 GiB ... error 1450` - and the advised retry fails identically while the first engine holds. A second engine that first commits 26.8 GiB to the PLE table has even less room to fail into; stopping the serving model and re-running the identical command exits 0 (control). (AI-assisted on our side too - static analysis and measurements cross-checked; the answering model is Qwen3.8-Flash-Next UD-Q4_K_XL served by this repo's engine 0.1.52; all numbers measured locally.)
Author
Owner

@Niko1221 commented on GitHub (Oct 29, 2026):

Confirmed on Linux with the same numbers. The policy locks the 26.8 GiB table at start; what the rest of the load takes afterwards (KV pools, pinned staging, the host buffers of two GPUs) is not known then, so the conversation cache gets what is left, and on your box that is nothing. Fixed on our side; the fix ships in the next update (0.2.8). If giving the lock back lets the automatic cache grow, the table is unlocked, the log says so, and the cache is sized again (1536 MiB became 8192 MiB in our run). --conversation-cache-mib and an explicit --ple-io ram are never touched.

Not done: the Windows commit-limit side, which we could not measure on Linux. Until then STRATA_PLE_AUTO_RAM=0 gives the 0.2.6 behaviour.

<!-- gh-comment-id:6492059531 --> @Niko1221 commented on GitHub (Oct 29, 2026): Confirmed on Linux with the same numbers. The policy locks the 26.8 GiB table at start; what the rest of the load takes afterwards (KV pools, pinned staging, the host buffers of two GPUs) is not known then, so the conversation cache gets what is left, and on your box that is nothing. Fixed on our side; the fix ships in the next update (0.2.8). If giving the lock back lets the automatic cache grow, the table is unlocked, the log says so, and the cache is sized again (1536 MiB became 8192 MiB in our run). `--conversation-cache-mib` and an explicit `--ple-io ram` are never touched. Not done: the Windows commit-limit side, which we could not measure on Linux. Until then `STRATA_PLE_AUTO_RAM=0` gives the 0.2.6 behaviour.
Author
Owner

@Niko1221 commented on GitHub (Oct 29, 2026):

Confirmed and fixed in 0.2.8 on Linux: when the locked PLE table leaves the automatic conversation cache too little, the lock is given back and the cache is sized again (1536 MiB became 8192 MiB in our run). An explicit --conversation-cache-mib or --ple-io ram is never touched. We could not measure the Windows commit-limit side, so please say so here if you see it on Windows. Run strata update. Closing the Linux case.

<!-- gh-comment-id:6510314792 --> @Niko1221 commented on GitHub (Oct 29, 2026): Confirmed and fixed in 0.2.8 on Linux: when the locked PLE table leaves the automatic conversation cache too little, the lock is given back and the cache is sized again (1536 MiB became 8192 MiB in our run). An explicit `--conversation-cache-mib` or `--ple-io ram` is never touched. We could not measure the Windows commit-limit side, so please say so here if you see it on Windows. Run `strata update`. Closing the Linux case.
Author
Owner

@Johnzx07 commented on GitHub (Nov 1, 2026):

Machine: Windows 11 Pro 10.0.26300, Ryzen 9 5950X, 127.9 GiB RAM, one RTX 5070 Ti (16 GB), system-managed C:\pagefile.sys 44 GiB allocated → commit limit 171.9 GiB. NVMe (E:) holds the model.

Engine: strata.exe 0.1.54 (Windows CUDA build), pack ud-q4_k_xl (native UD-Q4_K_XL, 103.7 GiB of expert files), args: --serve --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp rt --kv int8 --vision --max-context 262144 --kv-resident 32768 --vram-reserve-mib 1728 --conversation-cache-mib 4096 --conversation-cache-min-tokens 4096, env STRATA_HC_Q8=1.

1. The auto PLE lock does show up on Windows, and it drains physical RAM

Startup chose the lock by itself, exactly as in this issue:

strata generate: --ple-io ram chosen by the residency policy (the table is 26.8 GiB,
  the expert arena still to fill 71.7 GiB and 109.3 GiB of RAM is available; ...)
strata generate: PLE table locked in RAM (--ple-io ram chosen by the residency policy) in 29.5 s

A 2 s sampler (free RAM, commit, pagefile, per-process WS) over one idle-ish chat session recorded:

time (sampler) free physical Strata private (WS) commit
23:24:25, mid-load 46.3 GiB 84.4 GiB 171.9 / 171.9
23:24:34, load done 6.0 GiB 84.9 GiB 171.9 / 171.9
23:27:32 (+3 min) 3.4 GiB 92.2 GiB 171.9 / 171.9
23:29:20 (+5 min) 2.4 GiB 93.0 GiB (WS 101.2) 171.9 / 171.9
  • Commit charge pinned at exactly the commit limit (171.9/171.9 GiB) the whole time, while the pagefile itself stayed at 0.3 GiB used (peak 0.3) — it is the reservation, not paging, that hits the ceiling; AvailableVirtualMemory was 0, so any new app allocation was competing against a full commit charge. Launching another desktop app into that state is where it hurts.
  • Windows Memory Compression grew to 2.1 GiB (system squeezing itself).
  • The conversation-cache side of this issue did not trigger here because --conversation-cache-mib 4096 is explicit (matching your "explicit is never touched").

2. STRATA_PLE_AUTO_RAM=0 restores physical RAM and decode parity

Same engine, one env var, clean restart:

strata generate: PLE direct read probe: 71997 rows/s (fine)
  • free physical settled and held at 26–27 GiB; Strata WS steady at 80.4–81.1 GiB across 25 min of use (no growth).
  • decode A/B, 3×220-token gens, temp 0, idle box (first run of each arm cold): RAM arm 41.0 / 41.9 t/s, direct arm 39.9 / 41.7 t/s — parity within drift, as others measured for prefill.

3. The Windows-specific part you asked about

Commit is still 171.9/171.9 even with the lock off. Strata's private commit is 95.0 GiB (pinned 71.7 GiB arena + mappings); on a 128 GB machine with the default system-managed 44 GiB pagefile, the expert arena + native gguf mappings alone consume the entire commit headroom before PLE enters the picture. Two observations:

  1. The residency policy sizes itself from available physical RAM ("109.3 GiB available … fits") but on Windows it never checks commit available (GlobalMemoryStatusEx ullAvailVirtual), which was already 0 at that decision point. On Windows the lock's mlock converts commit reservations into non-pageable physical, and the box goes from a comfortable desktop to 2.4 GiB free.
  2. Even without the lock, a 16 GB single-GPU + 128 GB RAM Windows box wants a larger pagefile (or an explicit commit-budget check in the residency policy) than Windows auto-manages, or commit stays pinned at the limit on every run.

Suggestion: on Windows, let the policy require commit_avail > table + headroom in addition to the physical check — or default to direct reads on Windows until the commit check exists. STRATA_PLE_AUTO_RAM=0 is the workaround we're running; happy to re-test anything, the 2 s CSV logs are kept.

<!-- gh-comment-id:6553222570 --> @Johnzx07 commented on GitHub (Nov 1, 2026): **Machine:** Windows 11 Pro 10.0.26300, Ryzen 9 5950X, 127.9 GiB RAM, **one RTX 5070 Ti (16 GB)**, system-managed `C:\pagefile.sys` 44 GiB allocated → **commit limit 171.9 GiB**. NVMe (E:) holds the model. **Engine:** `strata.exe` 0.1.54 (Windows CUDA build), pack `ud-q4_k_xl` (native UD-Q4_K_XL, 103.7 GiB of expert files), args: `--serve --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp rt --kv int8 --vision --max-context 262144 --kv-resident 32768 --vram-reserve-mib 1728 --conversation-cache-mib 4096 --conversation-cache-min-tokens 4096`, env `STRATA_HC_Q8=1`. ## 1. The auto PLE lock does show up on Windows, and it drains physical RAM Startup chose the lock by itself, exactly as in this issue: ``` strata generate: --ple-io ram chosen by the residency policy (the table is 26.8 GiB, the expert arena still to fill 71.7 GiB and 109.3 GiB of RAM is available; ...) strata generate: PLE table locked in RAM (--ple-io ram chosen by the residency policy) in 29.5 s ``` A 2 s sampler (free RAM, commit, pagefile, per-process WS) over one idle-ish chat session recorded: | time (sampler) | free physical | Strata private (WS) | commit | |---|---|---|---| | 23:24:25, mid-load | 46.3 GiB | 84.4 GiB | 171.9 / 171.9 | | 23:24:34, load done | 6.0 GiB | 84.9 GiB | 171.9 / 171.9 | | 23:27:32 (+3 min) | 3.4 GiB | 92.2 GiB | 171.9 / 171.9 | | 23:29:20 (+5 min) | **2.4 GiB** | 93.0 GiB (WS 101.2) | 171.9 / 171.9 | - **Commit charge pinned at exactly the commit limit (171.9/171.9 GiB) the whole time, while the pagefile itself stayed at 0.3 GiB used (peak 0.3)** — it is the reservation, not paging, that hits the ceiling; `AvailableVirtualMemory` was 0, so any new app allocation was competing against a full commit charge. Launching another desktop app into that state is where it hurts. - Windows Memory Compression grew to 2.1 GiB (system squeezing itself). - The conversation-cache side of this issue did **not** trigger here because `--conversation-cache-mib 4096` is explicit (matching your "explicit is never touched"). ## 2. `STRATA_PLE_AUTO_RAM=0` restores physical RAM and decode parity Same engine, one env var, clean restart: ``` strata generate: PLE direct read probe: 71997 rows/s (fine) ``` - free physical settled and held at **26–27 GiB**; Strata WS steady at 80.4–81.1 GiB across 25 min of use (no growth). - decode A/B, 3×220-token gens, temp 0, idle box (first run of each arm cold): RAM arm 41.0 / 41.9 t/s, direct arm 39.9 / 41.7 t/s — parity within drift, as others measured for prefill. ## 3. The Windows-specific part you asked about **Commit is still 171.9/171.9 even with the lock off.** Strata's private commit is 95.0 GiB (pinned 71.7 GiB arena + mappings); on a 128 GB machine with the default system-managed 44 GiB pagefile, the expert arena + native gguf mappings alone consume the entire commit headroom before PLE enters the picture. Two observations: 1. The residency policy sizes itself from **available physical RAM** ("109.3 GiB available … fits") but on Windows it never checks **commit available** (`GlobalMemoryStatusEx ullAvailVirtual`), which was already 0 at that decision point. On Windows the lock's `mlock` converts commit reservations into non-pageable physical, and the box goes from a comfortable desktop to 2.4 GiB free. 2. Even without the lock, a 16 GB single-GPU + 128 GB RAM Windows box wants a **larger pagefile** (or an explicit commit-budget check in the residency policy) than Windows auto-manages, or commit stays pinned at the limit on every run. Suggestion: on Windows, let the policy require `commit_avail > table + headroom` in addition to the physical check — or default to direct reads on Windows until the commit check exists. `STRATA_PLE_AUTO_RAM=0` is the workaround we're running; happy to re-test anything, the 2 s CSV logs are kept.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2033
No description provided.