mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4972] [CLOSED] generate: the file tier's Linux defaults stay off when the GPU caches… #5272
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5272
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4972
Author: @01xjw
Created: 11/2/2026
Status: ❌ Closed
Base:
main← Head:pr/file-tier-all-resident📝 Commits (1)
a522992generate: the file tier's Linux defaults stay off when the GPU caches hold every expert📊 Changes
2 files changed (+31 additions, -2 deletions)
View changed files
📝
src/core/expert_source.cpp(+1 -0)📝
src/program/generate.cpp(+30 -2)📄 Description
Problem and result
Since 0.2.1, an
experts.binpack on Linux gets io prefetch and its decode gate by default when the page cache has room for 55% of the experts, and the routing-aware prefetch starts with them. That check does not look at the GPU caches. When they hold every expert, the decode reads nothing from the file tier: every request logsthe OS read 0.0 MB from storage (0 major faults) ... io prefetch: 0 read ahead (0.0 MB by pread). The defaults still cost decode time: 57.3 tok/s, against 79.6 withSTRATA_IO_PREFETCH=0.With this PR, once the caches are filled and hold every expert, those defaults are off and the startup log says so. Decode is 80.4 tok/s with no variables set, the same as setting the switch by hand. The answers do not change.
Setup. One machine, every arm on the same two cards, one server start per arm:
experts.bin,--mmap-experts, an expert profile that fills 12,288 slots per card: 24,576 of 24,576 experts resident.--batch 8 --pipeline-windows 1 --spec 4 --kv int8 --max-context 65536.STRATA_HIPBLASLT_TUNING=tools/hip/gfx1100-hipblaslt-100202.txt,STRATA_SLOT_COPY_DIRECT=1,STRATA_SLOT_COPY_BATCHSYNC=1.python tools/strata_bench.py --url <server> --long --clients 8.STRATA_IO_PREFETCH=0 STRATA_COLD_OVERLAP=0STRATA_HIPBLASLT_VERBOSE=1, which only logs prompt-GEMM fallbacks (src/prefill/gemm.cu). TheSTRATA_LOOKAHEAD=0arm below ran without it.STRATA_LOOKAHEAD=0decoded at 70.2 tok/s. The routing-aware prefetch is part of the cost, and io prefetch with its gate is the rest.The 32K and 8-client figures of this PR's suite run. After the fill, this PR leaves the file tier in the same state as
STRATA_IO_PREFETCH=0:io_stop()clearsio_pf_;So I read the two lower figures (1580 at 32K, 83.8 at 8 clients) as variation between server starts. The 32K ranges overlap. 8-client totals on this build vary between starts, from about 80 to 140 tok/s: the
STRATA_LOOKAHEAD=0arm, before this PR, got 82.5.To check the 8-client figure, I reran the 8-client test alone, alternating the two builds on fresh starts. Each start did 5 rounds:
STRATA_IO_PREFETCH=0 STRATA_COLD_OVERLAP=0STRATA_IO_PREFETCH=0 STRATA_COLD_OVERLAP=0Per-run JSON for every arm, the probe hashes and the repeat are in 01xjw/Strata.
Related discussion
experts.bindefault (ecf2bdcb) to the case it can help. Every setup whose GPU caches miss an expert keeps the 0.2.1 behaviour. If you would rather agree the scope in an issue first, the write-up is at 01xjw/Strata#1.Approach
Two files, +31/-2.
After the GPU caches are filled, the engine counts the (layer, expert) pairs they hold. On a layer split it checks each layer in its own stage's cache, the same way the device residency table is built. If every pair is held, and io prefetch came from the Linux default (
STRATA_IO_PREFETCHunset):Compatibility:
gpu_holds_allis false). The 0.2.1 default was measured to help there.STRATA_IO_PREFETCH=1keeps io prefetch and the gate.STRATA_LOOKAHEAD=1keeps the routing-aware prefetch.Open point: with every expert resident,
STRATA_IO_PREFETCH=1alone no longer brings the routing-aware prefetch with it, so today's behaviour needsSTRATA_IO_PREFETCH=1 STRATA_LOOKAHEAD=1. Should an explicitSTRATA_IO_PREFETCH=1keep both?Validation
Passed:
main870aedd9plus this commit (a522992c), HIP gfx1100, ROCm 7.2.0.cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_HIP=ON -DCMAKE_HIP_ARCHITECTURES=gfx1100 -DSTRATA_BUILD_TESTS=ON, thencmake --build build -j 96.main, none in the changed lines.cteston the same build: 106 of 174 pass, onmainand on this PR alike.no ROCm-capable device. The others need model files or device memory, plusisa_guard_checkonlibstrata_kernels_cpu.a.file_expert_source_test,arch_defaults_test,expert_multi_test,pool_plan_test,warm_policy_testanddirect_file_async_test.every expert is in the GPU caches (24576 of 24576), and norouting-aware prefetch on.main870aedd9plus a local commit not in this PR (--pipeline-windows 1beside--batch) plus the first revision of this commit. The "before" arms ran the same tree without this commit.set_io_prefetch. In this config the flag is not read once io prefetch is off:begin_layerreturns early when the source is not staged.Failed:
Limits
experts.binsetups on Linux get the same change untested. There the file tier also has nothing to read.--pipeline-windows 1beside--batch, which needs a local commit that is not inmain. This change does not depend on it.--peer-deviceor the helper caches are not counted, so those setups keep today's defaults.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.