CPU Performance Patch (Up to 30% faster physics, up to 60% more FPS)

Other CPU Performance Patch (Up to 30% faster physics, up to 60% more FPS)

After a few long sessions in VR, I have no issues to report so far. Performance has been more stable compared to patch 12, heap size growth is vastly slower than vanilla when using plugins that induce a "leak", and stutters are indeed way less frequent. No significant FPS problems that I can see, with Desktop in particularly being buttery smooth. Unlike @raven37 , I haven't had issues with or without Naturalis (I'm using everlaster.Naturalis.64.var). PC build and settings used:

i9-13900K (no overclocks) - RTX 4090 (no overclocks) - 64 gigs of DDR4 at 3600MHz - SSD with more than 100 gigs available at all times

Windows 10 Pro

Meta Quest 2 via Virtual Desktop, bypassing SteamVR, refresh rate 72hz

Physics rate at 72hz and update cap at 2

Process Lasso with Performance Mode induced on VAM process, no other adjustments to affinity or anything of the sort, hyperthreading is on

Complex Scripter-powered VAM scene using several instance of Timeline for joint-driven animation, state machines, and parameters for a shitload of other plugins.

Boot.config:
gfx-enable-gfx-jobs=1
gfx-enable-native-gfx-jobs=1
wait-for-native-debugger=0

No changes made to SkinMeshPartDLL.ini

I did get bluescreened in Desktop Mode during a VAM session with patch 13b1, but that could have been due to any number of things not related to the patch. Other very long Desktop sessions with the patch have been rock-solid. I'll be getting more experimental and will report back with any issues or improvements I find.

EDIT: Had forgotten to mention which Windows version I'm on (10 Pro).
 
Last edited:
unsure if its been posted but ive been getting a "too many heap sections" crash with the new update using naturalis. V12 didnt have this issue
Also had that problem. No issues after rolling back to patch 12.
7950x
4090
64gb ddr5
 
Users who have heap related crashes: Do you have a fairly low fps in this scene? Like 0-60
Users who dont have heap related crashes: Do you have a fairly high fps in this scene? Like 150-300
 
Users who have heap related crashes: Do you have a fairly low fps in this scene? Like 0-60
Users who dont have heap related crashes: Do you have a fairly high fps in this scene? Like 150-300
No heap related crashes so far, and yes, FPS is tipically in the 150-300 range when soft body physics aren't too intense. I just loaded VAM Produce 69 as a test at its default configurations (no soft body, no HQ physics), and at the song selection screen it hovers around 70-90 FPS, but gets back to 150-300 during songs themselves (maybe because the gigantic UI is toggled off).
 
Users who have heap related crashes: Do you have a fairly low fps in this scene? Like 0-60
Users who dont have heap related crashes: Do you have a fairly high fps in this scene? Like 150-300
So far I only experienced it while loading Vam produce 69. I tried a few other scenes and they didn't crash, though I didn't test for duration.
 
To any AMD users here (AMD CPU, that is), I'm just curious about something specific.

So in Ryzen Master, when monitoring the CPU activity, temps, speeds etc... I noticed that my Cores all seem to hover around the 2.5 to maybe 3.5Ghz mark. Now, obviously, it varies a lot, there's very low minimums; but - in particular - the maximums seem to be... very conservative to say the least. I say this because Ryzen Master reports that my CPU's maximum clock should be 5.6Ghz (side note that's for a 7900X3D, and that's boost speed, I know). However, I barely ever see 4Ghz.

In fact, there's a gauge called "Peak Speed" (next to the Temperature gauge) and it's easy to see which Cores reached what exact maximum during my VAM sessions (the highest maximum is then reported in that Peak Speed gauge). And, so far, after testing multiple sessions (with the patch of course) I am seeing that the reported Peak Speed is never higher than 4.2Ghz. Now of course I know that not all applications would necessarily be able to push the CPU enough to end up with the 5.6Ghz limitation of the chip but it seems to me that VAM isn't pushing the CPU as much as I'd expect it to. Or maybe I'm thinking wrong here. I'm just curious, more than anything else.

I'd like to see other AMD CPU users here tell what is Ryzen Master reporting for the following stats when they're in a VAM session (be it Desktop mode or VR):

1) Reported Peak Speed (Vs which actual AMD CPU model you have)
2) From your observations, what seems to be the average 'Lows' and the average 'Highs' on individual Cores being used by VAM.

