Jump to content
Sign in to follow this  
Boeingnut

Horrible FPS

Recommended Posts

1 hour ago, Boeingnut said:

Well, just to add to the confusion, ever since we were able to adjust FPS (was it with FS 2002?) I've always locked them at 30. This has been the practise with all sims, up to and including P3d v5.1, with success, yet some stutters while taxiing remained. As a "hail Mary" I changed my fps to unlimited and now, no stutters and guaranteed FPS of 23-30 with no stuttering. IDK; the sim may have MPD...

FOR the FFTF Dynamic user, the Dev suggests one sets the FPS bar to 120, not unlimited and use the nVidia driver mask to set to whatever you want.  I set to 33, as I was told a long time ago, that that is a really good locked frame rate. So, 33 with the driver mask, and in sim for me, 120 FPS.  

Share this post


Link to post
1 hour ago, Sesquashtoo said:

FOR the FFTF Dynamic user, the Dev suggests one sets the FPS bar to 120, not unlimited and use the nVidia driver mask to set to whatever you want.  I set to 33, as I was told a long time ago, that that is a really good locked frame rate. So, 33 with the driver mask, and in sim for me, 120 FPS.  

i'll give it a try and see what happens. Thanks!

 

Share this post


Link to post
2 hours ago, SteveW said:

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

Just gave that a try with my i7 8770k and it seems to work, thank you so much. Haven't done an fps comparison but everything seems very smooth when panning around.

  • Like 1

Share this post


Link to post

 

38 minutes ago, simfan1983 said:

Just gave that a try with my i7 8770k and it seems to work, thank you so much. Haven't done an fps comparison but everything seems very smooth when panning around.

I assume you mean i7 8700k?

Which version of the sim are you running

Share this post


Link to post
1 hour ago, Ikarus280 said:

 

I assume you mean i7 8700k?

Which version of the sim are you running

Yes, apologies I do mean an 8700k, overclocked to 4.5 GHz. I'm on P3D 5.3 - the option of thread scheduling to cores is only available on 5.3 I believe.

  • Like 1

Share this post


Link to post
9 minutes ago, simfan1983 said:

Yes, apologies I do mean an 8700k, overclocked to 4.5 GHz. I'm on P3D 5.3 - the option of thread scheduling to cores is only available on 5.3 I believe.

I see, thanks. I have the same processor so I will try those settings as well when updating to 5.3 over the weekend.

The new version was released the same day that I finally finished fine-turning P3D, so I was not too inclined to upgrade yet based on mixed reports if FPS/smoothness is better.

  • Like 1

Share this post


Link to post

Setting up P3D:

  First I run Nvidia Control Panel (NCP) and in the Manage 3D Settings I Restore/Apply the Global setting, and then in the Program Settings tab I choose the Prepar3D.exe profile and Restore/Apply that and exit NCP.

  Next I set up the simulator Display settings for the screen size I am using, then I set Triple Buffering=OFF, VSYNC=OFF and set Unlimited on the frame time slider so that when the sim is running it will achieve the highest frame rate.

  Using the information I posted to set up for correct affinity so that the main tasks are running OK without sharing cores showing on Task Manager graphs (not an issue with HT disabled) I can then set up for flying. I use HT enabled and I set up affinity so that for each core hosting a main task, the second Logical Processor is masked.

  I leave the Display settings as they are and run Nvidia Control Panel and in the Manage 3D Settings I go to the Program Settings tab and I choose the Prepar3D.exe profile and set Max Frame Rate to 28 (I have a 60Hz 4k monitor). This caps the frame rate. I am not setting a frame time on the Display Settings slider because that does not cap the frame rate as it continues to build look-ahead frames after displaying each frame.

  When the sim is running I go back to Task Manager performance graphs and check that all is well, if there is any sharing of the the main tasks on the second LP of those cores I can if I wish reorganise the main task locations with P3D v5.3 affinity settings (Main, Render and less importantly FrameWorker) and see they are shared as little as possible.

  Also I check how much throughput is registering on those main tasks, the MainThreadScheduler I look at to see if it is reaching 100%, if it is I will back off some Display Settings so that I am seeing around 90%. This allows for extra processing overhead, for example, where there may be more intense scenery or AI Traffic the sim can continue at the same pace. When the main task is running at 100% the sim will slow down to meet demand because the core can't do over 100% and this is a cause of inconsistent frame times.

Edited by SteveW
  • Like 4
  • Upvote 2

Steve Waite: Engineer at codelegend.com

Share this post


Link to post

How to calculate affinity settings:

