Main Thread is Being Hammered

:wave: Thank you using the Bug section, using templates provided will greatly help the team reproducing the issue and ease the process of fixing it.

Are you using Developer Mode or made changes in it?

Only occasionally used to confirm Main thread use and FPS

Brief description of the issue:

Main Thread seems to be overworked on my system compared to SU8

Provide Screenshot(s)/video(s) of the issue encountered:

Detailed steps to reproduce the issue encountered:

Configure LOD, photogrammetry, airport proximity, and other CPU heavy settings that seem to tax the main thread and see if it isn’t taxed more than before. This causes more stutters and makes it very hard to optimize my system. It is very hard right now to find a working configuration.

PC specs and/or peripheral set up if relevant:


:loudspeaker: For anyone who wants to contribute on this issue, Click on the button below to use this template:

Do you have the same issue if you follow the OP’s steps to reproduce it?

Provide extra information to complete the original description of the issue:

If relevant, provide additional screenshots/video:

I’m having a few issues. The first being that during startup no sound plays on the Asobo logo or black shark AI logo. The next one is once I get in flight the lnav function doesn’t work. The autopilot WILL NOT follow the nav points like its supposed to before I updated. Is there a fix coming out soon for this?

1 Like

Unfortunately I rarely fly in dev mode so I don’t yet have a good indication of whether or not things are any worse by looking at the MainThread graph. I do know that I get some terrible performance at airports in photogrammetry cities when my TLOD is over 100. Part of the problem is that I’ve disabled CPU boost to keep my laptop temperatures down. (I’m not comfortable with my laptop temps getting over 75C.) Still though, even with CPU boosting disabled, I don’t see efficient CPU usage. Maximum 50% usage (aggregate) across all 16 threads (usually much lower than that on average), and maybe 75 or 80% usage single thread max (possibly higher spikes on occasion, more testing is needed on my part).

1 Like

I only use Dev Mode when optimizing because usually I like my flights to be logged and I prefer not worrying about FPS at all times.

But it is a useful tool for laptop optimization.

And I fear that Main Thread is not as efficient right now in this beta build as it is in SU8… which is terrible for laptops because they don’t have the raw clock speed of a desktop.

2 Likes

My laptop has a Ryzen 7 CPU and I can’t recall ever having one thread getting pegged at 100%, even with CPU boost disabled. My guess is that Windows is spreading the work out among other CPU cores/threads.

At least with this new build, it does spread more evenly across cores to my eyes.

But I don’t think the Main Thread is a core exactly. It instead, is all the computations that have to be performed in order for each frame to render across all cores. And sometimes a core might have to wait for another to finish its work before it can build upon that data and keep the sim running in a linear way. And I think the main thread is more of a bottleneck in this beta build than it was before. At least on my laptop. You can see if your GPU or your CPU Main Thread are the major bottleneck in Dev Mode.

1 Like

I’m pretty familiar with the HWiNFO program which can record min/max/average CPU usage readings for each core. I use Process Hacker for CPU core usage graphs. I’ll do some tests this evening and see what I can come up with.

2 Likes

Might be worthwhile but I am not sure it will detect any Main Thread issues unless a single core is hitting 100%, and so far in my investigation, that is not happening in this beta.

Thank you for looking into this!

1 Like

Yeah it might be hard to spot an issue since I don’t have prior data to go on other than my own recollection of how earlier builds behaved in the graphs.

Here’s my CPU load distribution flying over KSFO airport for a minute. MainThread was being hammered bigtime according to dev mode graph.

msfs-hwinfo-ksfo

3 Likes

I am working with limited data at this point so thank you.

That is similar to what I see on my system through my system monitors, so my Main thread is moving slowly (seemingly slower than SU8) in spite of the CPU cores all having head space at all times.

1 Like

My Core 0 Thread 0 usage always seems to be the highest affected. I would guess that is some partial insight into MainThread performance. Usage spiked at 91% but had an average of 77%. Total CPU usage spiked at 38% with an average of 28%. Such low CPU usage, even with CPU boost disabled!

Edit - added Process Hacker graphs to last post, showing a visual representation of the HWiNFO data. I’m going to try steering interrupts to processor 1 and some other tweaks to see if it makes any difference.

1 Like