For me, 'Peak Speed' is about 4Ghz.
And my average 'Lows' is about 900 Mhz (yes, Mhz), and average 'Highs' seems to stick around the 3.3Ghz range (it does vary though).
My 7800X3d boost to 4.5ghz during the benchmark. It does boost to 5.050ghz during stress tests. So i guess vam just doesnt need all the clock speed (maybe just for x3d chips?).
Your max boost on your 7900X3D 3d cache ccd is actually 5.1ghz. the 5.6ghz is only for your non-3D ccd.
 
From steam discussions about unity based games

gc-max-time-slice=3 higher numbers can cause stutter on garbage collector, 3 is tradeoff
job-worker-count= should be set to maximum number of threads
single-instance=1 doesn't really optimize anything, it just won't start new instance but switch to existing
With job-worker count, should it be total number of threads on my machine, number of threads assigned to Vam or number of threads assigned to Vam minus engine affinity?
 
  • My FPS is unstable. When my FPS is low, I can restore it by pressing win. This discovery may help you
  • 13700k 4080
 
@turtlebackgoofy :

Really stoopid question - could you please clarify the numbering of real cores and SMTs on AMD?

Asking bcs I tried to use the EngineAffinity-parameter - RyzenMaster says my best two cores are No 4 and No 2 - so, working on the assumption that odd-numbered cores (1,3,5,7, ...) are the physical cores, while the even-numbered cores (0,2,4,6, ...) are SMT/virtual (?right?), I set EngineAffinity = 3,7, but performance actually got worse (stuttering etc.) even in single-person static scene.

System is Zen 7 5800x, Ry 5700XT, 64Gb@3600Hz.

SkinMeshPartDLL.ini
Code:
[threads]
computeColliders=8
skinmeshPart=8
skinmeshPartMaxPerChar=8
applyMorphs=8
applyMorphMaxPerChar=8
#affinity=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
affinity=1,3,5,7,9,11,13,15
engineAffinity=3,7

[threadsVR]
computeColliders=8
skinmeshPart=8
skinmeshPartMaxPerChar=8
applyMorphs=8
applyMorphMaxPerChar=8
affinity=1,3,5,7,9,11,13,15
engineAffinity=3,7
[profiler]
enabled=0

boot.config:
wait-for-native-debugger=0
gfx-enable-gfx-jobs=1
gfx-enable-native-gfx-jobs=1
 
Last edited:
@turtlebackgoofy :

Really stoopid question - could you please clarify the numbering of real cores and SMTs on AMD?

Asking bcs I tried to use the EngineAffinity-parameter - RyzenMaster says my best two cores are No 4 and No 2 - so, working on the assumption that odd-numbered cores (1,3,5,7, ...) are the physical cores, while the even-numbered cores (0,2,4,6, ...) are SMT/virtual (?right?), I set EngineAffinity = 3,7, but performance actually got worse (stuttering etc.) even in single-person static scene.

System is Zen 7 5800x, Ry 5700XT, 64Gb@3600Hz.

SkinMeshPartDLL.ini
Code:
[threads]
computeColliders=8
skinmeshPart=8
skinmeshPartMaxPerChar=8
applyMorphs=8
applyMorphMaxPerChar=8
#affinity=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
affinity=1,3,5,7,9,11,13,15
engineAffinity=3,7

[threadsVR]
computeColliders=8
skinmeshPart=8
skinmeshPartMaxPerChar=8
applyMorphs=8
applyMorphMaxPerChar=8
affinity=1,3,5,7,9,11,13,15
engineAffinity=3,7
[profiler]
enabled=0

boot.config:
wait-for-native-debugger=0
gfx-enable-gfx-jobs=1
gfx-enable-native-gfx-jobs=1
Cores in Ryzen Master for 5800x
Index 1 [C1]
Index 2 [not named SMT core]
Index 3 [C2] <- fastest
Index 4 [not named SMT core]
Index 5 [C3]
Index 6 [not named SMT core]
Index 7 [C4] <- fastest
Index 8 [not named SMT core]
Index 9 [C5]
Index 10 [not named SMT core]
Index 11 [C6]
Index 12 [not named SMT core]
Index 13 [C7]
Index 14 [not named SMT core]
Index 15 [C8]
Index 16 [not named SMT core]

So your settings are correct, you need 3 and 7 for engineAffinity, but you need to reduce everything else from 8 to 6 because you dont want to overprovision your 6 cores with 8 threads.
 
