Jump to content
Sign in to follow this  
ex_

Is it possible to get stable 60FPS?

Recommended Posts

If you have a 4 core with HT=Off, use No AM in the cfg AM=0=(1111), and with proc lasso or a bat, set addons to 14=(1110)

 

same here

4 core HT On AM=85=(01,01,01,01), set addons to 248=(11,11,10,00)

requoted :)


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

Steve, you do have a way with words...

 

AM=0=(1111)   :wink:

 

do you mean AM=15=(1111)?

 

For the record... my recommendation

 

Quad core processor

 

HT off, AffinityMask=14

 

or, if you must..

 

HT on, Affinitymask=84 or 244,  take your pick..


Bert

Share this post


Link to post

Bert, why not use correct nomenclature to have a common understanding with others? Perhaps it might help if it is made clear that AM=0, or not specifying an AM in the cfg means 15 on a four core, 255 on an 8 core, and 1023 on a 10 core, etc.

 

So when we say use no AM or AM=0, we mean those number of bits unmasked represents the number of cores.

 

Anyway, when I say use no AM (AM=0) with your four core I'm saying give it four cores 0,1,2,3. And give your addons the cores that the sim uses for background tasks, 1, 2, 3.

 

 

The reason that escapes some, is that since the background tasks take any number of seconds, it's not particularly troublesome to allow the sim background threads on those cores mixed with addons.

 

Split the sim into Rendering (job 1, core 0) and background tasks (jobs 2,3,4, cores 1,2,3).

 

But if we allow the first sim job to share with addons, the main job sawtooths, giving rise to stutter. The main job does the rendering so don't allow it to be interrupted. Mix addons with sim background tasks when you only have 4 cores.

 

When we use HT with the four core we would use an AM=85 for the same reasons and put our addons on 248.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

 

The alternative to 85 on the 4 core HT=On being 170. Since this discussion is about maintaining a high fps, I've presented AMs for that purpose, we can take a little from the background to maintain our primary job throughput.

 

In the case of more cores I've shown elsewhere how 5 jobs on 5 cores produces worse performance than 4 jobs on 4 cores, and that HT disabled is not a good idea, so long as we are not going for GHz world records, and have an optimised AM. Optimised AMs are quite important regarding VAS and heat too. It's pretty average to apply optimisations to machines these days, although how to go about it may not always be so obvious.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

Steve,

 

Currently I am running Fs with Unlimited fps.

At a very detailed airport with locked at 30 or even 25 I am getting 17-23.

With Unlimited 27+ ...

Taxiing is smoother.

 

However Large turns above multiple cloud layers with OC gives jitters.

 

Could I use an external frameratelimiter to have the advantage of Unlimited with detailed scenery but with a higher lowest fps to avoid jitters ?

 

Thanks

try using 29fps or 30fps limit within NVidia Inspector,

 

and then in the sim display settings

 

1. set 29 or 30 fixed on the slider, no vsync,

or

2. set vsync on and triple buffer on with Unlimited.

 

Note VSync will hook into that NI limit so it's helping to cap the fps. The fixed setting requires more power but creates frames that are equi-distant.

 

SteveW...

Could you provide the .CFG section titles and exact code for both the AM and Addons entries you suggest?

thanks

RMM

What CPU(s) does your PC use?


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

Not sure that mask for AM=0 is quite right, if no mask is set P3D by default will not use CPU0( as viewed from task manager) That would be 254 on a 4C/8T or 4094 on a 6C/12T system. It doesn't work like FSX, the default behaviour was changed some time ago in the 2.x versions. It only appears to not use the first logical CPU it comes to , not the first and second logical CPU's. Too lazy to dredge up the thread from LM where it was explained , but that's what I see on my 3.1  install.

 

Postby Zach Heylmun » Mon, 25 Nov 2013, 11:58

Hey James,

V2 is smarter about generating its default affinity mask, but if you want to tinker with it yourself you still have to add the entry to the config file. P3D is still better off with one thread per physical core, so it generates an affinity maskthat puts one thread on each physical core of a processor. If you have 4+ physical cores, the application will bump itself off of the first core to free up the processor for the OS and other applications. Thanks,

Share this post


Link to post

Rmmm, on 06 Feb 2016 - 5:07 PM, said:snapback.png

SteveW...
Could you provide the .CFG section titles and exact code for both the AM and Addons entries you suggest?
thanks
RMM

What CPU(s) does your PC use? 

 

Hi Steve:

I have a new build.   i76700k CPU with 16GB of Ram and an  EVGA Classified 980Ti GPU

Your recent other threads are in my bookmarks.   Your suggestions are really welcome and greatly appreciated.

