[Solved - Disable hardware virtualization] Limited by MainThread but not a single core is close to 100%

Hey everyone!

I know that the MainThread limitation and poor multicore CPU optimization is something that pops up every week around here, but my situation seems a bit different.

On all other topics regarding being bottlenecked by the MainThread that I found, people seem to have at least one of their cores at 100%, which makes sense then being limited by MainThread

In my case, I’m limited by the MainThread, but not a single core is at 100%. The main core seems to hit only around 75%, so I’d still have some juice to extract from the CPU until being actually being limited by it.

Here’s an image of the situation:

Does anyone have any tips on how to at least get 1 core to hit 100%? I think I could get my CPU frametime from 25ms to around 20ms if at least one of the cores would hit 100% (which would mean a 10fps increase, as my GPU time is still in the 16ms range and not close to bottlenecking the system, even with most settings on Ultra).

I’ve tried Process Lasso tricks (dynamic thread priority boost disable), disable SMT, increase process priority, etc… nothing made a difference.

My system is a Ryzen 5 2600X @ 4.1Ghz, RTX 2070, 16GB @ 3533Mhz.

Thank you!

Maybe more ram would help this sim will use over 20 in very dense cities maybe the cpu has to wait longer for data to be brought over from your storage device because only have 16gb of ram and looks like your almost maxing that 16gb.

1 Like

I never and will never understand why someone want CPU cores to hit 100% utilization in a video game.
Other than that. CPU optimization is an ongoing process and will change over the next updates in one way or another.

1 Like

What is your GPU usage when in flight is that one in task manager correct as it reads wrong for me. I think if the GPU doesn’t need more from the CPU it will probably reduce the CPU usage also. Could see if turning graphics settings up changes anything.
Aim should always be to make the gpu the bottleneck.

You wouldn’t want to max the cores out that would surely lead to stutters.

Huh? It means I’m using all the performance I can get. In games, that means higher FPS (as long as you are not limited by the GPU), in video encoding, it means less rendering time, etc…

You don’t need 100% on regular Windows tasks (they can’t even saturate the core), but you do want it when dealing with performance tasks. From a performance standpoint (not considering power consumption), there is no reason why not to use 100% of your CPU when you need speed (compressing data, encoding video, gaming, number crunching, etc…)

2 Likes

Thanks for the replies.

The GPU usage is correct.
It is around 65% and I’m already on Ultra on everything. I guess it’s low because of the MainThread limit on the CPU (as the GPU doesn’t have to work that hard since the CPU is holding everything up anyway)

The only thing that I can increase are the LODs, which makes the CPU frametime even higher (doesn’t change anything on GPU frametime). I’m trying to make the CPU/GPU frametimes closer or even bottleneck the GPU, but I’m already maxed on the graphics.

1 Like

Yeah, it is pretty odd until you realize that clearly none of them know anything about complex games programming. As if it will ever be desirable or possible to balance near 100% CPU with 100% GPS on a PC, ever.

I think many flight sim people like to play with hardware more than just play the game. I know I had to play with hardware all the time in FSX/X-Plane. It is one of the reasons I love MSFS, it looks amazing and plays infinitely better without ever having to touch a thing.

2 Likes

Although it’s hard to balance GPU and CPU, it is perfectly possible to at least saturate some cores to extract the most performance. Take a look at Doom Eternal, it’s beautifully balanced core-wise with almost all of them maxing out. Oh, and it runs smoothly as well, with texture streaming from high latency IO and no stutters.

The argument that you don’t saturate the CPU because you’d get stutters for example is nonsense. You don’t underuse your CPU because you might stutter. The CPU doesn’t stutter. Higher latency I/O causes stuttering and no “CPU usage buffer” would fix that (the CPU going from 75% to 100% won’t make your SSD to RAM or RAM to CPU data exchange any faster), so it doesn’t make sense to penalize your CPU processing power for that.

2 Likes