Really great performance patch. I don't know what benchmark everyone is using, I just used the basic CPU High Physics Benchmark.bat which already was hitting the 200 fps range, so did not expect much. But after the patch, I was hitting 280 fps. sweet
I just copied the settings for 5800X3D.
 
How would I know which 2 cores are fastest for my 13700k? Also I copied and pasted the settings for my 13700k for vr and I lose fps at said settings. I turned everything down to half and got more but u don’t know which setting is causing the lose in preformance/fps gain.

On version 12 cuz 13 crashes



computeColliders=8

skinmeshPart=8

applyMorphs=8

skinmeshPartMaxPerChar=8

applyMorphMaxPerChar=8

affinity=1,3,5,7,9,11,13,15
 
If it helps somebody, I got good results with v13 and my 5900x with these configs:
Code:
[threads]
computeColliders=4
skinmeshPart=4
skinmeshPartMaxPerChar=4
applyMorphs=4
applyMorphMaxPerChar=4
affinity=1,3,5,7,9,11
engineAffinity=1,7
No clue if the fastest cores change between different 5900x CPUs. As suggested, use Ryzen Master to find out.
 
How would I know which 2 cores are fastest for my 13700k?
Get Intel's free Extreme Tuning Utility. Once running, go to the left panel and find the Advanced Tuning tab. Click on that to show that page, and then scroll down to the "Performance Per=Core Tuning" section. You'll see a table of P-Cores. The two best cores will have stars next to the core number.

Speaking of which ...

@turtlebackgoofy: In my 14700K, my two best P-Cores are numbered 4 and 5 by Intel. But since their numbering starts at 0, and because I have HT on, is the following correct for me?

engineAffinity = 9,11

Thanks
 
Get Intel's free Extreme Tuning Utility. Once running, go to the left panel and find the Advanced Tuning tab. Click on that to show that page, and then scroll down to the "Performance Per=Core Tuning" section. You'll see a table of P-Cores. The two best cores will have stars next to the core number.

Speaking of which ...

@turtlebackgoofy: In my 14700K, my two best P-Cores are numbered 4 and 5 by Intel. But since their numbering starts at 0, and because I have HT on, is the following correct for me?

engineAffinity = 9,11

Thanks
Cores
Index 1 [C0]
Index 2 [not named HT core]
Index 3 [C1]
Index 4 [not named HTcore]
Index 5 [C2]
Index 6 [not named HTcore]
Index 7 [C3]
Index 8 [not named HTcore]
Index 9 [C4]<- fastest
Index 10 [not named HTcore]
Index 11 [C5]<- fastest

yes correct
 
Cores
Index 1 [C0]
Index 2 [not named HT core]
Index 3 [C1]
Index 4 [not named HTcore]
Index 5 [C2]
Index 6 [not named HTcore]
Index 7 [C3]
Index 8 [not named HTcore]
Index 9 [C4]<- fastest
Index 10 [not named HTcore]
Index 11 [C5]<- fastest

yes correct
Thanks!!
 
@turtlebackgoofy , do you think it would be worth it to add some kind of "MoreThanOneCharacterAffinity" variable? For example, on my 5900x I have 12 cores, and only 6 are on the "affinity" variable, leaving 6 cores idle all the time. Perhaps on scenes with many characters, it would be faster to assign the threads of the extra characters to the slower, idle cores (not included on "affinity"), than to overburden the faster cores, especially on scenes with more than 2 characters?
 
@turtlebackgoofy , do you think it would be worth it to add some kind of "MoreThanOneCharacterAffinity" variable? For example, on my 5900x I have 12 cores, and only 6 are on the "affinity" variable, leaving 6 cores idle all the time. Perhaps on scenes with many characters, it would be faster to assign the threads of the extra characters to the slower, idle cores (not included on "affinity"), than to overburden the faster cores, especially on scenes with more than 2 characters?
no, all cores that do work in vam need to use the same CCD to make use of the shared cpu cache. Once a single core works outside of the CCD, performance degrades significantly
 
Cores
Index 1 [C0]
Index 2 [not named HT core]
Index 3 [C1]
Index 4 [not named HTcore]
Index 5 [C2]
Index 6 [not named HTcore]
Index 7 [C3]
Index 8 [not named HTcore]
Index 9 [C4]<- fastest
Index 10 [not named HTcore]
Index 11 [C5]<- fastest

