• Hi Guest!

    Please be aware that we have released another critical security patch for VaM. We strongly recommend updating to version 1.22.0.12 using the VaM_Updater found in your installation folder.

    Details about the security patch can be found here.
CPU Performance Patch (Up to 30% faster physics, up to 60% more FPS)

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

I was also getting the 'too many heap sections' error months ago with 13beta1. I have since been picking apart the installs in order to do this update. I was surprised not to run into that error again. One difference between now and then is that I am using BA to reduce the number of vars loaded at one time (~2.5k vs >5k). I haven't found any technical evidence for that, just a suspicion. Another difference that I noticed in attaching the Unity debugger to VaM is that 1.22.0.3 included a resource file that was built with one patch version prior to 2018.1.9f2. In development mode that will cause the game not to open. Might've been unrelated, not sure. If I run into it again I can put the debugger on it and look.

I will be looking closer at the memory and GC anyway to integrate it with some bigger things I'm working on for VaM. Might learn something.
 
Been using the patch for over a year now, but i stick to v12 - for better performance gains.
During this time, I had 'Heap error' just once.
Funny thing, it happened on my 'vanilla' install, when i loaded like 20 timeline scenes in row to export mocap animations.
My ~ 8k vars install never showed that error. But i'm mostly play my own single scene, very sporadically like 1-3 scenes max in row from other people.
 
Reverting back to V12evo myself. I've started to get the "too many heap sections" error on 13beta1evo.

...though, it's worth noting that I probably have some other issue with my rig that I've been unable to fix. Worked closely with turtlebackgoofy over a couple of days in 2024 to try figure out why (even on fresh VaM installs; my prime one is quite bloated despite pruning attempts) I had certain frametime hang ups, but he couldn't figure it out. I'm on a 13900k/4090/32gb RAM setup.
 
I have the 7900X3D im not sure what cpu profile to use. I tried the AMD Ryzen 7950x(3d) settings but my task manager says its only using 23% of the cpu. It didnt look like the cores in the first page instructions.

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

[threadsVR]
computeColliders=8
skinmeshPart=8
applyMorphs=8
skinmeshPartMaxPerChar=8
applyMorphMaxPerChar=8
affinity=1,3,5,7,9,11,13,15
engineAffinity=1,3
[profiler]
enabled=0
 
Last edited:
@Battletoad08
The 12 (and 16) core AMD-CPUs are tricky.
TLDR:
You very likely just want to run it with the default 8 core CPU configuration to force VAM to use only 3DV-cache cores.
When looking into Task Manager it's more important to check which logical cores are used, instead the overall utilization. I think this is, what you looked at.
Imho Task Manager is bad. I don't even know for sure what the second logical core is in the user interface. It does not show.
I think the first row is:
[Core 1 Thread 1][Core 1 Thread 2][Core 2 Thread 1][Core 2 Thread 2][Core 3 Thread 1]...
Assuming you actually max out the CPU (GPU does not limit? Vsync off?) with this patch it should show a higher utilization on every second logical core.
There are many factors involved. A scene with only 2 persons would possibly not even create enough threads for that. More Person-atoms with physics, more threads.

