Jump to content
Sign in to follow this  
Boeingnut

Horrible FPS

Recommended Posts

On another note the new Intel 12th gen CPUs have what is dubbed the "Thread Director". This is built into the CPU and it gathers telemetry on the threads running. In Windows 11 this information is used to help the JobScheduler to work out where threads are best run. However, in FSX and P3D certain tasks are set up to do various jobs. For example the first task handles the main program loop and this affects performance. The other tasks are confined to each next Logical Processor. We use the affinity mask to help the JobScheduler know where to avoid placing each next task. In P3D v5.3 we can also set up where we want the three first tasks to be located on the CPU (although some configurations cannot be achieved so we must check for this with Task Manager). This way of programming the simulator (FSX/P3D) means that the Thread Director telemetry data and Windows 11 JobScheduler do not preside over where the tasks reside because we decide that with the affinity settings.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post
2 minutes ago, SteveW said:

As I mentioned that depends on the motherboard and other hardware (which defines the complete system bandwidth) just how many is too many is something you  will have to find. it could be that no amount is too many for that system.

Understood.  There is always a bit of trial and error.

  • Like 1

Share this post


Link to post
1 hour ago, SteveW said:

Using the example for the 8 core / 16 LP CPU in HT mode:

[JobScheduler]
AffinityMask=21845
P3DCoreAffinityMask=21845
MainThreadScheduler=0
RenderThreadScheduler=1
FrameWorkerThreadScheduler=2

Putting 21845 into the DEC field of Windows Calculator in Programmer mode gives the BIN value 101010101010101. Because we are in HT mode we should be using the proper nomenclature so that binary value will look like this: 01,01,01,01,01,01,01,01 showing we are in HT mode with 2 LPs per core. Lining up the binaries we can see more clearly, remember that LP 0 is the right-most digit (core 0 is the right-most two digits):

01,01,01,01,01,01,01,01 = 21845 = AffinityMask
01,01,01,01,01,01,01,01 = 21845 = P3DCoreAffinityMask
00,00,00,00,00,00,00,01 = 0 = MainThreadScheduler
00,00,00,00,00,00,01,00 = 1 = RenderThreadScheduler
00,00,00,00,00,01,00,00 = 2 = FrameWorkerThreadScheduler


Now let's look at a more extreme setup that maximises the use of HyperThreading to collect and assemble new scenery and object data:

11,11,11,11,11,01,01,01 = 65493 = AffinityMask
11,11,11,11,11,01,01,01 = 65493 = P3DCoreAffinityMask
00,00,00,00,00,00,00,01 = 0 = MainThreadScheduler
00,00,00,00,00,00,01,00 = 1 = RenderThreadScheduler
00,00,00,00,00,01,00,00 = 2 = FrameWorkerThreadScheduler
 

We still have three cores with only one LP enabled, the remaining cores have both LPs enabled. This may be too much throughput of the system given to loading scenery and that can reduce the system throughput available to the main task. So we may require less "11," and more "01":

11,11,11,01,01,01,01,01 = 64853 = AffinityMask
11,11,11,01,01,01,01,01 = 64853 = P3DCoreAffinityMask
00,00,00,00,00,00,00,01 = 0 = MainThreadScheduler
00,00,00,00,00,00,01,00 = 1 = RenderThreadScheduler
00,00,00,00,00,01,00,00 = 2 = FrameWorkerThreadScheduler

 

WOW, I just tried your suggestion of using 64853 and never in all the years I have been using P3D was it so smoooooth. I never thought 30fps could feel like that - it was the first time I actually felt like I was flying for real.

Still a very occasional stutter, which unfortunately you notice a lot more because of the overall smoothness, but otherwise the best experience I have ever had in P3D. The aircraft was so much easier to fly accurately, and 

view changes were so much quicker. I never managed to achieve anything like this with HT on in previous versions, so I am guessing changes made in 5.3 may have helped in this regard.

Thank you so much Steve for all your tireless posts and patience with us on this topic. It was certainly worth it in the end for me and I would advise everyone who doesn't use HT to give it another go in 5.3, I'm glad I did 😊

  • Like 4

Share this post


Link to post
23 hours ago, SteveW said:

We could always do that with FSX and P3D versions.

The new features of P3D v5.3 is to enable widening of the affinity mask (AffinityMask=) compared to the cores used (P3DCoreAffinityMask=) to accommodate other processes added in by add-ons, and also to enable placing of the main tasks on LPs we desire (Main, Render and FrameWorker) so that we can direct them onto unshared cores.,

So where do you suggest to leave the addon processes (i.e., ActiveSky, PF3, etc)? In a six-core,12-thread CPU, I start them using a BAT file in which I assign them LP9 and LP11.

  • Like 1

Best regards,
Luis Hernández 20px-Flag_of_Colombia.svg.png20px-Flag_of_Argentina.svg.png