yes correct
my 13700k says 4 and 5 are the fastest also. so would mine also be 9 and 11 or something else. i dont understand how to convert intels numbering to the affinity

also on another note i switched to 13b for and tweaked some settings. it runs REALLY well now in vr but only in 1-2 people scenes. 3 person scenes preform terribly now.

computeColliders=4
skinmeshPart=2
skinmeshPartMaxPerChar=4
applyMorphs=2
applyMorphMaxPerChar=2
affinity=1,3,5,7,9,11,13,15
 
With job-worker count, should it be total number of threads on my machine
It's Unity settings, not connected with patch. I believe it should total number of threads.

I've also noticed that PostMagic breaks VAM if those Unity settings are applied:
wait-for-native-debugger=0
gfx-enable-gfx-jobs=1
gfx-enable-native-gfx-jobs=1
Used this plugin as a session plugin for TAA, it breaks VAM after few scenes loading. Without plugin everything is fine.
 
I am reporting the benchmark results for my rig:

17-14700K - undervolted, not OC
64GB DDR5 (2x32GB PC5 48000) - no mod
Gigabyte 4080 - no mod
SteamVR with HTC Vive (the OG Vive, not the Pro etc)

I used the following .ini parameters for BOTH threads AND threadsVR:

computeColliders=16
skinmeshPart=16
skinmeshPartMaxPerChar=16
applyMorphs=16
applyMorphMaxPerChar=16
affinity=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
engineAffinity=9,11

Note that the engineAffinity is specific to my CPU whose fastest cores are 4 and 5. Your 14700K CPU "may or may not" be different. (I did NOT disable hyperthreading).

Here are the two Base results

for desktop:
Benchmark-20240303-235620 Base.png


and VR:
Benchmark-20240304-001901 Base VR.png



The following are the results after applying the Performance Patch:

desktop:
Benchmark-20240304-003417 Perf.png


VR:
Benchmark-20240304-005259 Perf VR.png


Interesting that in DT mode, the gain in peak performance is huge, but the average FPS gained was moderate. In VR, there was little difference.

I am still re-reading Sir Turtle's various treatises on how FPS in VR works. Since as you can see, my results dips below 90FPS a lot, the result is that I am constantly seeing 45FPS in VR. I want to better understand what to do next if anything.

In conclusion, mucho mucho gracias to Sir TurtleBackGoofy, a true scholar and a gentleman. My rest of the day is occupied, so I'll come back to this very interesting thread later.
 
I am reporting the benchmark results for my rig:

17-14700K - undervolted, not OC
64GB DDR5 (2x32GB PC5 48000) - no mod
Gigabyte 4080 - no mod
SteamVR with HTC Vive (the OG Vive, not the Pro etc)

I used the following .ini parameters for BOTH threads AND threadsVR:

computeColliders=16
skinmeshPart=16
skinmeshPartMaxPerChar=16
applyMorphs=16
applyMorphMaxPerChar=16
affinity=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
engineAffinity=9,11

Note that the engineAffinity is specific to my CPU whose fastest cores are 4 and 5. Your 14700K CPU "may or may not" be different. (I did NOT disable hyperthreading).

Here are the two Base results

for desktop:
View attachment 341636

and VR:
View attachment 341637


The following are the results after applying the Performance Patch:

desktop:
View attachment 341638

VR:
View attachment 341639

Interesting that in DT mode, the gain in peak performance is huge, but the average FPS gained was moderate. In VR, there was little difference.

I am still re-reading Sir Turtle's various treatises on how FPS in VR works. Since as you can see, my results dips below 90FPS a lot, the result is that I am constantly seeing 45FPS in VR. I want to better understand what to do next if anything.

In conclusion, mucho mucho gracias to Sir TurtleBackGoofy, a true scholar and a gentleman. My rest of the day is occupied, so I'll come back to this very interesting thread later.
disable motion smoothing in VR, so it never gets locked to 45fps.
It also appears your CPU performance was already great, you probably have some very good RAM.
 
It's Unity settings, not connected with patch. I believe it should total number of threads.
Thanks for getting back to me with an answer, Kretos.

I don't mean to contradict your advice but since asking the question I have done some experimenting with the settings and research on Unity threads and have found that using all the threads on your machine (in my case 32) loses a big chunk of fps. For me, using about 2-6 threads seems to work well.

For anyone interested, the line in question is 'job-worker-count=' which goes in the 'boot' config
 
Back
Top Bottom