mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 19:04:50 +07:00
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#27
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 @klvnblst on GitHub (Oct 9, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/67
Hardware
nvidia-smishows PCIe Gen5, width x8 current / x16 max (read at idle)Setup
63e3b7c), Maya-S24, 32K context (vision encoder files installed, some runs in the log used it)--calibratewas run (unlike #65). Result incalibration.json:STRATA_GLM_PCIE_SHARE=0.75,STRATA_GLM_CPU_LANE=16, 3.4 tok/sResults (decode)
Best case ~4 tok/s, usually 2-3.4 tok/s, first answer after start ~1.5 tok/s.
What the log shows
Startup:
Typical decode lines (during calibration and normal use):
--calibrate, which only moved it from ~3.0 to ~3.4 tok/s.Question
Is the Intel RST RAID 0 / Windows read path the bottleneck here? Anything worth trying (more I/O threads, a smaller RAM-tier/VRAM split, Maya-S vs S24, turning off vision)? Happy to run any test build or env setting.
Not tested / not attached
START-MAYA.bat --benchnot run yet (can run it if useful)maya-report.txt(START-MAYA.bat --report)@klvnblst commented on GitHub (Oct 9, 2026):
Raw drive speed (DiskSpd 2.3, 8 GB test file on the same volume as the model, unbuffered
-Sh, reads only):One expert-sized read takes ~1.3 ms on this drive, but Maya's log shows ~15–20 ms per disk wait (e.g. 236.77 ms / 12.39 waits). So the drive isn't the limit: the Windows read path seems to be 10–15x slower than the hardware. At 1.3 ms a read, the ~185–240 ms/tok of disk waits would be ~20 ms/tok.
@mw00 commented on GitHub (Oct 9, 2026):
Thank you, the log shows exactly where the time goes.
Why it's slow here. Maya-S24 is 94.7 GB, and on this laptop about 57-61 GB of it fits in VRAM and RAM. The other 12-41 experts each token needs are read from the SSD, and those waits are 75-90% of the token. On 64 GB of RAM that part is expected.
What isn't expected is the cost of each read: ~15-20 ms for a ~7 MB expert, where an NVMe on Linux takes ~3 ms. We want to find out whether the read size or the RAID driver is the cause. Please:
Update to v1.0.27: run
git pullin the Maya folder, thenSTART-MAYA.bat. It recompiles what changed and doesn't download the model again. (The dashboard's About > Update button only exists from v1.0.18.) v1.0.15 is twelve releases back, and--calibratechanged in v1.0.25 (it now measures on fresh prompts). So runSTART-MAYA.bat --calibrateonce after updating.Remove
"STRATA_GLM_PREFILL_ATTN": "f32"from the"env"block ofmaya-maya-s24.jsonin the Maya folder. It forces the slow FP32 prompt-attention kernel. If you set it to work around an error, tell us which one instead.Try the read size. Each expert is read in 3 x
STRATA_GLM_READ_CHUNKSpieces (8 by default, so 24 reads of ~300 KB) spread over the CPU-lane threads. On Windows each read seems to have a fixed cost, so fewer, larger reads may be faster. For each of1,2,4,8and16:"STRATA_GLM_READ_CHUNKS": "<value>"to that"env"block (keep the tuned settings already there);START-MAYA.bat --bench;maya-bench.txtit writes, or 3-4glm stat:lines frommaya-maya-s24.log.The number we compare is
disk ... ms/tokdivided by itswaits/tok: the time one read takes.Attach
START-MAYA.bat --reportonce, after updating.If you have a drive outside the Intel RST RAID volume with ~100 GB free, one run with the model folder there would also tell us whether RST adds to the per-read time. That's optional.
@klvnblst commented on GitHub (Oct 9, 2026):
Found it, with a fix in #73.
Cause: the engine keeps a
MapViewOfFileof every model file open for its whole life. On Windows, while a file has a mapped view, every unbuffered (FILE_FLAG_NO_BUFFERING) read of it goes through NTFS's cache-coherency path. One expert read went from 1.8 ms to 5.4 ms (same reads, same files, mapped vs not). Unmapping after the load brings it back to 1.8 ms.A second, smaller one: on a CPU without SMT (this Ultra 9 275HX: 24 cores, 24 threads) the CPU lane's default of one thread per core spins on every CPU, and the disk readers wait for a time slice.
Results (
--bench, Maya-S24, RAM tier pinned at 40 GB):With this PC's normal free RAM, decode is 9.5 tok/s, up from ~3.4 after
--calibrate. Details and the thread sweep are in the PR.#65 (RTX 5090 desktop, Windows, SSD-bound, ~7.6 ms per expert read) looks like the same cause.
@mw00 commented on GitHub (Oct 10, 2026):
v1.0.30 is out with #73, the fix @klvnblst found for this. While the model files stayed mapped, Windows sent every direct read of them down a slower path; the engine now unmaps them after the load. CPUs without hyper-threading also leave a third of their cores for the disk readers.
To update:
git pullin the Maya folder, thenSTART-MAYA.bat(or the dashboard's About > Update, from v1.0.18 on). Then runSTART-MAYA.bat --calibrateonce. If decode is still slow, please postSTART-MAYA.bat --bench'smaya-bench.txtand--reporthere.@klvnblst commented on GitHub (Oct 11, 2026):
Follow-up on v1.0.30 (with #73), same laptop: RTX 5090 Laptop 24 GB, Core Ultra 9 275HX (24 cores, no SMT), 64 GB RAM, Intel RST RAID 0 NVMe, Windows 11, Maya-S24, 64K context,
STRATA_GLM_KV_INT8=1, calibration keptSTRATA_GLM_PCIE_SHARE=0.10.Decode in real use is ~12-14 tok/s now (was 2-4). Disk waits were still ~40% of a token, so I looked at the disk path. Two findings:
1.
STRATA_GLM_READ_CHUNKS=4is ~15% faster than the default 8 here--bench(greedy, so every run writes the same tokens), withSTRATA_GLM_RAM_GB=44.5so every start gets the same RAM tier, andexpert_usage.txtrestored before each run. Runs were interleaved (4, 6, 8, 4, 6, 8, ...).READ_CHUNKSThe first few runs (both 16s, three of the 8s, the first 4) were before I set
RAM_GB, with tiers of 44.4-45.1 GB, close to the 44.5 used later. I left out one 8 run that started with only a 40.85 GB tier (13.0 tok/s).In the
glm statlines the reads per token are the same at every setting (greedy, same routes), but the disk time per token is ~25% lower with fewer chunks. Answer by answer, 8 vs 2: 37.4 / 28.6 / 22.6 / 30.0 ms/tok vs 28.9 / 20.9 / 16.6 / 23.1. It is flat from 1 to 4. I don't know which part of the cause is the RAID driver liking larger requests and which part is the 8 reader threads competing less with the 16 CPU-lane threads on a CPU without SMT. Since the best value seems to depend on the disk, maybe--calibratecould try a few values, as it already does forPCIE_SHAREandCPU_LANE.For the record,
STRATA_GLM_AHEAD=2was not faster here either (11.9 tok/s vs 11.4-11.8 without it, in real chats): ~1/3 fewer disk reads per token, but each one ~45% slower, the same as your Mercury note.2. The start fails with
pinned disk staging did not allocatewhen the RAM tier is sized at ~45.3 GBWith the default sizing (no
RAM_GB, headroom 6), back-to-back--benchruns got larger tiers as the PC freed RAM. Every start at 45.31 GB or more failed while loading; every start at 45.10 GB or less worked:pinned disk staging did not allocate(3 of 3)Free RAM was ~50-55 GB at the time (Windows reported 76 GB of commit free), so it does not look like the RAM simply ran out. It looks more like a cap on how much can be pinned at once, hit by the small
stagebuffers thatcudaHostAllocasks for after the tier and the landing ring. A user would see it as Maya not starting right after a reboot, when a lot of RAM is free. WithSTRATA_GLM_RAM_GB=44.5it never happened (8 starts).As far as I can read v1.0.32, #85 changes the sizing only for the later parts of a split, so a single GPU should still hit this. I haven't tried v1.0.32 yet. I can run it on v1.0.32, or with a debug build, if that helps.
@mw00 commented on GitHub (Oct 11, 2026):
Thank you, both findings are in #99, which goes into the next release.
1.
STRATA_GLM_READ_CHUNKS: I measured it on our Linux box with a disk-bound decode (2x V100, NVMe, about 13 expert reads a token), interleaved: 8 pieces 12.6 tok/s, 4 pieces 12.3, 2 pieces 11.8. So 8 stays right there, while your laptop wants 4. Since the best size depends on the drive, its driver and the CPU,--calibratenow measures it, as you suggested:2.
pinned disk staging did not allocateat a ~45.3 GB tier: you read it right. The tier took everything the driver lets a process pin, and the eight small staging buffers asked for after it got nothing. They (and the table-update buffers) are now pinned before the tier, so a cap makes the tier smaller instead of failing the start. A refused tier also now shrinks by 1/32 a try at first, instead of 1/8, so at your cap it loses ~1.4 GB rather than ~5.6.When the release is out, a start without
STRATA_GLM_RAM_GBright after a reboot, and one--calibrate, would confirm both on your laptop. Your 14.5 tok/s (--bench, v1.0.30) is going into the README's table (#100).@mw00 commented on GitHub (Oct 11, 2026):
Both fixes are out in v1.0.33: the small pinned buffers come before the RAM tier, and
--calibratemeasures the disk reads' size. A start withoutSTRATA_GLM_RAM_GBright after a reboot, then oneSTART-MAYA.bat --calibrate, would confirm them on your laptop.@mw00 commented on GitHub (Oct 12, 2026):
Closing: both fixes have been out since v1.0.33, and your laptop's numbers are in the README. If a start after a reboot still shows the old symptom on v1.1.3, a comment here reopens it.