Main rig: self built, AMD Ryzen 5 5600X with PBO enabled (but default settings, CO -15 mV, and SMT ON), 2x16 GB DDR4-3200 RAM, Nvidia RTX3060 Ti 8GB, 256 GB M.2 SSD (OS+apps) + 2x1 TB SATA III SSD (sims) + 1 TB 7200 rpm HDD (storage), Viewsonic VX2458-MHD 1920x1080@120 Hz, Windows 10 Pro. Runing FSX-SE, MSFS and P3D v5.4 (with v4.5 default airports).

Mobile rig: ASUS Zenbook UM425QA (AMD Ryzen 7 5800H APU @3.2 GHz and boost disabled, 1 TB M.2 SSD, 16 GB RAM, Windows 11 Pro). Running FS9 there... sometimes on just battery! FSX-SE also installed, just in case. 

VKB Gladiator NXT Premium Left + GNX THQ as primary controllers. Xbox Series X|S wireless controller as standby/travel.

Share this post


Link to post
1 minute ago, Luis Hernandez said:

So where do you suggest to leave the addon processes (i.e., ActiveSky, PF3, etc)? In a six-core,12-thread CPU, I start them using a BAT file in which I assign them LP9 and LP11.

That's about all you can do with six cores. At least you can be sure that those add-ons are not spilling their processes onto time critical cores.

  • Like 1

Steve Waite: Engineer at codelegend.com

Share this post


Link to post

Then I've understood well your posts here, @SteveW. Thank you very much!

  • Like 1

Best regards,
Luis Hernández 20px-Flag_of_Colombia.svg.png20px-Flag_of_Argentina.svg.png

Main rig: self built, AMD Ryzen 5 5600X with PBO enabled (but default settings, CO -15 mV, and SMT ON), 2x16 GB DDR4-3200 RAM, Nvidia RTX3060 Ti 8GB, 256 GB M.2 SSD (OS+apps) + 2x1 TB SATA III SSD (sims) + 1 TB 7200 rpm HDD (storage), Viewsonic VX2458-MHD 1920x1080@120 Hz, Windows 10 Pro. Runing FSX-SE, MSFS and P3D v5.4 (with v4.5 default airports).

Mobile rig: ASUS Zenbook UM425QA (AMD Ryzen 7 5800H APU @3.2 GHz and boost disabled, 1 TB M.2 SSD, 16 GB RAM, Windows 11 Pro). Running FS9 there... sometimes on just battery! FSX-SE also installed, just in case. 

VKB Gladiator NXT Premium Left + GNX THQ as primary controllers. Xbox Series X|S wireless controller as standby/travel.

Share this post


Link to post

The AM settings I thought were working better than default have actually not helped. I started a transatlantic flight in the PMDG 747 this morning out of EKCH - everything was extremely smooth even with the very heavy scenery and being on VATSIM. However, some time into the flight I started to experience very heavy stutters - when I looked at Task Manager Core LP0 is solidly at 100% and Core LP1 was at fairly low usage so the AM seems to be working. My fps didn't seem to be affected but the stutters were terrible, totally unfyable. I tried reloading from an FSUIPC autosave but it was the same. I switched back to the default AM and it is much less stuttery but the fps is more variable. Core LP0 is still at 100% and LP1 is pretty much fully used with some spikes.
I think maybe I need to assign other process to other cores to get this to work for me by using Process Lasso or a batch file, and try capping my frame rates in NVidia Control Panel. I guess it's never as simple as just changing one setting!

The AM I tried was as follows:

[JobScheduler]
AffinityMask=4095
P3DCoreAffinityMask=4095
MainThreadScheduler=0
RenderThreadScheduler=2
FrameWorkerThreadScheduler=4

 

The AM I have temporarily reverted to which was set by LM is as follows:
P3DCoreAffinityMask=63
MainThreadScheduler=0
RenderThreadScheduler=2
FrameWorkerThreadScheduler=4
AffinityMask=63

 

Edited by simfan1983

Share this post


Link to post

Can I get assistance with setting as I'm somewhat understanding what is being discussed. I run a 10900K with HT off. Should I turn on HT and if so, what settings should I try? Can there be settings for both HT on and off. Thanks for the help. System Specs in Signature.

  • Like 1

Dan

i9-13900K / Asus Maximus Hero Z790 / RTX 4090 FE / G.Skill Trident Z5 RGB 32 GB DDR5-6400 CL32 / Artic Liquid Freezer II 360 / Samsung 980 PRO SSD 1TB PCIe NVMe M.2 / Samsung 980 PRO SSD 2TB PCIe NVMe M.2 / Samsung 970 EVO Plus SSD 2TB PCIe NVMe M.2 / EVGA 1000W G3, 80+ Gold / Phanteks Eclipse P600S ATX Mid Tower / Arctic P14 PWM Case Fans / LG C2 42 Inch Class 4K OLED TV/Monitor / Windows 11 Pro

