Clockbench - testing shared memory accumulation in native RT branch (#452) #658

Open
opened 2026-12-06 01:42:48 +00:00 by github-bot · 0 comments
Owner

@⁠khift363 on GitHub · 2026-12-06 01:34 UTC · original

What happened

I have been running with the native RT branch (#452) for some time now, but one issue I keep running into is shared memory growth over play sessions - so I decided to sit down and formally test it. I adapted a benchmark I'd used already to evaluate parameters to tune my run.conf file to something dedicated to testing memory growth over a play session, specifically growth incurred by driving.

The benchmark procedure is as follows:

  1. Start from a fixed save. Enter a specific building, then walk up to a wall clock and stare at this wall clock point blank for 60s, with timestamps saved to file for the beginning and end of the clock stare period.
  2. Exit the building, get on the fastest bike in the game
  3. Drive around the map in one gigantic loop on the interstate highways
  4. Re-enter the specific building, then walk up to the wall clock and repeat the 60s clock stare, with timestamps for the beginning and end.

The ideal result would be that the total memory in use should be near identical between the two clock stare periods. There's no need to retain any rendering structures or data from the trip; by the end of the 60s, pretty much everything unused should be discarded by then.

I did three tests:

  1. Native RT, counterclockwise/forward highway path
  2. Original RT, counterclockwise/forward highway path
  3. Native RT, clockwise/reverse highway path

Git config:

  • Main at b581f7e0a8
  • PR-452 at c8edd2f74d
  • rt-7-reuse from LOCKhart07/VIctory-xmem at 621120b747
  • PR-149 and PR-455, for audio correctness, because frankly I refuse to even benchmark this game if the music's constantly glitching out. Should have no actual effect on the results, just a personal requirement of mine.

The results:
clockbench-051-052-053-gtt

image

There is a very sizeable increase in shared memory usage over the course the benchmark that does not occur with original RT. The forward trip gains +4,288 MiB of shared memory usage between the end of the two clock stare periods; the reverse trip gains +3,844 MiB. Original RT gains +494 MiB; so still some gain, but about 8x less.

The increase in shared memory usage correlates very strongly with the count of BLAS.

Both memory usage and BLAS count plateau in this experiment at about the 7 minute mark. This may mean that it doesn't grow without bound - it just grows a lot. If you have sufficient system memory, perhaps it doesn't even impact you, if this is true.

On the other hand, the performance improvement from native RT is actually quite gigantic. Comparing the two forward results, native RT improved FPS during the driving segment by +22%, reduced hitching by -33%, reduced P99 frame time by -16%, and even the clock stare itself was +11% faster. Huge, real improvements in FPS because of native RT.

Here are zip files of the three benchmarks; they include the logs from VIctory, a separate memory pressure log my clanker made for me, the run.conf file that the run operated on, some git info (although not enough, looking at it now; full details are in the post here), the phase timestamps, and also the audio-rt log from PR-149.
benchmark-053.tar.gz
benchmark-052.tar.gz
benchmark-051.tar.gz

Version

Main at b581f7e0a8 + PR-452 + rt-7-reuse + PR-149 + PR-455

Hardware and system

Hardware / system config:
- 7900 XTX
- 7700X
- 32gb RAM
- CachyOS

Proton or Wine version

No response

Your settings


Game log

Logs are included in the benchmark zips

Kernel log (crashes, freezes, "device removed")


**@⁠khift363** on GitHub · 2026-12-06 01:34 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/658) ### What happened I have been running with the native RT branch (#452) for some time now, but one issue I keep running into is shared memory growth over play sessions - so I decided to sit down and formally test it. I adapted a benchmark I'd used already to evaluate parameters to tune my `run.conf` file to something dedicated to testing memory growth over a play session, specifically growth incurred by driving. The benchmark procedure is as follows: 1. Start from a fixed save. Enter a specific building, then walk up to a wall clock and stare at this wall clock point blank for 60s, with timestamps saved to file for the beginning and end of the clock stare period. 2. Exit the building, get on the fastest bike in the game 3. Drive around the map in one gigantic loop on the interstate highways 4. Re-enter the specific building, then walk up to the wall clock and repeat the 60s clock stare, with timestamps for the beginning and end. The ideal result would be that the total memory in use should be near identical between the two clock stare periods. There's no need to retain any rendering structures or data from the trip; by the end of the 60s, pretty much everything unused should be discarded by then. I did three tests: 1. Native RT, counterclockwise/forward highway path 2. Original RT, counterclockwise/forward highway path 3. Native RT, clockwise/reverse highway path Git config: - Main at b581f7e0a8086158953a64068ba29305d5450d68 - PR-452 at c8edd2f74d4e48133f84c4f6c6955104fe5a2411 - rt-7-reuse from LOCKhart07/VIctory-xmem at 621120b747ee8f38096460686184a9b060baea63 - PR-149 and PR-455, for audio correctness, because frankly I refuse to even benchmark this game if the music's constantly glitching out. Should have no actual effect on the results, just a personal requirement of mine. The results: <img width="1800" height="936" alt="clockbench-051-052-053-gtt" src="https://github.com/user-attachments/assets/90c1bf74-1d2e-44ed-9fc4-6ef13b8925b1" /> <img width="747" height="493" alt="image" src="https://github.com/user-attachments/assets/1404b187-80fe-4c21-b314-6145e57ea977" /> There is a very sizeable increase in shared memory usage over the course the benchmark that does not occur with original RT. The forward trip gains +4,288 MiB of shared memory usage between the end of the two clock stare periods; the reverse trip gains +3,844 MiB. Original RT gains +494 MiB; so still some gain, but about 8x less. The increase in shared memory usage correlates very strongly with the count of BLAS. Both memory usage and BLAS count plateau in this experiment at about the 7 minute mark. This may mean that it doesn't grow without bound - it just grows a lot. If you have sufficient system memory, perhaps it doesn't even impact you, if this is true. On the other hand, the performance improvement from native RT is actually quite gigantic. Comparing the two forward results, native RT improved FPS during the driving segment by +22%, reduced hitching by -33%, reduced P99 frame time by -16%, and even the clock stare itself was +11% faster. Huge, real improvements in FPS because of native RT. Here are zip files of the three benchmarks; they include the logs from VIctory, a separate memory pressure log my clanker made for me, the run.conf file that the run operated on, some git info (although not enough, looking at it now; full details are in the post here), the phase timestamps, and also the audio-rt log from PR-149. [benchmark-053.tar.gz](https://github.com/user-attachments/files/35926446/benchmark-053.tar.gz) [benchmark-052.tar.gz](https://github.com/user-attachments/files/35926447/benchmark-052.tar.gz) [benchmark-051.tar.gz](https://github.com/user-attachments/files/35926448/benchmark-051.tar.gz) ### Version Main at b581f7e0a8086158953a64068ba29305d5450d68 + PR-452 + rt-7-reuse + PR-149 + PR-455 ### Hardware and system ```text Hardware / system config: - 7900 XTX - 7700X - 32gb RAM - CachyOS ``` ### Proton or Wine version _No response_ ### Your settings ```text ``` ### Game log Logs are included in the benchmark zips ### Kernel log (crashes, freezes, "device removed") ```text ```
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-06 01:42:49 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/lobomfz--VIctory-xmem#658
No description provided.