The long theory ... assuming the guide info on overview-page is correct:
The AMD Ryzen 9 7900X3D has 12 cores and 24 threads.
Each core can run two threads at the same time with SMT (Simultaneous multithreading, equivalent to Intel's HT = Hyper-threading).
You could try (I doubt it's better and it would waste your time) to benchmark a config with all 8 set to 12 threads and affinity=1,3,5,7,9,11,13,15,17,19,21,23 in an attempt to use 12 cores without SMT. Then compare the benchmark result with the default 8 core config.

It's critical to look at logical cores in Task Manager via right click menu:
Task Manager CPU performance logical cores_c16.png

Each core has two graphs if the CPU has SMT or HT enabled. In the screenshot: 8 core CPU * 2 threads per core = 16 graphs.
The affinity should effectively disable SMT or HT for the VAM process. Then it's impossible to have above 50% utilization from VAM only.
Windows assumes 100% utilization is when every logical core is used 100%.
For a deep dive into how affinity masks work under the hood of Windows: SetProcessAffinityMask().

Chips on Ryzen 12 or 16 core CPUs:
Code:
    [IOD]
     | |
[CCX1] [CCX2]
purple = physical chip

First 8 cores and 16 threads are on one CCX1 (a physical chip) with stacked 3DV-cache. We want that cache to be used!
Next 4 cores and 8 threads are on CCX2. Has no 3DV-cache, but runs at higher frequency.
Third chip on the CPU is the IO die (or IOD). It connects CCX1 and CCX2 and provides 'connections' for PCI Express, USB, memory controller...

So the default 8 core config will ignore the "last" 4 cores on CCX2 and run the CPU as if it would be a 8 core only.

But why would disabling the last 4 of 12 cores with a affinity=1,3,5,7,9,11,13,15 not cost performance?
1. The 3DV-cache seems to be more important than a higher frequency cores in practice. The nearby large 3DV-cache keeps the working cores fed with data resulting in more instructions per clock cycle (IPC). Always have data to execute -> no wait times.
2. VAM simply may not need that more threads to gain more performance. The IPCs on a single thread are more important than the ability to run more threads in parallel.
3. If all 12 cores are enabled, it's possible the Windows-scheduler for the running CPU-threads decides to move a physics thread from CCX1 to CCX2. Meanwhile VAM's main-thread could still be running on CCX1. That would mean a *much* higher latency to transfer data between these threads. Instead of having the data in the cache of CCX1 for both threads running on it - the data would have to be transferred like this: CCX1 -> IOD -> CCX2 -> IOD -> CCX1. This latency increase for a data transfer between threads make AMDs multi CCX-CPUs slower in some scenarios. It's the reason why the 9800X3D is currently the perfect gaming CPU. It only has CCX1 and the IOD. This CPU cannot have this latency problem. It has the most cores per CCX possible and a huge cache. (In case a current- or old-generation <=8 core AMD-CPU has a CCX2, it's a dead dummy chip for manufacturing reasons).

... 12 cores per CCX.
So a 12 core "10800X3D" could be the successor of the popular 8 core 9800X3D.
 
Last edited:
@Kerke50
This can happen with VAM installations and to much content installed.
Related thread: Too many heap sections

If it happens at start, try this:
1. Close VAM
2. Temporary rename your <VAM>\AddonPackages folder to something different like DISABLED_AddonPackages
3. Does VAM now start normal? (except without all content of course) --> To much content installed.
Still gives error? -> Possible problem with performance patch.
4. Restore <VAM>\AddonPackages folder name
 
Always too many heap sections...6750xt 5600x 64g
It does make sense that this error is correlated with v13 because part of the performance improvements and reduction of stutters are around controlling the garbage collection.

What is still unknown is why is occurs for some and not for others

Give v12evo a try and let us know if it makes a difference. Would still recommend doing a core repair/sync with the updater and then copying the patch files from v12
 
It does make sense that this error is correlated with v13 because part of the performance improvements and reduction of stutters are around controlling the garbage collection.

What is still unknown is why is occurs for some and not for others

Give v12evo a try and let us know if it makes a difference. Would still recommend doing a core repair/sync with the updater and then copying the patch files from v12
This may be a dumb question, but how can i get my hands on V12evo? Click "download" only gives me V13beta1, and looking in the "updates" tab, I don't clearly see any specific download button listed next to Evo12's changelog....

Either the hub is removing features once again, or am I simply blind?

Edit*

NVM, it's listed under the "history" tab.
I guess im blind. counterintuitive though.


Edit2*

After testing out evo V12, It kept crashing my VaM to desktop when opening certain heavy scenes, it never did this before with V13beta1 or V13beta1 evo.

I'll stick to V13 for now and the forseeable future.
 
Last edited:
I have the 7900X3D im not sure what cpu profile to use. I tried the AMD Ryzen 7950x(3d) settings but my task manager says its only using 23% of the cpu. It didnt look like the cores in the first page instructions.

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

[threadsVR]
computeColliders=8
skinmeshPart=8
applyMorphs=8
skinmeshPartMaxPerChar=8
applyMorphMaxPerChar=8
affinity=1,3,5,7,9,11,13,15
engineAffinity=1,3
[profiler]
enabled=0
You only have 6 gaming cores. use 6 instead of 8. affinity 1,-11
 
@Battletoad08
The 12 (and 16) core AMD-CPUs are tricky.
TLDR:
You very likely just want to run it with the default 8 core CPU configuration to force VAM to use only 3DV-cache cores.
When looking into Task Manager it's more important to check which logical cores are used, instead the overall utilization. I think this is, what you looked at.
Imho Task Manager is bad. I don't even know for sure what the second logical core is in the user interface. It does not show.
I think the first row is:
[Core 1 Thread 1][Core 1 Thread 2][Core 2 Thread 1][Core 2 Thread 2][Core 3 Thread 1]...
Assuming you actually max out the CPU (GPU does not limit? Vsync off?) with this patch it should show a higher utilization on every second logical core.
There are many factors involved. A scene with only 2 persons would possibly not even create enough threads for that. More Person-atoms with physics, more threads.

The long theory ... assuming the guide info on overview-page is correct:
The AMD Ryzen 9 7900X3D has 12 cores and 24 threads.
Each core can run two threads at the same time with SMT (Simultaneous multithreading, equivalent to Intel's HT = Hyper-threading).
You could try (I doubt it's better and it would waste your time) to benchmark a config with all 8 set to 12 threads and affinity=1,3,5,7,9,11,13,15,17,19,21,23 in an attempt to use 12 cores without SMT. Then compare the benchmark result with the default 8 core config.

It's critical to look at logical cores in Task Manager via right click menu:
View attachment 465969
Each core has two graphs if the CPU has SMT or HT enabled. In the screenshot: 8 core CPU * 2 threads per core = 16 graphs.
The affinity should effectively disable SMT or HT for the VAM process. Then it's impossible to have above 50% utilization from VAM only.
Windows assumes 100% utilization is when every logical core is used 100%.
For a deep dive into how affinity masks work under the hood of Windows: SetProcessAffinityMask().

Chips on Ryzen 12 or 16 core CPUs:
Code:
    [IOD]
     | |
[CCX1] [CCX2]
purple = physical chip

First 8 cores and 16 threads are on one CCX1 (a physical chip) with stacked 3DV-cache. We want that cache to be used!
Next 4 cores and 8 threads are on CCX2. Has no 3DV-cache, but runs at higher frequency.
Third chip on the CPU is the IO die (or IOD). It connects CCX1 and CCX2 and provides 'connections' for PCI Express, USB, memory controller...

So the default 8 core config will ignore the "last" 4 cores on CCX2 and run the CPU as if it would be a 8 core only.

But why would disabling the last 4 of 12 cores with a affinity=1,3,5,7,9,11,13,15 not cost performance?
1. The 3DV-cache seems to be more important than a higher frequency cores in practice. The nearby large 3DV-cache keeps the working cores fed with data resulting in more instructions per clock cycle (IPC). Always have data to execute -> no wait times.
2. VAM simply may not need that more threads to gain more performance. The IPCs on a single thread are more important than the ability to run more threads in parallel.
3. If all 12 cores are enabled, it's possible the Windows-scheduler for the running CPU-threads decides to move a physics thread from CCX1 to CCX2. Meanwhile VAM's main-thread could still be running on CCX1. That would mean a *much* higher latency to transfer data between these threads. Instead of having the data in the cache of CCX1 for both threads running on it - the data would have to be transferred like this: CCX1 -> IOD -> CCX2 -> IOD -> CCX1. This latency increase for a data transfer between threads make AMDs multi CCX-CPUs slower in some scenarios. It's the reason why the 9800X3D is currently the perfect gaming CPU. It only has CCX1 and the IOD. This CPU cannot have this latency problem. It has the most cores per CCX possible and a huge cache. (In case a current- or old-generation <=8 core AMD-CPU has a CCX2, it's a dead dummy chip for manufacturing reasons).

... 12 cores per CCX.
So a 12 core "10800X3D" could be the successor of the popular 8 core 9800X3D.
Are you trying to kill me? lol. Ill have to study this.
 
I rolled back to v12 after trying v13 and getting constant heap errors. Seems to be stable now.

Win 11
14900K
64GB RAM
RTX3080 10GB
 
To make things more confusing...
Microsoft plans to change how Task Manager calculates and displays CPU utilization in Windows 11.
We are beginning to roll out a change to the way Task Manager calculates CPU utilization for the Processes, Performance, and Users pages. Task Manager will now use the standard metrics to display CPU workload consistently across all pages and aligning with industry standards and third-party tools. For backward compatibility, a new optional column called CPU Utility is available (hidden by default) on the Details tab showing the previous CPU value used on the Processes page.
source
 
Can someone tell me whats the best settings for me?

My PC spec:

Ryzen 9 5950x
RTX 2080 TI


[threads]
computeColliders=6
skinmeshPart=6
skinmeshPartMaxPerChar=6
applyMorphs=6
applyMorphMaxPerChar=6
affinity=1,2,3,4,5,6,7,8
engineAffinity=4,5

[threadsVR]
computeColliders=6
skinmeshPart=6
skinmeshPartMaxPerChar=6
applyMorphs=6
applyMorphMaxPerChar=6
affinity=1,2,3,4,5,6,7,8
engineAffinity=4,5
[profiler]
enabled=0
 
Back
Top Bottom