Skip to content

launcher: experiment with a reserved live shader worker - #240

Closed
Valdi320 wants to merge 1 commit into
brcly:mainfrom
Valdi320:work/runtime-fast-lane-20261126
Closed

Valdi320 wants to merge 1 commit into
brcly:mainfrom
Valdi320:work/runtime-fast-lane-20261126

Conversation

@Valdi320

Copy link
Copy Markdown
Contributor

Problem

All live compiler workers can be occupied by large cold DXC compiles, leaving a small request waiting behind them. That may increase latency while a title is running.

Experiment

Opt-in TUXBOX_RUNTIME_FAST_LANE=1 reserves one worker when there are at least two. Classify cold work using generated HLSL >=256 KiB (the existing large-pixel threshold, not a proven cost predictor). Defer large requests without a failure marker and resume them in publication order when capacity is available. Warm cache hits bypass admission; source validation, compiler flags, timeouts, worker ceiling and launch-time preparation are unchanged.

Measurements

Two live workers, three large requests (same generated 506,834-byte HLSL fixture) followed by a small 5,873-byte request. Real DXC and DXV; synthetic translator stub; separate cold caches with content reuse disabled to isolate scheduling. Three runs per mode, median:

  • Small request completion: 901.2 -> 23.5 ms (~38x faster).
  • Whole batch: 1.831 -> 2.781 s (~52% slower).
  • Peak simultaneous large DXC invocations: 2 -> 1.
  • All four DXIL outputs identical across all six runs, with four DXC and DXV invocations each.
    These are synthetic latency/throughput measurements, not retail FPS or RAM measurements. Deferring a large request retranslates it once. Small expensive shaders can still block the reserved worker. Mixed workloads and memory pressure may benefit, while large-only batches may slow down. Keep disabled by default.

Validation

  • Regression coverage for small requests completing before blocked large work, deferred shutdown, one-worker compatibility, cold admission and warm reuse without failure/cache pollution.
  • All six official code-check groups passed.
  • 8/8 Lanes gates on RTX 4080/GE-Proton11-14 with experimental option enabled and two workers, reused same-base provider/fixture with verified source equality; current translator.
  • No retail data included.

Draft pending full GPU suite, AMD and actual title profiling. Independent of #239; combined effects are not measured.

@Valdi320

Copy link
Copy Markdown
Contributor Author

Deferred: reserved-worker experiment improves synthetic small-request latency but slows batch throughput ~52%; Nick's #283 addresses observed request wake-up latency independently. Revisit only if contention remains measured. Closing this draft to make the review queue manageable, per the maintainer's request. The branch and history remain intact at 5cbe1b1; no branch deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant