Hi there.
In episode 1, Strata ran Qwen3.8-Flash-Next (~180B) at 141 t/s on my Olares One, with a note in the margin: Olares pods only get 8 MB of memlock.
In this episode I change the host config to lift that limit, gain nothing from it, and mostly find out that my starting diagnosis was wrong.
Quick recap for newcomers
Strata keeps all the model’s experts in RAM, puts the dense part and a cache of hot experts in the GPU’s VRAM (24 GB, small but fast), and has the CPU compute the experts that aren’t cached. The basics (VRAM, MoE, drafter) are explained in episode 1. The model’s “RAM copy” is made of two big blocks: the expert arena (39 GiB) and the n-gram table, called PLE (26.8 GiB).
Locking, or pinning, memory means asking the OS to keep pages in RAM and never move them or swap them out, so the GPU can copy from them directly. Memlock (RLIMIT_MEMLOCK) is how much memory a process is allowed to lock that way.
The Reddit post
On r/LocalLLaMA, a post titled “Strata after heavy optimizations” presents the ExTV fork of Strata. One of the optimizations it puts forward is locking the model’s RAM copy, and the thread mentions a +33% measured on a 9070 XT.
Here are their numbers, on their machine. I haven’t reproduced them:
source: ExTV fork (claimed numbers, not reproduced)
gpu: RTX 5090 + RTX 4070 in the same machine
ram: 31 GB
engine: Strata v0.2.1 + 8 patches
claim: 251 t/s vs 85 t/s before optimizations
My reasoning at the time: pods inherit containerd’s RLIMIT_MEMLOCK (containerd is the runtime that starts containers on the host), which is 8 MB, so Strata can’t lock anything. I put the cost at 6% at most, but with the Reddit post on top, the lever looked obvious.
The host change
Lifting the limit for every pod goes through containerd, with a systemd drop-in (a small file that overrides part of a service’s config):
# /etc/systemd/system/containerd.service.d/20-memlock.conf
[Service]
LimitMEMLOCK=infinity
sudo systemctl daemon-reload
sudo systemctl restart containerd
Restarting containerd on a machine running 70 pods makes you sweat. But the unit uses KillMode=process: only the daemon restarts, the containers keep running. All 70 pods survived, and after a Strata restart the pod did have unlimited memlock.
The lock was already there
In Strata’s startup logs, one line had been there since the very first launch:
cudaHostRegister PORTABLE ok
The expert arena, 39 GiB, was already pinned by CUDA through cudaHostRegister. That pinning doesn’t go through RLIMIT_MEMLOCK and shows up in neither VmPin nor VmLck in /proc/<pid>/status. From the outside it looks like nothing is locked, and that’s where my starting diagnosis went wrong.
Only the 26.8 GiB PLE table wasn’t locked. Second surprise: with the limit lifted, Strata locks the table at load, then gives the lock back by itself. Its log explains why:
“the lock left 11.6 GiB of RAM for the conversation cache, 38.1 GiB without it”
In other words, Strata’s residency policy (how it decides what stays in RAM) prefers to keep the RAM for the conversation cache rather than lock the table. In steady state, nothing changes from before.
Forcing the lock anyway
To settle it, I force the table into locked RAM with ple-io=ram in STRATA_SET. VmLck climbs to 26.8 GiB.
hardware: Olares One — RTX 5090 Laptop 24 GB (sm_120), Core Ultra 9 275HX, 96 GB DDR5-5600
system: Olares 1.12.7, driver 595 (CUDA 13.2)
engine: Strata 0.2.13 (engine 0.1.59), ghcr.io/niko1221/strata:0.2.13-cuda13
model: Qwen3.8-Flash-Next, ISTA-DASLab IQ3_XXS pack (75.8 GB), DFlash2 drafter
settings: episode 1 tuned config (STRATA_PF_FUSED=1, aux-cpus=auto, host-core=sibling, malloc), + variant below
bench: in-pod, warm-up, 3 prompts × 800 tokens × 2 rounds, sampled (temperature 0.6 / top_p 0.95); ~36K and ~112K reads
The table compares three configs: average decode in t/s (min and max in parentheses), then the read speed for the 36K and 112K prompts. The bench is sampled, so there’s some randomness from one run to the next.
| Config | Average decode (min-max) | 36K read | 112K read |
|---|---|---|---|
| memlock 8 MB (episode 1) | 141.07 (132-150) | 3,033 | 2,944 |
| unlimited memlock, default policy | 143.37 | — | — |
unlimited memlock, forced lock (ple-io=ram) | 144.81 (130-158) | 3,069 | 2,946 |
The three decode numbers are within noise of each other: the min-max ranges overlap almost completely. Prompt reading doesn’t move.
The price of the forced lock, though, is very real:
| Before | Forced lock | |
|---|---|---|
| Conversation cache | 8 GiB | 3.5 GiB |
| Host RAM available | 38 GB | 8 GB |
That leaves 8 GB of available RAM, on a machine where the kubelet (the Kubernetes agent that manages the host’s pods) starts evicting pods below 9.5 GB. More on that in episode 4.
Reverting
I restored the default policy and removed the drop-in within the minute, and the host went back to the stock 8 MB memlock. The change brought nothing measurable, so I had no reason to keep a host modification.
The Reddit gain doesn’t carry over here because the ExTV fork targets a two-GPU machine with 31 GB of RAM that streams from SSD. On a 96 GB machine where the expert arena is already pinned by CUDA, there’s nothing to gain. As for the 9070 XT’s +33%, it doesn’t apply to an NVIDIA GPU under Olares.
Trap #1: port-forward
During these tests, I first ran the bench from the host, through kubectl port-forward (a tunnel that exposes the pod’s port on the machine). Result: ~120 t/s. The same server, measured from inside the pod, gives ~143 t/s.
So SSE streaming (the answer sent as it’s generated, token by token) through the port-forward costs ~16%, far more than any of the settings I’m trying to measure.
Since then, all my Strata benches run inside the pod, against 127.0.0.1:8080, with the image’s bundled Python (there’s no python3 on the PATH):
kubectl exec -n <namespace> <pod> -- /opt/strata/terminal/python/bin/python3 <bench script>
Trap #2: STRATA_SET remembers
Values passed in STRATA_SET are saved in the launch preset (/data/state/strata/launch/docker.choices.json, extra field, and docker.json, user_args field). Removing a key from the ConfigMap doesn’t remove it: it’s still applied at the next start. To drop it, you have to set it explicitly to none (or off):
STRATA_SET="ple-io=none"
Two small bonus traps:
- Editing the ConfigMap makes Olares add a
restartedAt, hence a new ReplicaSet. Harmless. pkill -f 'kubectl port-forward…'run inside anssh "…"kills the ssh’s own shell, since its command line contains the pattern. The fix:pkill -f '[k]ubectl …'.
What I take away from episode 2
Before touching the host, check where memory is actually pinned: VmLck at zero doesn’t mean nothing is pinned when CUDA handles it. An engine can also decide on its own to give a lock back, so I read its residency logs before concluding anything. And a measurement path can cost more than the effect being measured: -16% through port-forward, versus a few t/s between two configs.
In episode 3, I test everything Strata exposes, one restart per setting, greedy. Nothing wins, and a fake prefill gain almost fools me.
Episode 3: testing everything, nothing wins. See you next time!
Disclosure — All the benchmarks in this post run on my own Olares One. If the content was useful and you’re considering one, ordering through this referral link gets you $300 off ($4,699 instead of $4,999), stackable with the $300 Black Friday discount starting November 17: $600 off in total ($4,399). I’m mentioning this out of transparency — and yes, incidentally, it helps keep the blog alive (hosting, domain, and the time I spend writing here).