mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1138] Windows: higher process/thread priority improves decode throughput under CPU contention, with a measured background-work trade-off #477
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#477
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 @Unmaple on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1138
Summary
On an Intel hybrid-core Windows system, raising Strata's process and thread priorities improved decode throughput and reduced the slowdown caused by concurrent CPU work.
Normal-priority background computation retained approximately 94–97% of its standalone throughput, although its response-time tail increased.
These preliminary results suggest that an opt-in high-priority mode might be useful.
Configuration
f7407d9: common buffered CPU-call timing and resident-RAM controls, without arithmetic-kernel changes. The full cold-expert RAM complement was retained in both groups.Priority conditions:
CUDA stream priorities were unchanged. This test did not use Realtime priority.
Method
We tested one and four continuously computing background threads, with four paired N/H runs per background-load condition. Run order alternated between N→H and H→N, using fresh engine processes and the same GPU hardware warm-up.
Each busy thread performed fixed integer computations. Progress was recorded after each fixed block of 2,097,152 LCG iterations, allowing both wall-clock completion time and throughput to be measured. Thread CPU time was also recorded.
A separate Normal-priority periodic probe targeted 100µs intervals. Standalone background baselines were measured before and after the engine comparisons, with the same periodic probe present.
All paired generated token IDs were identical. Generated-token, MTP accepted/offered, and routing/cache summary counters also matched.
Decode throughput
Values below are total generated tokens divided by total decode time within each condition.
*Both conditions also included the periodic probe.
Increasing the background load from one to four busy threads reduced decode throughput by approximately 14.2% in the N group, versus 3.4% in the H group.
Background-work throughput
Background throughput is normalized to the corresponding standalone baseline, using the average of the before/after baselines. Engine-run throughput is aggregated over the measured decode intervals.
Relative to N, H reduced busy-thread throughput by approximately 0.7% with one thread and 4.1% with four threads. Completing the same amount of work therefore took approximately 0.7% / 4.3% longer, respectively, using the geometric mean of the paired ratios.
The throughput cost was modest in this workload, but responsiveness and throughput should be considered separately.
Responsiveness and engine call tails
These are medians of the per-run P99.9 values, covering executed callbacks. Missed periodic slots are counted separately: with four busy threads, the median skipped-slot fraction increased from 1.28% to 17.86%. Individual H runs also contained maximum probe delays of approximately 35–93ms.
Conversely, the engine's CPU-pool call P99.9 decreased from approximately 13.56ms to 2.10ms in the four-thread condition (medians of per-run call percentiles).
Limitations
Possible upstream direction
Would a user-selectable Windows priority mode be appropriate, retaining Normal priority as the default and preserving any existing relative thread-priority differences?
This is related to the CPU contention discussed in #921, but tests a different variable: process/thread priority rather than spin duration.
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.