I think my CPU utilization in Doom Eternal is something like 30%. Duno never cared… all i know is that my GPU is at 100% thats all thats important in Video Games
In Video Games, If my CPU Utilization is higher than my GPU than im doing something wrong or the Game is not good optimized. Best case for me would be all CPU cores evenly used also the logical ones and lower than my GPU, since i want my GPU always at 100%. Easy to get in 4K Gaming.

That’s the problem. Take a look at the picture I’ve posted. I’m already maxed out on graphics, there’s nothing more to do to increase my GPU usage and get it closer to 100%. It’s running on 70% exactly because my CPU is holding it down (idle time while the CPU gets done with its tasks on the game loop)

I’m aware that I’ll ever be CPU bound (my GPU is quite higher end than my CPU), but I’m just searching for at a way to at least use 100% of one of my cores instead of only 75%, so I can drop my CPU frametime (currently 25ms) to at least get it a bit closer to my GPU frametime (16ms and already maxed out).

I see. Well im not a programmer so i cant tell what it comes down to other than speculating.
I got a good fps increase from upgrading my old i7 to an i10 (intel). Since im at 4K i dont see GPU usage drops. Its constantly at over 95%. Have you experimented with deactivating CPU cores (physical and logical). Maybe your Ram is holding it back due to memory starvation.
Like i already mentioned CPU usage optimization is work in progress and i dont know in what direction it goes and It might also be that some CPUs just utilize different across AMD/Intel and in their generations of Models.

1 Like

Good news!

I was comparing my setup against a friend’s one with a very similar system (but he was getting much better CPU frametimes) and the only thing different was he had virtualization turned off.

Guess what? I disabled SVM in BIOS and I’m now getting much better core utilization. That main core is now on 90% instead of 70, 75%. My CPU frametime dropped from 24ms to 17ms (paired with my GPU’s) and the FPS increased from 38 to 52 around the same spot.

Here’s a new screenshot, more or less on the same place, time and weather. I haven’t changed anything on FS settings between the first screenshot and this one:

Pretty happy with the result and I leave that as a suggestion for people struggling with CPU limits. Try disabling virtualization on the BIOS (SVM/AMD-V for AMD and VT-x for Intel) and see if it makes a difference. Solved for me.

16 Likes

Wow, seriously? I might have a go, but I do use it from time to time.
Did you have Hyper-V enabled also (which may well impact performance)?

2 Likes

I wonder how many other have it enabled Just checked mine and had already disabled it.

1 Like

Give it a try. Honestly, I haven’t changed anything else except for that single option in the BIOS. I don’t have a clue why it had such an impact either.

And regarding your second question, yes, I still have Hyper-V installed and enabled on W10 as I use WSL2 quite a bit. I only disabled the hardware virtualization (VSM for AMD, VT-x for Intel). Just be aware that disabling hardware virtualization will probably have quite an impact on your VMs if you do some heavy work on them, but in my case I use it more to run a Debian shell on Windows, so it doesn’t make that much of a difference.

I tried it, and it did help a bit, though I only did one run each so I’m not sure how big the variance is.
45.3 fps average before, 50 after. 1% percentile 31.8 vs 28.8. So there’s an improvement.
MainThread limited 98% of the time in both cases. A320 (stock), no traffic/MP.

However, my Hyper-V VM can’t start and WSL2 doesn’t work either:

Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
For information please visit Install WSL | Microsoft Learn
[process exited with code 4294967295]

I’m not surprised, but are you saying your WSL2 VM works?

1 Like

Sorry, my mistake. I thought I was on WSL2 but I’m still on WSL1, which doesn’t seem to require hardware virtualization.

Nevertheless, I’m glad that disabling it also (sort of) worked for you too. More than 10% fps increase, good stuff tbh! It also means that it’s not something specific to my system and more people might benefit from this tweak.

Thanks for sharing your experience.

Thanks but no thanks. :smiley:

Well it wont work for me obviously (4K) but im happy it worked out for you.

1 Like

I think it’s not VT itself giving you the gain, but something on your computer that was using VT and now gets disabled along with VT.

I tried and doesn’t see any different. I don’t enable Hyper-V or WSL2 on the PCs.

1 Like