mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4952] [CLOSED] [Engine] Windows: disable EcoQoS background throttling for engine and benchmark processes #5262
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#5262
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/4952
Author: @utombords
Created: 11/1/2026
Status: ❌ Closed
Base:
main← Head:pr/windows-ecoqos📝 Commits (1)
c938d37windows: do not let EcoQoS throttle the engine we serve, or the run we measure📊 Changes
2 files changed (+51 additions, -2 deletions)
View changed files
📝
serve/lifeline.py(+8 -1)📝
tools/strata_bench.py(+43 -1)📄 Description
Problem and result
On Windows 11 hybrid Intel CPUs (12th Gen through Arrow Lake), a console process that owns no foreground window is classified by the OS under EcoQoS (
ProcessPowerThrottling), which schedules its threads onto E-cores and clamps clock frequency to a fraction of base clock. Both the isolated engine worker spawned byserve/lifeline.pyand the benchmark process intools/strata_bench.pyrun without a foreground window.On an Intel Core Ultra 9 285K + RTX 5070 Ti (Windows 11), when Windows 11 clamps the backgrounded server under EcoQoS during
tools/strata_bench.py --runs 3(qwen3.8-flash-next-nvfp4-nvfp4-BF16, warm RAM, 15 CPU workers), median chat decode drops to25.1 tok/s(21.6–36.5,n=9) and median agent decode drops to28.7 tok/s(24.6–36.7,n=15). Even when EcoQoS only engages mid-session (during the final agent run), worst-turn agent decode drops to27.2 tok/s.With this change:
serve/lifeline.pyaddsHIGH_PRIORITY_CLASS(0x00000080) tocreationflagswhen spawning isolated roles (engine,vision) on Windows.tools/strata_bench.pycallsSetPriorityClass(..., HIGH_PRIORITY_CLASS)andSetProcessInformation(..., ProcessPowerThrottling, ...)withStateMask = 0on startup (and passesHIGH_PRIORITY_CLASSwhen spawning a server child) so benchmark runs measure the engine rather than Windows background power throttling.tools/strata_bench.pysuite, releasing the clamp lifts median chat decode from25.1to57.7 tok/s(+129.9%), chat TTFT from1.64 sto0.92 s(-43.9%), 4K prompt from1509.7to1702.5 tok/s(+12.8%), 16K prompt from2476.2to2700.9 tok/s(+9.1%), and median agent decode from28.7to67.8 tok/s(+136.2%, range56.4–89.7 tok/s).Related discussion
none
Approach
serve/lifeline.py(popen()forISOLATED_ROLESonos.name == "nt"), and release bothHIGH_PRIORITY_CLASSandProcessPowerThrottling(PROCESS_POWER_THROTTLING_STATE) intools/strata_bench.pyviactypes.WinDLL("kernel32")on a best-effort basis.Validation
Passed:
870aedd9(v0.2.8) andc62d5e3a(v0.2.9 / engine 0.1.55):python -m unittest serve.test_lifeline:7tests,OK(skipped=3POSIX-only tests).python tools/strata_bench.py --runs 3(qwen3.8-flash-next-nvfp4-nvfp4-BF16, RTX 5070 Ti 16 GB +--pool-workers 15, warm RAM, pure upstream AVX2):Failed:
Not run:
ProcessPowerThrottlingis unsupported (disable_windows_throttling()catches any error and continues).Limits
src/kernels/cpu/pool_affinity_win.hpp.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.