mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 21:05:40 +07:00
[GH-ISSUE #4683] [Engine] --prefill auto never picks a chunk above the VRAM pick, so long prompts take about 2x longer; btrfs drive speed falls back to 1.5 GB/s #2139
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#2139
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?
Originally created by @covenator on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4683
Area: Engine
Terminal (prebuilt engine, CUDA 13)
What happened:
for (int64_t c = chunk; c >= 512; c -= 256)at line 8704). Bare--prefill autois capped at 8192 (prefill_auto_max = 8192, line 706). So when no chunk fits and "fewest passes win", the planner can never choose a larger chunk, even though a larger one wins. At a 117.7K-token prompt, a run took 108-127 s with--prefill autoand 58-64 s with--prefill auto:32768. At 58.6K tokens it was 43-46 s against 30-36 s.on_rotational_disk(line 1431) returns -1 on btrfs, because btrfs gives an anonymous st_dev with no /sys/dev/block/MAJ:MIN entry. drive_read_gbps then falls back to an assumed 1.5 GB/s, while about 4.2 GB/s is measured on the same NVMe. This only affects plan pricing.Smallest steps or command that reproduce it:
Run the same long prompt (about 58K and about 118K tokens) twice, once with
--prefill autoand once with--prefill auto:32768, keeping every other flag the same, and compare the prefill wall time. For part 2, put the model on a btrfs filesystem and read the logged drive speed.Reproduction status: Reproduced every time (several runs at each size). Timings were measured on 0.1.47. The same code is unchanged in v0.2.8 source but has not been re-timed there.
Strata version: 0.1.47 engine (cuda13), code checked against v0.2.8
Graphics card, memory and system: RTX 3090 24 GB, 64 GB DDR5, Ryzen 9 9950X3D, Ubuntu 25.10, model on btrfs NVMe
Model, size and settings: Qwen3.8-Flash-Next IQ3_S pack, --spec 4 --spec-min-p 0.5; within each A/B pair only --prefill changed
Possibly related #3976 (layer-major prefill on a CUDA layer split), #4493 (the drive is not identified for a model in /dev/shm, which looks like the same st_dev lookup as part 2).
@Niko1221 commented on GitHub (Oct 31, 2026):
We timed this on our own card (P100, 57,788-token prompt, two pairs):
--prefill auto172 s,--prefill auto:32768164 s, about 5% faster, not 2x. That is a different card and model from yours, so it does not settle your numbers. The 8192 cap is deliberate andauto:32768is the opt-in. We have not changed anything. Could you post the log lines that say which chunk size each run picked?@covenator commented on GitHub (Oct 31, 2026):
I ran it again this morning to get the log lines.
Setup: RTX 3090 24 GB, 64 GB RAM, Strata 0.1.47 cuda13, IQ3_S pack on btrfs on NVMe,
--kv int8 --spec 4 --spec-min-p 0.5 --mmap-experts --max-context 73728. I started the engine fresh for each mode, dropped the GGUF from page cache before starting, and sent two ~58.6K prompts. 0 tokens reused on all four.With
--prefill auto:With
--prefill auto:32768:Times are from the
prompt N tokens = 0 reused + N read in X msline, drive reads fromthe OS read X MB from storage. The second prompt in each pair ran without clearing the cache, so it reads a bit less.So on this box auto:32768 is about 2x faster. A few things I noticed:
drive 1.50 GB/s (assumed). The pack is on btrfs, so stat gives st_dev 0:29 and /sys/dev/block/0:29 doesn't exist. I think it can't find the NVMe and uses the default. The real speed is much higher (117.7 GB read during a 31.7 s prefill).