RMM

Share this post


Link to post

Not sure that mask for AM=0 is quite right, if no mask is set P3D by default will not use CPU0( as viewed from task manager) That would be 254 on a 4C/8T or 4094 on a 6C/12T system. It doesn't work like FSX, the default behaviour was changed some time ago in the 2.x versions. It only appears to not use the first logical CPU it comes to , not the first and second logical CPU's. Too lazy to dredge up the thread from LM where it was explained , but that's what I see on my 3.1  install.

 

Specifying no affinity mask in the P3D v3.1 Prepar3D.cfg file results in every Logical Processor (LP) being utilised by the sim, very easy to check in a few minutes with Task Manager.

 

This is especially not cool since with Hyperthreading enabled, the first two LPs are occupied by sim jobs 1 and 2. Not good. But since we want to be using Hyperthreading we must use an AM if we have more than 4 LPs on the CPU. Specifying AM=0 results in the same situation as with not specifying an AM. AM=0 (or no AM) is not interpreted as a binary number, but rather it is interpreted as every bit unmasked. And every bit unmasked on an 8 core with hyperthreading enabled would be AM=65535. Even without HT enabled, CPUs with more than four cores will not run P3D so efficiently unless the Mask only enabled 4 bits, which results in the sim splitting into just four jobs. Five jobs or more are wasted and reduce performance.

 

 

 

Rmmm, on 06 Feb 2016 - 5:07 PM, said:snapback.png

What CPU(s) does your PC use? 

 

Hi Steve:

I have a new build.   i76700k CPU with 16GB of Ram and an  EVGA Classified 980Ti GPU

Your recent other threads are in my bookmarks.   Your suggestions are really welcome and greatly appreciated.

RMM

 

Enable Hyperthreading, Specify in Prepar3D.cfg

[JOBSCHEDULER]
AffinityMask=85

AffinityMask=85=(01,01,01,01)=0,2,4,6 we delimit HT pairs with commas to show the Hyperthreding is enabled.

 

We do not process lasso or move sim threads after the sim has started. This does not result in the natural arrangement of sim jobs, but rather this causes mounting of multiple sim jobs onto single LPs making them look more active.

 

Use a batch file (.bat) or process lasso to keep your addons on LPs 3,4,5,6,7=AM=248. Starting apps with a batch file for affinity

 