Share this post


Link to post
2 hours ago, SteveW said:

Using the example for the 8 core / 16 LP CPU in HT mode:

less "11," and more "01":

11,11,11,01,01,01,01,01 = 64853 = AffinityMask
11,11,11,01,01,01,01,01 = 64853 = P3DCoreAffinityMask
00,00,00,00,00,00,00,01 = 0 = MainThreadScheduler
00,00,00,00,00,00,01,00 = 1 = RenderThreadScheduler
00,00,00,00,00,01,00,00 = 2 = FrameWorkerThreadScheduler

 

Thanks for this. Using this dropped my LP0 utilization from 100% to between 50% and 70%. 70% to 90% was what I was used to in v5.2.

My test with this was very smooth. Now to experiment to get LP0 utilization back into the 70% to 90% range.

  • Like 2

Version: P3Dv5.4, P3Dv6  CPU: Core i7-13700K @ 5.5 GHz with HT on,  GPU: RTX 3080 12GB,  RAM: 32GB DDR-5MONITOR: 32" 4K with G-Sync enabled, OS: Win10 22H2, Target Frame Rate: P3D 120, NCP Max Frame Rate 35.

Share this post


Link to post
50 minutes ago, Wise87 said:

Can I get assistance with setting as I'm somewhat understanding what is being discussed. I run a 10900K with HT off. Should I turn on HT and if so, what settings should I try? Can there be settings for both HT on and off. Thanks for the help. System Specs in Signature.

Try HT on and use the settings I posted earlier for my 10850K

  • Like 1

Kevin Firth - i9 10850K @5.2; Asus Maximus XII Hero; 32Gb Cas16 3600 DDR4; RTX3090; AutoFPS; FG mod

Beta tester for: UK2000; JustFlight; VoxATC; FSReborn; //42

xaP1VAU.png

Share this post


Link to post

Hi All,

 

@SteveWfantastic explanation - much appreciated. 
 

I removed P3D some time ago due to stutters that I couldn’t track down the cause of. Frames were generally good (locked via NCP at 30) but I’d get these pauses of 1-2 seconds every 20 or 30 seconds that I couldn’t isolate. This was with HT (SMT?) off on my 5800X.

Im tempted to try 5.3 and see if these new options help…but I’m wondering if these new options will make any difference to those who have HT off. Or is the real benefit of these new settings just allowing us to keep HT on and allocate LP use so as not to share the same core?
 

I guess what I’m asking is in 5.2 were mainthreadscheduler, renderthreadscheduler and frameworkerthreadscheduler already on different LPs or could they have been trying to use the same one and thus slowing us down?
 

cheers

 

  • Like 1

Kael Oswald

7950X3D / 64GB DDR5 6000 @ CL30 / Custom Water Loop / RTX 4090 / 3 x 50" 4K LCD TVs

Share this post


Link to post

I've just downloaded Process Lasso, it's very easy to configure and I'm impressed. It shows Prepar3D.exe limited to Cores 0-5 so I have added persistent settings for the main other apps such as Navigraph, vPilot, STKP, ChasePlane, Activesky to use cores 7,9 and 11. This has reduced the load on the cores used by P3D and Core LP0 is no longer maxed out all the time. I have also set a frame limit of 28 to Prepar3d.exe using NVidia Control panel. I can now pan around the aircraft with no stutters at all. Once I have removed some more apps from Cores 1-5 I may try going back to the AM setting that prevents LP0,LP2 and LP4 from hyperthreading with LP1,LP3 and LP5 (assuming I have understood what StevW is saying!

  • Like 1

Share this post


Link to post
On 12/9/2021 at 6:13 PM, SteveW said:

Core 0 is LP0 and LP1. In the screenshots it can be seen that LP0 and LP1 are both used 100% and 30% so that the real throughput of LP0 which is the main P3D task is only getting around 70% of Core 0 because it is shared with a task of 30%, and that is worse when loading scenery. The result is a rise in fps of 20% at least.

Steve, I've just been reading and experimenting and I have a couple of questions. How come if you prevent Cores 0,1 and 2 from hyperthreading to LP1, LP3 and LP5, the threads that would have been run on those cores aren't just run on LP0, LP2 and LP4 thereby overloading those cores along with the P3D threads, isn't it better to use Process Lasso to move processes to other cores? Also, if you have to logical processers on one core, do they each run half as fast as when you just have one LP per core?

Share this post


Link to post
9 hours ago, SteveW said:

Using the example for the 8 core / 16 LP CPU in HT mode:

[JobScheduler]
AffinityMask=21845
P3DCoreAffinityMask=21845
MainThreadScheduler=0
RenderThreadScheduler=1
FrameWorkerThreadScheduler=2

Putting 21845 into the DEC field of Windows Calculator in Programmer mode gives the BIN value 101010101010101. Because we are in HT mode we should be using the proper nomenclature so that binary value will look like this: 01,01,01,01,01,01,01,01 showing we are in HT mode with 2 LPs per core. Lining up the binaries we can see more clearly, remember that LP 0 is the right-most digit (core 0 is the right-most two digits):

01,01,01,01,01,01,01,01 = 21845 = AffinityMask
01,01,01,01,01,01,01,01 = 21845 = P3DCoreAffinityMask
00,00,00,00,00,00,00,01 = 0 = MainThreadScheduler
00,00,00,00,00,00,01,00 = 1 = RenderThreadScheduler
00,00,00,00,00,01,00,00 = 2 = FrameWorkerThreadScheduler


Now let's look at a more extreme setup that maximises the use of HyperThreading to collect and assemble new scenery and object data:

11,11,11,11,11,01,01,01 = 65493 = AffinityMask
11,11,11,11,11,01,01,01 = 65493 = P3DCoreAffinityMask
00,00,00,00,00,00,00,01 = 0 = MainThreadScheduler
00,00,00,00,00,00,01,00 = 1 = RenderThreadScheduler
00,00,00,00,00,01,00,00 = 2 = FrameWorkerThreadScheduler
 

We still have three cores with only one LP enabled, the remaining cores have both LPs enabled. This may be too much throughput of the system given to loading scenery and that can reduce the system throughput available to the main task. So we may require less "11," and more "01":

11,11,11,01,01,01,01,01 = 64853 = AffinityMask
11,11,11,01,01,01,01,01 = 64853 = P3DCoreAffinityMask
00,00,00,00,00,00,00,01 = 0 = MainThreadScheduler
00,00,00,00,00,00,01,00 = 1 = RenderThreadScheduler
00,00,00,00,00,01,00,00 = 2 = FrameWorkerThreadScheduler

 

I am trying hard...but I still can't figure what is best for 10700K and Z490 Prime. I looked everywhere and it seems that I am only simmer with 10700K.

 

Any help?

Edited by cyyzrwy24

Alex 

Share this post


Link to post
15 hours ago, SteveW said:

On another note the new Intel 12th gen CPUs have what is dubbed the "Thread Director". This is built into the CPU and it gathers telemetry on the threads running. In Windows 11 this information is used to help the JobScheduler to work out where threads are best run. However, in FSX and P3D certain tasks are set up to do various jobs. For example the first task handles the main program loop and this affects performance. The other tasks are confined to each next Logical Processor. We use the affinity mask to help the JobScheduler know where to avoid placing each next task. In P3D v5.3 we can also set up where we want the three first tasks to be located on the CPU (although some configurations cannot be achieved so we must check for this with Task Manager). This way of programming the simulator (FSX/P3D) means that the Thread Director telemetry data and Windows 11 JobScheduler do not preside over where the tasks reside because we decide that with the affinity settings.

Steve, yesterday upgraded my 14 core 7940X pc ( after all those good years ) with a 12900K setup.

The 12900K has 16 cores : 8 P-cores being able to go up to 5.2 and 8 E-cores being able to go up to 3.9.

How do I make sure that I get the most out of P3D as I do not want the E cores being prioritized over the P-cores ?

I want the most important threads running on the P-cores…

Thanks.

Regards, Gerard

Edited by GSalden
  • Like 2

13900 8 cores @ 5.5-5.8 GHz / 8 cores @ 4.3 GHz (hyperthreading on) - Asus ROG Strix Gaming D4 - GSkill Ripjaws 2x 16 Gb 4266 mhz @ 3200 mhz / cas 13 -  Inno3D RTX4090 X3 iCHILL 24 Gb - 1x SSD M2 2800/1800 2TB - 1x SSD M2 2800/1800 1Tb - Sata 600 SSD 500 Mb - Thermaltake Level 10 GT case - EKWB Extreme 240 liquid cooling set push/pull - 2x 55’ Sony 4K tv's as front view and right view.

13600  6 cores @ 5.1 GHz / 8 cores @ 4.0 GHz (hypterthreading on) - Asus ROG Strix Gaming D - GSkill Trident 4x Gb 3200 MHz cas 15 - Asus TUF RTX 4080 16 Gb  - 1x SSD M2 2800/1800 2TB - 2x  Sata 600 SSD 500 Mb - Corsair D4000 Airflow case - NXT Krajen Z63 AIO liquide cooling - 1x 65” Sony 4K tv as left view.

FOV : 190 degrees

My flightsim vids :  https://www.youtube.com/user/fswidesim/videos?shelf_id=0&sort=dd&view=0

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...