A slight difference in load distribution when I made some tweaks such as steering interrupts to core 1 (instead of 0), enabling HAGS, and resetting Windows system clock timers back to default.

You can see Core 0 Thread 0 usage is even lower now (top left). Max 82% average 69%

MainThread still being hammered though.

Edit - changed “Processor performance core parking min cores” down to 25% from 100%. Even less CPU usage now. Look at Core 0 T0 (top left) and the last 4 threads (bottom row).

So many things in Windows can affect CPU usage. I could go on all day, but none of it is going to fix the problem.

3 Likes

Do you have the same issue if you follow the OP’s steps to reproduce it?

Absolutely

Provide extra information to complete the original description of the issue:

For a given scenario my computer seems to be working harder for the same settings. All I have is anecdotal evidence, but the CPU is running hotter and is boosting to it’s absolute max clock speed (4.95mhz) much more regularly than it was under SU8. I’m also seeing stutters in general GA flying which were unheard of in SU8. The CPU is a Ryzen 5900x. I tried DX12 and it was pretty much unplayable compared to DX11.

If relevant, provide additional screenshots/video:

2 Likes

When I was flying over KSFO airport at about 500 ft there was a lot of stuff going on such as many airliners at the gates, live air traffic, etc. Plus I think that is a photogrammetry area. It was playable, but my settings were obviously too high since I was clearly MainThread limited even with low CPU usage.

1 Like

It has been interesting testing this beta.

While that Main Thread does seem to be impacted more at low graphics settings, it seems I can turn the details up with less impact on performance than before.

And I have been able to bump my TLOD up a little, along with my render scaling to get similar (albeit slower) performance than before.

All in all, after a second day of testing, performance does seem to be impacted by SU9, but it isn’t all bad.

And when I turn Dev Mode off, I don’t much notice the difference in framerate but I do notice the improved fidelity.

Wish I knew more about how the Main Thread worked.

And I do suspect a lot of folks will need to recalibrate their graphics after the next update to keep smooth performance on their machines.

1 Like

I have been carefully reading all your forum posts as you seem like an advanced user to me. However if I can help with the information, I have manually selected all the settings as little as possible. And guagueira occurs in the same way, it depends a lot on what it loads and what the processors receive as a load. So, I imagine that it is not very connected to graphics but to processes.

2 Likes

The connection to graphics is weird. We cannot adjust processes, they’ll just always tax the CPU, but we can adjust a few graphics settings to reduce that CPU load on top of the regular processing since the CPU also has to handle traffic behavior and flight model and whatnot at all times, too.

The better CPU allocation that I and others are seeing in this beta brings me hope. Now that all cores are sharing the workload better, I think there is room to optimize the Main Thread for better multi core efficiency.

At this point in the beta, I have not yet seen anyone hit 100% on any single core, no matter how high their settings.

So we are all still Main Thread limited, but we all still have headroom on all of our CPU cores. If that makes sense.

1 Like

and I say more, there is something that makes the processor suffer and is related to the reproduction of some sounds in the simulator. Since the SU8 they have implemented in the TAG SOUND the option of being able to choose the MAIN DEVICE OUTPUT and the same for the COMMUNICATION.

I shot the video below atat the launch of the SU8 beta and see what happens when the arenave hits the ground… with each tap it tries to play a sound and ends up stuttering. I apologize for the video I recorded it from my cell phone and had to turn off the ambient sound, but the white circle on the lower right side shows that we have excessive process running on every tap.

I think it’s worth appreciating something in this sense, don’t you?

1 Like

Ok, those videos really helped me.

There are a LOT of people with your issue and it does seem to overlap with this thread’s issues in some weird ways.

It looks like every time MSFS registers flight and a landing, it saves the flight time to your logbook (white circle). But some of these, “Flights” are just bounces, and are more a continuation of the prior flight, or a bumpy landing… and I don’t know if we need those micro flights logged.

That possibly interrupts other CPU processes, it prioritizes saving to your logbook mid-landing, and causes a stutter (when the game stops or sound stops… basically whenever time stops in sim, that seems to point to a Main Thread issue).

So, something in the saving process seems to interrupt all the other processing that needs to take place during landing, and landing is already the most dangerous part of flying WITHOUT those stutters.

Thanks for the videos. I am finally beginning to see a possible connection between that dastardly white circle and the notorious airport Main Thread limited stutter.

1 Like