mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-04 07:18:50 +00:00
From PR #7091 by @svonolfen (the switch and the measurements). The first version of this fix reserved half of the lend regions on a drive that reads 3 GB/s or more. Measured on 2 x RTX A6000 made RAM-tight like the reporter's PC (9 interleaved rounds, same 2170-slot / 6.3 GiB lend regions): no decode gain at 50% (median ratio 0.996 and 1.012, run-to-run spread about 5%), cold 18K-token prefill 5 to 7% slower in every round. At 0% decode +5.5% (4 of 4 rounds) and cold 18K prefill -17%. The reporter's own table has the same shape (decode +9%, prefill at 18K -4.6%, at 36K -0.8%). A half-way default has a cost and no measured gain, so the default is back to the whole reservation (0.1.66 / 0.1.67 behaviour) on every drive, and the drive probe is gone. STRATA_SPLIT_LEND_RESERVE stays as an opt-in: 0 fills the expert complement first (the order before #6583, the reporter's PR), 1..99 reserves that percent of the borrowed slots' bytes counted from the highest slot of each stage, unset / full / 100 / anything else reserves all. The reserved first part of every region is appended first, so the reserved slots are certain to be kept and the stages stay balanced; with the default nothing in the placement changes. The startup line names the percent when it is not 100. Answers do not change in any setting (the same experts are read from RAM or from the file; gate on 2 x A6000: KL 0, identical ids, noise floor 0). docs/DETAILS.md describes the setting and the measured trade; the settings register entry is rollback / off by default; the unit tests cover the rule (unset / auto / full / 0 / percent / bad values) and the fixture at full / 50 / 0.