The reason for doing it this way is that we have to keep known activity (Addon exe's) away from the first sim job.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

SteveW:  I think the proverbial lightbulb may have finally gone off in my head after reading your most recent post.  All the various discussions about the AM issue were causing me confusion and I instinctively knew I was missing something.  When I first read your statement about using a 248 AM I initially thought you were referring to inside of the P3D config file which made no sense to me.  As it was obvious that you know quite a bit about this subject I went to the link (Starting apps with a batch file for affinity) and I realized that was not the case.  So I think I'm now starting to grasp this subject much better.  I do have some questions regarding the link but before going there I want to ensure that my current understanding is basically accurate

 

Under the assumption that we are talking about a 4 physical core processor with HT active and one has additional add-ons with the desire to keep them off some of the first few cores that P3D will use and we wish to have P3D use 4 of the eight cores available, it becomes necessary to use an AM=85 in P3D config file (01,01,01,01).  It's my understanding that the reason for not using AM=15 (00,00,11,11) is that placing P3D on the first 4 logical cores created by the first 2 physical cores is not as efficient as putting P3D into the first logical core created by each of the 4 physical cores (0,2,4,6). 

 

We then could create a batch file to set an affinity mask = 248 (11,11,10,00) for one or more add-ons which keeps them off of core 0 and core 2 which are the first two used by P3D.  Hopefully I have gotten this correct.  Assuming I do I have some questions:

 

  1. In the specific assumptions above is starting the add-ons on core 3 going to cause any significant reduction in the effectiveness of P3D on core 2 inasmuch as they are both controlled by the 2nd physical core?
  2. Is there any merit to shoving add-ons to just cores 5, 6 and 7 allowing P3D exclusive use 0, 2, and 4?  Perhaps the answer to both 1 and 2 is it depends on the add-ons in question and their particular demands.
  3. With regard to the batch link you provided I wasn't clear on a few things:
  • In that post there is the following:  I will use a fictitious weather program called FSWeather.exe found in the folder "C:\Program Files (x86)\FSWeather".  Rename it FSWeather.bat.  If I take it literally this seems to imply to change the extension of the fictitious program from .exe to .bat which didn't make sense.  Perhaps it means that we are to create a batch file that will be given the name FSWeather.bat??
  • One the lines for this potential batch file reads:  C:\Windows\System32\cmd.exe /C start /affinity F8 FSWeather.exe.  Below that batch example it then reads:  "F8=248= . . . ."  How did F8 become = to 248?  Is there something else required to make F8 mean 248?

I think that's it for now.  Let me know if I'm on the right track and if you can help clarify the batch file confusion I'm having.

 

Rick

Share this post


Link to post

We then could create a batch file to set an affinity mask = 248 (11,11,10,00) for one or more add-ons which keeps them off of core 0 and core 2 which are the first two used by P3D. Hopefully I have gotten this correct.

 

Realise you want to get a response from Steve but in the mean time if you write a batch file to get other applications off the simulators LP's (local processes), the batch file is in hexidecimal not decimal. AM = 248 (decimal) is actually (F8)hexidecimal in the batch file. In the operating system, it will run a batch file (.bat) which then executes your addon as per the hexidecimal AM. It is only the P3D.cfg where the affinity is in decimal (what a silly decision).

We then could create a batch file to set an affinity mask = 248 (11,11,10,00) for one or more add-ons which keeps them off of core 0 and core 2

 

You aren't trying to exclude all addons from using the simulators cores, just from the main processes that the simulator runs. The other processes are less busy so addons can go there. That is why we have the overlapping affinity masks for the simulator and addons, partially sharing resources.

Share this post


Link to post

Got it.  We can easily use the Calculator to see what the Hexidecimal equilavent is of the AM decimal we intend to use when utilizing a batch file. 

Share this post


Link to post

You guys have got it!

 

Differing addons may introduce different loads and so the overlapping could be made less intense. For example, say we have an addon asks for more throughput every now and again, we may not want to mix any sim job with it.

 

For that case we can use three cores and reserve a core for addons. That's why 116 came about, this avoids core zero entirely, while still places the main sim job onto a core by itself by making 4 jobs. The jobs 2 and 3 reside on the same core because otherwise placing jobs 3 and 4 on the core together (with 212) jobs 3 and 4 both ask for max throughput at the same times when job 2 is relatively idle.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

I may need a little clarification as to what the definition of a "job" means as it relates to P3D.  Could that term be equivalent to a particular unique task that is being performed by P3D?  Can only 1 "job" exist at any time on a specific core assigned to P3D or can multiple P3D "jobs" exist on the same core?  I'm assuming the latter unless there are only 4 unique "jobs" produced by P3D which intuitively I would suspect unlikely.  Appreciate any clarification that would increase my understanding.

Share this post


Link to post

Thanks Steve...

My replacement motherboard just arrived.   I will have to get the machine up and running and then digest all this.   I will surely read all your posts again.   P3D is new to me.   Much appreciated.

RMM

Share this post


Link to post

Appreciate any clarification that would increase my understanding.

If you apply a value that unmasks only say only one LP AM=2=(00,00,00,10), then you'll see one sim "job" on LP1 core 0, one job made out of many threads. Unmask more bits in the AM, the sim counts the available LPs and splits into that many jobs. Less than four jobs, the threads within those sim jobs are grouped in a particular way. So we find that allowing four jobs splits out those threads to the best advantage with a 4GHz class Intel CPU, HT On or Off.

 

Of course if we only have three cores, with HT enabled we can still split the jobs into four and this means we need to then keep other processes from the core with the first job. Once the sim is up and running, that main job will wiz along, and the jobscheduler will avoid that LP and it's HT twin on that core, and move onto the remaining LPs. If we allow an addon onto that core, and we know that addon will be running up and asking for throughput, then the sim main thread will sawtooth during that time.

 

Remember we can only improve fps by reducing eye candy or increasing the core GHz, There is one other way; since background tasks of the sim can take a number of seconds to complete, we can actually see extra fps during certain times, often when these are not ready, or efficient. Don't let minor improvements to fps fool you, this is possible when the sim performs badly.

 

Those lucky big shots with more than four cores can have less overlapping addon activity, but cannot get increased fps with more cores. They can even ruin the performance by allowing more than four LPs unmasked in the AM.

 

FSX and P3D are very similar but it's possible with 5 to 6 GHz tech we may be able to utilise effectively 5 cores optimally over 4 with versions of P3D in the future.

 

 

So really with HT versions I would say enable HT, even if you have to come down a couple of MHz on the overclock. Then ensure you've got an AM that unmasks just 4 LPs, preferably on four cores, and manoeuvre the addons away from the first job.

 

If only 4 cores are available and there's an addon that asks a lot of throughput, reserve a core specifically for the main job of that addon, and use three cores for the sim, continue to unmask 4 LPs, (AM-116) group the middle 2 jobs.


Steve Waite: Engineer at codelegend.com

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