Start "Calculator", and in the top left corner menu choose "Programmer" mode, then in the "BIN" field type ones corresponding to the Logical Processors (LPs or cores)  we want P3D to use and type zeros for the LPs we want P3D to avoid. We are typing the binary value of the affinity mask and we will see the decimal value of that displayed in the "DEC" field.

In the binary value the right-most digit represents LP0, this is the top-left graph in Task Manager performance graphs and is generally the first core shown in most processor information programs. In effect we are making the binary value the reverse of what we see in Task Manager, remember that the least significant digit of the binary number is on the right and this is LP0.

Windows Calculator showing the top-left: menu, selecting Programmer mode and typing into the BIN field to see the result in the DEC field:

WinCalcProgMode.jpg

Using the example of a six core with Hyperthreading enabled gives us 12 LPs (0-11).

In Prepar3D.cfg (v5.3) we have the JobScheduler section:

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

11,11,11,01,01,01 = AffinityMask = 4053
On the left of the binary is LP11 and on the right is LP0. Core zero is the right-most "01" so that LP0 is enabled and LP1 is masked to be unused. And so on with LP3 and LP5 masked to be unused. We can se that we are then only allowing one LP of those cores so that we do not get other tasks started on those LPs which will take throughput away from LPs 0, 2, and 4.

11,11,11,01,01,01 = P3DCoreAffinityMask = 4053
The P3DCoreAffinityMask must fit inside the AffinityMask. We can enlarge the AffinityMask value so that it enables more LPs if we have enough cores, that can enable P3D to find extra processing power, perhaps from running certain add-ons and avoid sharing other cores for the purpose.

MainThreadScheduler=0
RenderThreadScheduler=1
FrameWorkerThreadScheduler=2
These values do not correspond to the LP number. These values correspond to the unmasked LPs from right to left so that MainThreadScheduler=0 is on LP0, RenderThreadScheduler=1 is on LP2, and FrameWorkerThreadScheduler=2 is on LP4.

As we enable more LPs these contribute mostly to collecting and organising new scenery as we fly. However, with a very large CPU with perhaps more than 10 cores we might not want to enable all the LPs because that can saturate the system (depends on the motherboard and other hardware) when collecting and organising new scenery as we fly, and that can lead to thinning out the available performance for the main task to keep the fps up.

  • Like 8
  • Upvote 3

Steve Waite: Engineer at codelegend.com

Share this post


Link to post
1 hour ago, SteveW said:

How to calculate affinity settings:

He did it again! 👍

Thanks Steve

 

Edited by Dirk98
  • Like 2
  • Upvote 1

Share this post


Link to post

Moderators,

Once again, these last two posts authored by Steve exemplify his selfless and seemingly boundless dedication to helping our community’s comprehension of such tricky matters. I doubt we will read a clearer explanation and I, for one, would be in favour of pinning both posts at the top of the forum for future reference or, better still, archived in the ‘Prepar3D Tips, Tricks and How To’s’ section.

Mike

  • Like 7
  • Upvote 6

Share this post


Link to post
20 hours ago, SteveW said:

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.,

 

I haven't seen anybody ventured to narrow P3DCoreAffinityMask=  compared to AffinityMast= yet to some reason.

It would be interesting to see how it works for the above example.

Thanks.

Edited by Dirk98
  • Like 1

Share this post


Link to post
19 minutes ago, Dirk98 said:

I haven't seen anybody ventured to narrow P3DCoreAffinityMask=  compared to AffinityMast= yet to some reason.

It would be interesting to see how it works for the above example.

Thanks.

This is what I'm running on a 10 core 10850K....

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

11,11,01,01,01,01,01,01,01,01 = AffinityMask = 1004885

00,00,01,01,01,01,01,01,01,01 = P3DCoreAffinityMask= 21845

  • Like 3

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

I'm at work now but I'm going to have to use the above to figure out my 8 core HT off 9900k setting. 

  • Like 1

Eric 

 

 

Share this post


Link to post
19 minutes ago, kevinfirth said:

This is what I'm running on a 10 core 10850K....

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

11,11,01,01,01,01,01,01,01,01 = AffinityMask = 1004885

00,00,01,01,01,01,01,01,01,01 = P3DCoreAffinityMask= 21845

I take it this would also work with the 10900k? I also have HT off, will that be an issue?  Can someone post the values for a 10900k with HT off. 
Thanks. 


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
14 minutes ago, B777ER said:

I'm at work now but I'm going to have to use the above to figure out my 8 core HT off 9900k setting. 

I'm considering turning HT on with my 9900K and messing around with these settings. It always used to make the performance worse on my setup

but maybe now I can use it to positive effect. Interested to hear how you get on!

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...