perf(vk): the recorder thread spins 5 ms before it sleeps on Intel CPUs, which keeps their clock up #1745
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1745
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:perf/recorder-spin"
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?
Type: perf · Risk: medium · Tested on: Linux, RX 580 (RADV), i7-9700K; Linux, RTX 3090, Ryzen 9 7900X · Needs: Windows and other Intel CPUs (the Test Farm)
TL;DR
On a CPU with 6 or more cores, threaded rendering's recorder thread went to sleep many times a frame. On an Intel i7-9700K those tiny sleeps made the CPU lower its own clock to 1-3 GHz instead of 4.5, and the whole game ran about 2.5 times slower on the CPU. The recorder now keeps going for up to 5 ms before it sleeps, which keeps the clock up. In three interleaved runs each, Kokiri Forest went from 15-34 fps to 48 standing and from 24 to 42 turning, and the Market from 28 to 44 turning, with far fewer stutters.
Breakdown
RX_VK_RECORDER_SPIN_US=0.mainin three scenes on the lab PC;test_recorder_sync.pyandtest_recorder_own_idle.pypass.Why
Kokiri Forest and the Market played at 15-30 fps with constant hitches on an i7-9700K with an RX 580 at 1080p, with the GPU a third to half idle. Tracy showed the game's own update (the actor batch) taking longer; the scheduler's per-thread counters (
/proc/<pid>/task/*/schedstat) showed every game thread using about 2.5 times its CPU time a frame, with little time waiting for a core. Sampling the CPU's clock showed why: 0.8-3.1 GHz with the recorder thread on, against 3.2-4.3 GHz with it off and 4.4-4.6 GHz with a long recorder spin, at 38-57 °C, so not heat. On this CPU all cores share one clock, and the recorder's frequent short sleeps (about 20-25 a frame) let Intel's clock control (HWP, under Linux's powersave governor) pull it down for every core.The spin length was chosen from an A/B of
RX_VK_RECORDER_SPIN_US(two runs each): 1 ms was too short (Kokiri Forest turning 29.9 fps, the clock 2.1-4.3 GHz), 5 ms and 20 ms were alike (42.1 and 43.0 fps), and both beat the recorder thread off (37.8 fps). See #1407 (riqmarmes), which saw worse 1% lows under threaded rendering on the same CPU, and #1664, which set Auto's tiers on a Ryzen 9 9950X3D.What changed
The recorder's default idle spin is a fixed 5 ms instead of the adaptive 20-200 us.
gpu/vk/vk_recorder.h:kSpinDefault(5 ms) isg_spin_ns's default;RX_VK_RECORDER_SPIN_US=0now gives the adaptive spin (before, 0 read as 1 us); the comment holds the measurements.g_spin_long(set byvk_replay.cpp'srecorder_long_spin, an Intel CPU) chooses the 5 ms spin by default; other CPUs get the adaptive one.gpu/vk/switches.def:RX_VK_RECORDER_SPIN_US's row has the new default and the meaning of 0.docs/development.md, the recorder's row names the spin and its default;docs/tested/2026-11-19-recorder-spin-humanbean-*.md, the six runs.Measurements
Verdict: a large gain on the i7-9700K in every scene and phase, the runs of the two sides far apart: Kokiri Forest 15.4 → 48.1 fps standing and 24.0 → 42.2 turning (frames over 50 ms 320 → 16), the Market 28.2 → 43.8 turning (279 → 14), Hyrule Field 35.1 → 48.4 turning.
Hardware: CachyOS Linux (kernel 7.3.3), RX 580 8 GB, Mesa RADV 26.2.6, Intel Core i7-9700K (8 cores, no SMT; intel_pstate, powersave governor, balance_performance), 15 GB
Scene: the
kokiri-startrepo save: Kokiri Forest, then teleports to Hyrule Field and the Market. 1920x1080, Render resolution 100%, upscaling, DLSS and frame generation off, quality preset 6, from one pinned options file;HOS_FPS_MAX=1000. Threaded rendering Auto: "on, the render thread and the recorder thread (7 cores of 7 logical processors)" in both armsMethod: in each scene 10 s settle, then 15 s standing still and 20 s turning with the right stick held (
longshot_ctl.py sequence); fps (frames over time) and frames over 50 ms fromRX_VK_FRAME_LOG; GPU busy fromgpu_busy_percentand the CPU's clock from/proc/cpuinfo, every 100 ms. One warm-up run of the pack, then three runs a side, interleaved main, change; the medianHow to reproduce:
dev_packs.py pack <base> spin5 --tree <this branch>, a runtime with and one without the pack, the same options file;RX_VK_RECORDER_SPIN_US=0on this branch gives main's spinBaseline: the base is main
9b82abf6(adopted from a full build on the lab PC), and the change ran as a pack over it. This branch is rebased onto868f6be8; the commits between change how a few switches are read (env_on_or) and touch nothing in the recorder, threaded rendering or the virtual cores.9b82abf639b70e45The spin-length A/B behind the choice (same PC and method, two runs each, the switch on main's build; fps, frames over 50 ms):
On a Ryzen 9 7900X
(HumanBean, 2026-11-19.) CachyOS Linux, RTX 3090, Ryzen 9 7900X (12 cores, 24 threads), Threaded rendering Auto (both threads on), 2560x1440 DLSS Quality, uncapped, Reflex on: main against main with
RX_VK_RECORDER_SPIN_US=5000, a warm-up each, then 2 interleaved timed sessions each on the PC's timing queue; 15 s still, 5 s walking, 20 s turning in each area; fps from the renderer'svk: N presentslines, the median (each run in brackets).So the long spin is the default on Intel CPUs only; on this PC the PR now runs main's adaptive spin.
Flags and settings
RX_VK_RECORDER_SPIN_US's default changes, and its 0 now means the old adaptive spin.RX_VK_RECORDER_SPIN_US0read as 1 us0: adaptiveTesting
Tested: in the game on Linux, RX 580, Mesa RADV 26.2.6, i7-9700K: Kokiri Forest, Hyrule Field and the Market, standing and turning, three runs each against main as in Measurements; the log names the 5000 us spin; no device lost, nothing looked wrong in the end-of-run screenshots. Game-free:
tests/run_all.py --changedon that PC:test_recorder_sync.py,test_recorder_own_idle.py,test_threaded_rendering.pyand the rest pass;test_dev_packs.py("a game patch shows in the objects") andtest_switch_table.py(switches read in host/ and vk_replay.cpp with no row) fail the same way on main there.test_tested_configurations.pypasses with the six files.Not tested: Windows, where the scheduler and the power plan are not Linux's; AMD Ryzen CPUs, whose cores have clocks of their own (Auto's tiers were measured on one); laptops on battery.
Must be tested:
Risks
What could break: nothing in what is drawn: only how long the recorder thread waits before it sleeps. A PC could use a little more power, and with more threads than cores the spinning recorder could take time from a game thread (here the scheduler's counters show the game's threads waiting less for a core, not more).
Turning it off:
RX_VK_RECORDER_SPIN_US=0gives main's adaptive spin;RX_VK_RECORDER=offturns the recorder thread off.Compatibility: Nothing changes: no cache, option or save is touched.
Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.docs/tested/for each new measured run (format indocs/tested-configurations.md).🤖 Generated with Claude Code
https://claude.ai/code/session_016o1k1NeAdSovkHa9ukS7YM
Tested in game: Linux (CachyOS, kernel 7.3.3), RX 580, Mesa RADV 26.2.6, i7-9700K, 1080p native, no upscaler or frame generation: Kokiri Forest, Hyrule Field and the Market, standing and turning, three interleaved runs each against main. 15.4 -> 48.1 fps standing in Kokiri Forest, 28.2 -> 43.8 turning in the Market, frames over 50 ms 279 -> 14 there; the CPU's clock 4.4-4.6 GHz instead of 0.8-3.1. No device lost, nothing wrong on screen.
@Beanstalk windows: on a PC with a CPU of 6 or more cores (Threaded rendering on Auto, so the recorder thread is on), compare this PR against main in the Market, standing still and turning the camera. Expect fps no lower and no more frames over 50 ms than main. Also, if available, the same on Linux with an AMD Ryzen CPU of 6 or more cores (linux, amd).
Beanstalk test farm · an earlier run: commit
e855d37(the newer results are in a comment below)Commit
e855d37· tier reviewed · approved by HumanBean · dashboardWhat will be tested · AI plan (
gpt-6.1-terra)On Windows and Linux AMD Ryzen targets, the plan compares main and the PR in the Market, with Threaded rendering left on Auto and the recorder thread verified in the log. It measures FPS and frames over 50 ms while standing still and after a scripted camera turn, and compares Market screenshots. Each target takes about 21 minutes; lower FPS, more hitches, a crash, or a substantial screenshot difference fails the PR. The farm cannot measure during the scripted stick input or filter targets by core count, so the log check verifies that Auto enabled the recorder.
kokiri-start, then teleport to Market, measure standing for 15 s (after 10 s warm-up), take the picture market-standing to compare with main, move the stick, measure after-turn for 20 s (after 0 s warm-up), take the picture market-after-turn to compare with main; 2 runs on each side.Started at 14:58 UTC.
Estimate: done in about 50 min, from the queue and the testers online now; some jobs can't start yet.
NVIDIA GeForce RTX 3050 Ti Laptop GPU, 621.24.0Measurements · windows
Verdict: running on windows (1/1 report).
Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu
NVIDIA GeForce RTX 3050 Ti Laptop GPU, 621.24.0AMD Ryzen 7 5800H with Radeon Graphics, 16 GB RAMScene: market-recorder, from the repository's save kokiri-start; each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-recorder: 2 game starts a side, standing 15 s after 10 s warm-up, after-turn 20 s after 0 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
Markdown for the PR description
WIP: perf(vk): the recorder thread spins 5 ms before it sleeps, which keeps an Intel CPU's clock upto perf(vk): the recorder thread spins 5 ms before it sleeps, which keeps an Intel CPU's clock upPossibly related, for context:
@Beanstalk please test this PR against main on Linux PCs whose CPU has 6 or more cores (Threaded rendering's Auto turns the recorder thread on there): linux+amd, linux+nvidia, linux+intel. Settings vsync=2 (Off) and frame_rate_cap=6 (Uncapped), defaults otherwise. From the
kokiri-startsave: Kokiri Forest, Hyrule Field and Castle Town Market, in each 15 s standing then 10 s turning the camera, two game starts a side. Expect fps no lower than main and fewer frames over 50 ms; the log should showspin 5000 us(PR) againstspin adaptive 20-200 us(main) in theRX_VK_RECORDER=threadline. Windows waits for #1729 (main doesn't build on Windows until it merges).Beanstalk test farm · an earlier run: commit
e855d37, run 2 (the newer results are in a comment below)Commit
e855d37· tier reviewed · approved by HumanBean · dashboardWhat will be tested · AI plan (
gpt-6.1-terra)Linux AMD, NVIDIA and Intel GPU targets will compare the PR with main over two starts per side, using the Kokiri save and visiting Kokiri Forest, Hyrule Field and Market; the Intel target waits for a matching tester. Each visit measures 15 seconds standing, turns the camera, then measures another 10 seconds; the farm cannot measure concurrently with the stick input. The run takes roughly 25 minutes per tester, with V-Sync off and the frame rate uncapped. Crashes, lower FPS, increased over-50-ms hitch counts, visual differences or a missing PR spin log fail the plan; the recorder Auto log also gates both sides. CPU core count cannot be selected directly, but the Auto log requires the recorder thread to be active. No tester online now matches linux+intel: that target waits for one.
kokiri-start(settings vsync=2, frame_rate_cap=6), then teleport to Kokiri Forest, measure forest-standing for 15 s (after 10 s warm-up), move the stick, measure forest-after-turn for 10 s (after 0 s warm-up), take the picture forest to compare with main, teleport to Hyrule Field, measure field-standing for 15 s (after 10 s warm-up), measure field-after-turn for 10 s (after 0 s warm-up), take the picture field to compare with main, teleport to Market, measure market-standing for 15 s (after 10 s warm-up), measure market-after-turn for 10 s (after 0 s warm-up), take the picture market to compare with main; 2 runs on each side.Started at 15:03 UTC. Run 2: re-planned by HumanBean.
Estimate: done in about 55 min, from the queue and the testers online now; some jobs can't start yet.
⚠ No tester has a PC for
linux+intel(none seen in 14 days): it waits until one signs in.e855d37ac9bd4df97921Beanstalk test farm · an earlier run: commit
bd4df97(the newer results are in a comment below)Commit
bd4df97· tier reviewed · approved by HumanBean · dashboardWhat will be tested · AI plan (
gpt-6.1-terra)Two starts per side compare the PR with main from the Kokiri save through Kokiri Forest, Hyrule Field and Market, with uncapped frame rate and V-Sync off. Each scene measures 15 seconds standing and then turns the camera for 600 frames; the plan cannot time or separately measure the turn while applying stick input. FPS, standing hitches, whole-run hitches, screenshots and the PR’s recorder log are checked; a crash, lower standing FPS, more hitches, a materially different image or a missing 5000 us recorder line fails the PR. The six OS/GPU targets and an additional Linux Ryzen target are requested; Intel GPU targets may wait for a matching tester. The schema cannot filter by CPU core count, so the recorder log verifies that the changed path is active rather than enforcing the requested six-core minimum; each tester’s game runs take roughly 23 minutes plus camera-turn time. No tester online now matches linux+intel, windows+intel: those targets wait for one.
kokiri-start(settings vsync=2, frame_rate_cap=6), then teleport to Kokiri Forest, measure forest-standing for 15 s (after 10 s warm-up), take the picture forest to compare with main, move the stick, teleport to Hyrule Field, measure field-standing for 15 s (after 10 s warm-up), take the picture field to compare with main, teleport to Market, measure market-standing for 15 s (after 10 s warm-up), take the picture market to compare with main; 2 runs on each side.Started at 15:05 UTC.
Estimate: done in about 35 min, from the queue and the testers online now; some jobs can't start yet.
⚠ No tester has a PC for
linux+intel(none seen in 14 days): it waits until one signs in.AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7; 2: linux+amd+radv+igpu+handheldAMD Custom GPU 0405 (RADV VANGOGH), 26.1.99NVIDIA GeForce RTX 4070, 615.71.9AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7; 2: linux+nvidia+nvidia-proprietary+dgpuNVIDIA GeForce RTX 5070, 620.70.6AMD Radeon(TM) 880M Graphics, 2.0.416NVIDIA GeForce RTX 3050 Ti Laptop GPU, 621.24.0; 2: windows+nvidia+nvidia-proprietary+dgpuNVIDIA GeForce RTX 3090, 621.24.0Measurements · linux+amd
Verdict: fail on linux+amd (2/1 report):
three-scenes forest-standing.fps_mean.min_delta_pct (+0.0%);three-scenes field-standing.fps_mean.min_delta_pct (-5.1%);three-scenes screenshot.max_difffailed.Hardware: 1: linux+amd+radv+dgpu
AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM; 2: linux+amd+radv+igpu+handheldAMD Custom GPU 0405 (RADV VANGOGH), 26.1.99AMD Custom APU 0405, 12 GB RAMScene: three-scenes, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); three-scenes: 2 game starts a side, forest-standing 15 s after 10 s warm-up, field-standing 15 s after 10 s warm-up, market-standing 15 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)d5794c8bd4df97Flags and settings
None: the plan varied no setting, switch or build option.
Markdown for the PR description
Measurements · linux+nvidia
Verdict: fail on linux+nvidia (1/1 report):
three-scenes field-standing.fps_mean.min_delta_pct (-2.5%);three-scenes screenshot.max_diff;three-scenes market-standing.hitch_count.max_delta_pctfailed.Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu
NVIDIA GeForce RTX 4070, 615.71.9AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAMScene: three-scenes, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); three-scenes: 2 game starts a side, forest-standing 15 s after 10 s warm-up, field-standing 15 s after 10 s warm-up, market-standing 15 s after 10 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)d5794c8bd4df97Flags and settings
None: the plan varied no setting, switch or build option.
Markdown for the PR description
Measurements · linux+cpu-ryzen-*
Verdict: fail on linux+cpu-ryzen-* (2/1 report):
three-scenes forest-standing.fps_mean.min_delta_pct (-0.1%);three-scenes field-standing.fps_mean.min_delta_pct (-1.3%);three-scenes market-standing.hitch_count.max_delta_pct (+3.7%)failed.Hardware: 1: linux+amd+radv+dgpu
AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM; 2: linux+nvidia+nvidia-proprietary+dgpuNVIDIA GeForce RTX 5070, 620.70.6AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAMScene: three-scenes, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); three-scenes: 2 game starts a side, forest-standing 15 s after 10 s warm-up, field-standing 15 s after 10 s warm-up, market-standing 15 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)d5794c8bd4df97Flags and settings
None: the plan varied no setting, switch or build option.
Markdown for the PR description
Measurements · windows+amd
Verdict: queued on windows+amd (1/1 report).
Hardware: 1: windows+amd+amd-proprietary+igpu
AMD Radeon(TM) 880M Graphics, 2.0.416AMD Ryzen AI 9 365 w/ Radeon 880M, 32 GB RAMScene: three-scenes, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); three-scenes: 2 game starts a side, forest-standing 15 s after 10 s warm-up, field-standing 15 s after 10 s warm-up, market-standing 15 s after 10 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
Markdown for the PR description
Measurements · windows+nvidia
Verdict: fail on windows+nvidia (2/1 report):
three-scenes field-standing.fps_mean.min_delta_pct (-0.6%);three-scenes market-standing.fps_mean.min_delta_pct (-0.7%);three-scenes run_hitch_count.max_delta_pct (+12.2%)failed.Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu
NVIDIA GeForce RTX 3050 Ti Laptop GPU, 621.24.0AMD Ryzen 7 5800H with Radeon Graphics, 16 GB RAM; 2: windows+nvidia+nvidia-proprietary+dgpuNVIDIA GeForce RTX 3090, 621.24.0AMD Ryzen 9 5900X 12-Core Processor, 128 GB RAMScene: three-scenes, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); three-scenes: 2 game starts a side, forest-standing 15 s after 10 s warm-up, field-standing 15 s after 10 s warm-up, market-standing 15 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)d5794c8bd4df97Flags and settings
None: the plan varied no setting, switch or build option.
Markdown for the PR description
@Beanstalk #1729 is merged and this PR is rebased on it, so Windows builds again. Please add Windows to the test: windows+amd, windows+nvidia and windows+intel PCs whose CPU has 6 or more cores (Threaded rendering's Auto turns the recorder thread on there), as well as the Linux targets asked for above. Settings vsync=2 (Off) and frame_rate_cap=6 (Uncapped), defaults otherwise. From the
kokiri-startsave: Kokiri Forest, Hyrule Field and Castle Town Market, in each 15 s standing then 10 s turning the camera, two game starts a side, this PR against main. Expect fps no lower than main and no more frames over 50 ms; the log showsspin 5000 us(PR) againstspin adaptive 20-200 us(main) in theRX_VK_RECORDER=threadline.Measured on a Ryzen 9 7900X (12 cores, 24 threads, each core its own clock) with an RTX 3090 on CachyOS Linux: main against main with
RX_VK_RECORDER_SPIN_US=5000(the same spin as this PR's default), Threaded rendering Auto (render and recorder threads on), 2560x1440 DLSS Quality, uncapped, Reflex on; a warm-up of each, then 2 timed sessions each, interleaved, on the PC's timing queue. Kokiri Forest, then Hyrule Field and the Market by teleport: 15 s still, 5 s walking, 20 s turning. fps (frames over time from the renderer'svk: N presentslines), the median of the two (each run in brackets):So the 5 ms spin costs 6-11% in Hyrule Field and 3-5% in the Market on this CPU, with a higher p99; Kokiri Forest is about even. Here each core sets its own clock, so the short sleeps cost nothing, and a recorder core kept spinning likely shares a physical core with one of the game's threads. As the default for every CPU this would be a loss on Ryzen; suggestion: the 5 ms spin by default only where the cores share one clock (Intel desktop CPUs like the i7-9700K), the adaptive spin elsewhere, until a structural fix (the recorder sleeping at the frame's end rather than after a fixed time, or fewer, larger hand-offs to it) can be measured on both kinds of CPU. The Test Farm runs asked for above will show Windows and other CPUs.
Beanstalk test farm
Commit
78d3259· tier reviewed · approved by HumanBean · dashboardWhat will be tested · AI plan (
gpt-6.1-terra)Two starts per side compare main and the PR in Kokiri Forest, Hyrule Field and the Market, with V-Sync off and the frame-rate cap uncapped. Each scene is measured for 15 seconds standing and 10 seconds after a camera turn; the plan cannot measure while the stick input is running. Lower FPS, more frames over 50 ms, a missing recorder-spin log or a crash fails the PR. CPU core count and vendor cannot be targeted directly, and the shared log rule accepts either spin rather than enforcing the CPU-specific choice. The requested Intel-GPU targets have no matching online hardware listed and will remain pending until matching hardware is available. No tester online now matches windows+intel, linux+intel: those targets wait for one.
kokiri-start(settings vsync=2, frame_rate_cap=6), then teleport to Kokiri Forest, measure kokiri-still for 15 s (after 10 s warm-up), move the stick, measure kokiri-after-turn for 10 s (after 0 s warm-up), teleport to Hyrule Field, measure field-still for 15 s (after 10 s warm-up), measure field-after-turn for 10 s (after 0 s warm-up), teleport to Market, measure market-still for 15 s (after 10 s warm-up), measure market-after-turn for 10 s (after 0 s warm-up); 2 runs on each side.Done (started 16:18 UTC, last report 21:37 UTC). Comment
@Beanstalkto run it again.NVIDIA GeForce RTX 4070 Ti, 621.14.0; 2: windows+nvidia+nvidia-proprietary+dgpuNVIDIA GeForce RTX 3070, 621.24.0AMD Radeon RX 7900 XTX, 2.0.416; 2: windows+amd+amd-proprietary+igpuAMD Radeon(TM) 880M Graphics, 2.0.416AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7; 2: linux+amd+radv+dgpuAMD Radeon RX 9070 XT (RADV GFX1201), 26.2.6NVIDIA GeForce RTX 4090, 590.48.1; 2: linux+nvidia+nvidia-proprietary+dgpuNVIDIA GeForce RTX 5070, 620.70.6Run by hand on PCs that don't match their target (not counted toward it):
NVIDIA GeForce RTX 5070, 620.70.6)Measurements · windows+nvidia
Verdict: fail on windows+nvidia (2/1 report):
recorder-scenes crash;recorder-scenes kokiri-after-turn.fps_mean.min_delta_pct (-0.2%);recorder-scenes field-after-turn.fps_mean.min_delta_pct (-3.2%)failed.Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu
NVIDIA GeForce RTX 4070 Ti, 621.14.0AMD Ryzen 9 5900X 12-Core Processor, 64 GB RAM; 2: windows+nvidia+nvidia-proprietary+dgpuNVIDIA GeForce RTX 3070, 621.24.0AMD Ryzen 5 5600X3D 6-Core Processor, 32 GB RAMScene: recorder-scenes, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); recorder-scenes: 2 game starts a side, kokiri-still 15 s after 10 s warm-up, kokiri-after-turn 10 s after 0 s warm-up, field-still 15 s after 10 s warm-up, field-after-turn 10 s after 0 s warm-up, market-still 15 s after 10 s warm-up, market-after-turn 10 s after 0 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)d5794c878d3259Flags and settings
None: the plan varied no setting, switch or build option.
Markdown for the PR description
Measurements · windows+amd
Verdict: fail on windows+amd (2/1 report):
recorder-scenes kokiri-still.fps_mean.min_delta_pct (-5.3%);recorder-scenes kokiri-after-turn.fps_mean.min_delta_pct (-19.2%);recorder-scenes field-still.fps_mean.min_delta_pct (-0.8%)failed.Hardware: 1: windows+amd+amd-proprietary+dgpu
AMD Radeon RX 7900 XTX, 2.0.416AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM; 2: windows+amd+amd-proprietary+igpuAMD Radeon(TM) 880M Graphics, 2.0.416AMD Ryzen AI 9 365 w/ Radeon 880M, 32 GB RAMScene: recorder-scenes, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); recorder-scenes: 2 game starts a side, kokiri-still 15 s after 10 s warm-up, kokiri-after-turn 10 s after 0 s warm-up, field-still 15 s after 10 s warm-up, field-after-turn 10 s after 0 s warm-up, market-still 15 s after 10 s warm-up, market-after-turn 10 s after 0 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)d5794c878d3259Flags and settings
None: the plan varied no setting, switch or build option.
Markdown for the PR description
Measurements · linux+amd
Verdict: fail on linux+amd (2/1 report):
recorder-scenes kokiri-after-turn.fps_mean.min_delta_pct (-1.5%);recorder-scenes field-still.fps_mean.min_delta_pct (-14.9%);recorder-scenes market-still.fps_mean.min_delta_pct (-46.4%)failed.Hardware: 1: linux+amd+radv+dgpu
AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM; 2: linux+amd+radv+dgpuAMD Radeon RX 9070 XT (RADV GFX1201), 26.2.611th Gen Intel(R) Core(TM) i9-11900KB @ 3.30GHz, 32 GB RAMScene: recorder-scenes, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); recorder-scenes: 2 game starts a side, kokiri-still 15 s after 10 s warm-up, kokiri-after-turn 10 s after 0 s warm-up, field-still 15 s after 10 s warm-up, field-after-turn 10 s after 0 s warm-up, market-still 15 s after 10 s warm-up, market-after-turn 10 s after 0 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)d5794c878d3259Flags and settings
None: the plan varied no setting, switch or build option.
Markdown for the PR description
Measurements · linux+nvidia
Verdict: fail on linux+nvidia (2/1 report):
recorder-scenes log_expected_missing.max;recorder-scenes crash;recorder-scenes market-still.fps_mean.min_delta_pct (-0.4%)failed.Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu
NVIDIA GeForce RTX 4090, 590.48.1AMD Ryzen 7 5700X3D 8-Core Processor, 128 GB RAM; 2: linux+nvidia+nvidia-proprietary+dgpuNVIDIA GeForce RTX 5070, 620.70.6AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAMScene: recorder-scenes, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); recorder-scenes: 2 game starts a side, kokiri-still 15 s after 10 s warm-up, kokiri-after-turn 10 s after 0 s warm-up, field-still 15 s after 10 s warm-up, field-after-turn 10 s after 0 s warm-up, market-still 15 s after 10 s warm-up, market-after-turn 10 s after 0 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)d5794c878d3259Flags and settings
None: the plan varied no setting, switch or build option.
Markdown for the PR description
perf(vk): the recorder thread spins 5 ms before it sleeps, which keeps an Intel CPU's clock upto perf(vk): the recorder thread spins 5 ms before it sleeps on Intel CPUs, which keeps their clock up@Beanstalk the PR changed: the 5 ms spin is now the default on Intel CPUs only (AMD CPUs keep main's adaptive spin; it cost 3-11% on a Ryzen 9 7900X). Please test this PR against main on PCs whose CPU has 6 or more cores, preferring Intel CPUs: windows+intel, linux+intel, and windows+nvidia / windows+amd / linux+amd / linux+nvidia testers with an Intel CPU where there are some; on an AMD CPU expect no change. Settings vsync=2 (Off) and frame_rate_cap=6 (Uncapped), defaults otherwise. From the
kokiri-startsave: Kokiri Forest, Hyrule Field and Castle Town Market, in each 15 s standing then 10 s turning the camera, two game starts a side. Expect fps no lower than main and no more frames over 50 ms; the log'sRX_VK_RECORDER=threadline showsspin 5000 uson Intel andspin adaptive 20-200 uson AMD.Windows 11, i7-13700K / RTX 5090, Balanced, uncapped and windowed behind other windows. I tested
bd4df979in one binary: default 5 ms spin vsRX_VK_RECORDER_SPIN_US=0(adaptive 20–200 µs). Both render and recorder threads were on.The 5 ms spin didn’t meet the requested ‘FPS no lower’ result in the Market. In pairs 1/2/3, FPS was lower by 5.7/6.0/0.7% standing and 7.0/9.1/1.3% turning. Market-turn p99 was also higher in all three. Kokiri and Field FPS went both ways. Market frames over 50 ms: one with 5 ms, none with adaptive; across all scenes: three vs zero (18 windows per arm).
Game CPU share was higher in all 18 comparisons (+0.7 to +2.5 percentage points), without a consistent rise in the machine-wide clock estimate. Non-game CPU was higher in all six fixed-spin Market windows; pair 3 was a separate, quieter attempt after a launcher failure. Three pairs on this PC don’t isolate the cause or establish a general Windows regression.
HumanBean referenced this pull request2026-11-19 17:34:44 +00:00
Replaced by #1763: it removes the recorder thread entirely (the game's thread records its own work and the render thread replays it), so there is no recorder left to spin, and Intel's clock drop from its 20-25 wake-ups a frame goes with it. Closing this one so there is a single PR.
Pull request closed