Jump to content
Sign in to follow this  
Zimmerbz

Locking Frame Rate

Recommended Posts

Thanks Mike!

I've put a few differing examples there to try out - some may prove better than others depending on  the system and OS. Remember the batch command language is available on the net so I've got nothing there to explain any of the functionality.

Edited by SteveW

Steve Waite: Engineer at codelegend.com

Share this post


Link to post
16 hours ago, SteveW said:

Vsync in P3D is not the vertical sync you remember from CRT days.

Vsync=On in P3D is simply saying that the "Monitor Refresh Frequency" will be targeted for output fps rate.

Don't confuse P3D VSync with vertical sync.

 

Another mis-conception of how the operating system works.

There's no favoured core and Windows uses cores that are less used.

 

These concepts are misunderstood a great deal unfortunately.

So I better stay out of VSync in any event, because my personal target is 30 FPS and my monitor is at 60 Hz...

I remember that FSX needed VSync (but probably the "other" VSync) because although I had a LCD monitor I could see tearing if the option was not set. Besides it was a real fullscreen application.

That's great news to know Windows will use the less used cores! I better let the way it is then and don't apply any kind of AM.


Best regards,

Wanthuyr Filho

Instagram: AeroTacto

Share this post


Link to post
15 hours ago, aeronauta said:

"Another mis-conception of how the operating system works.

There's no favoured core and Windows uses cores that are less used."

 

Steve can you please explain why when running P3D V4.3 I get Core0 (with HT or not) running at 100% and all others no more than 20%, following your comment all should be around the same..

 

Jorge

That's the reason why I concluded that core zero was in fact used (always) for the "main thread".


Best regards,

Wanthuyr Filho

Instagram: AeroTacto

Share this post


Link to post
15 hours ago, SteveW said:

Can anyone imagine how stupid Windows would be to want to use, or claim preferred use of, "core zero" - or any core for that matter? Doesn't work like that and doesn't make sense to work like that.

That's a good thing for certain, and I feel relieved knowing that, but don't you agree that P3D v4 tends to always assign the main thread to core zero?


Best regards,

Wanthuyr Filho

Instagram: AeroTacto

Share this post


Link to post
15 hours ago, Cruachan said:

Hi Wanthuyr,

I think you might be better served by looking through this recent thread:

https://www.avsim.com/forums/topic/541073-using-loading-times-to-determine-affinity-mask/

Start on Page 1 and, once you have understood the basic setup and objective, jump to Page 5 where I have followed Steve’s advice and taken the testing to its logical conclusion.

These tests were conducted using an 8-Core CPU, but the principles remain the same with your 6-Cored 8700K.

I am convinced that this is a much more sensible approach for determining the best Affinity Mask for Prepar3D v4.3 on multi-cored CPUs (6 and above).

Also, I would encourage you to try with HT=ON. Better performance-wise and will allow for greater flexibility when it comes to deciding which Cores/Logical Processors you wish to reserve for the various exe Addons running alongside Prepar3D.

Regards,

Mike

Thanks, I will take a look.

I'm not very inclined into turning on HT for two reasons now, first is that I already got a fully stable overclock and don't want to have to deal with it all again, and second is that by turning HT on the final clock is most probably lower than it is now, and provided that the main thread cannot be split between cores I want to make sure that it gets allocated to an as high as possible clock speed core.


Best regards,

Wanthuyr Filho

Instagram: AeroTacto

Share this post


Link to post
13 hours ago, Cruachan said:

How can we determine whether or not an App has had an Affinity Mask predefined and needs no further user interventions? 

I think I have an answer to that one!

1. Open Windows Task Manager and click on the Processes tab

2. Start up the App's executable and observe its appearance in the list of Processes.

3. Right-click on the App's entry and select Set Affinity...

4. Scroll down the list and observe whether any checkmarks are present. Make a note of each CPU # assigned to the App. If ALL CPUs are checked then the App would be a candidate for user assignment of an Affinity Mask.

I checked this out using Codelegend's Ideal Flight Professional and found that it was being assigned 'CPU 11' and 'CPU 13' on my i7-5960X (8 Cores/16 Logical Processors with HT=ON). In other words it has been preconfigured to use LP11 and LP13 (AffinityMask=10240). So, this App should be left alone.

Mike

 

  • Like 1

Share this post


Link to post
14 hours ago, Cruachan said:

Thing to remember is that the Affinity Mask must be in hexadecimal. If you enter the chosen value in Decimal it won’t work.

That's what I tried, never worked. Whatever AM I set in my BAT file, the Task Manager always had all cores checked. Might have done something wrong, I will try again this weekend.

  • Like 1

Greetings, Chris

Intel i5-13600K, 2x16GB 3200MHz CL14 RAM, MSI RTX 4080 Gaming X, Windows 11 Home, MSFS

Share this post


Link to post

You can also enter the AM in binary.

For a 4 core CPU: AffinityMask=1011

In this case, the core 2 is disabled (Core 0 on the right and core 3 on the left).

  • Like 1

Share this post


Link to post

If you type in your cmd prompt Start /? it wll give you all the parameters , the affinity says Hexadecimal .. meaning 1011 is B.

 

Jorge

  • Like 1

Share this post


Link to post
12 hours ago, Wanthuyr Filho said:

That's a good thing for certain, and I feel relieved knowing that, but don't you agree that P3D v4 tends to always assign the main thread to core zero?

Of course it does with no AM because put very plainly to you - there's always an AM 🙂

the "NO AM" of a four core is 1111=15

the "NO AM" of a six core is 111111= 63

and so on

So with "NO AM" (lol) whatever CPU you have the first core will be occupied by the main P3D task.

 

 

  • Upvote 1

Steve Waite: Engineer at codelegend.com

Share this post


Link to post

Hi,

Here is an example of how I set up those bat files:

My CPU: i7-5960X (8-Cores/16 LPs)

From testing, I determined the optimal Core/LP assignments for Prepar3D are:

6 CORES (10 LPs)
00,00,11,11,11,11,01,01
AffinityMask = 4085

Prepar3D.cfg

Add:

[JOBSCHEDULER]
AffinityMask=4085

This leaves 2 free Cores (6,7) / 4 Logical processors (12,13,14,15):

11,11,00,00,00,00,00,00  (which can be used by FFTF D, ChasePlane, AS-P3D4, REXSF and UTLive)

AffinityMask =  61440 (Decimal) = F000 (Hexadecimal)

Example:

ChasePlane.bat (Created in and Saved from Notepad++)

C:\Windows\System32\cmd.exe /c start "ChasePlane" /affinity F000 "E:\Program Files (x86)\OldProp Solutions Inc\ChasePlane\ChasePlane.exe"

Your path will likely differ from mine.

That's it!

Mike

  • Like 2

Share this post


Link to post
13 hours ago, Cruachan said:

I think I have an answer to that one!

1. Open Windows Task Manager and click on the Processes tab

2. Start up the App's executable and observe its appearance in the list of Processes.

3. Right-click on the App's entry and select Set Affinity...

4. Scroll down the list and observe whether any checkmarks are present. Make a note of each CPU # assigned to the App. If ALL CPUs are checked then the App would be a candidate for user assignment of an Affinity Mask.

I checked this out using Codelegend's Ideal Flight Professional and found that it was being assigned 'CPU 11' and 'CPU 13' on my i7-5960X (8 Cores/16 Logical Processors with HT=ON). In other words it has been preconfigured to use LP11 and LP13 (AffinityMask=10240). So, this App should be left alone.

Mike

 

Thanks Mike, yes in fact it looks at where P3D is and avoids if possible so rather than pre-configured it computes the AM for the system. You'll see it uses more cores when building flights, and with the Start Other Programs function you can use instead of a BAT to start at certain times in your workflow. Basically did all that way back for FSX as well.

  • Upvote 1

Steve Waite: Engineer at codelegend.com

Share this post


Link to post
20 minutes ago, SteveW said:

yes in fact it looks at where P3D is and avoids if possible so rather than pre-configured it computes the AM for the system.

Hi Steve,

How is that achieved? IFPro is started first and appears to be creating its own AffinityMask before Prepar3D Is launched via the IFPro interface.

Regards,

Mike

 

Share this post


Link to post

Understands the CPU and looks into the P3D cfg.

  • Upvote 1

Steve Waite: Engineer at codelegend.com

Share this post


Link to post
6 hours ago, Cruachan said:

Hi,

Here is an example of how I set up those bat files:

My CPU: i7-5960X (8-Cores/16 LPs)

From testing, I determined the optimal Core/LP assignments for Prepar3D are:

6 CORES (10 LPs)
00,00,11,11,11,11,01,01
AffinityMask = 4085

Prepar3D.cfg

Add:

[JOBSCHEDULER]
AffinityMask=4085

This leaves 2 free Cores (6,7) / 4 Logical processors (12,13,14,15):

11,11,00,00,00,00,00,00  (which can be used by FFTF D, ChasePlane, AS-P3D4, REXSF and UTLive)

AffinityMask =  61440 (Decimal) = F000 (Hexadecimal)

Example:

ChasePlane.bat (Created in and Saved from Notepad++)

C:\Windows\System32\cmd.exe /c start "ChasePlane" /affinity F000 "E:\Program Files (x86)\OldProp Solutions Inc\ChasePlane\ChasePlane.exe"

Your path will likely differ from mine.

That's it!

Mike

Do you see better P3D performance taken from this approach?

What about other executables, such as couatl and others normally found in the EXE.XML or ADD-ON.XML (or something alike), do you apply AM for them as well?

Considering I don't set any AM at all (which doesn't mean I don't have AM, right Steve?! ;-)) isn't it the case that Windows 10 is smart enough to send the addons to the cores with less load? And thus, by doing that, you wouldn't need to make this manual balancing...

Nowadays I have a 8700K HT=OFF, which gives me 6 cores at 5 GHz each, and my core zero is pretty much totally used most of the time (yes, I have high settings in P3D) and the other subsequent 5 cores are less loaded most of the time. My personal goal would be let the core zero to P3D alone, for the main tread to have the maximum throughput possible.

Years ago when I had a 4770K HT=OFF running all 4 cores at 4.5 GHz and running FSX/P3D (32-bit) I used this approach but one day I noticed that the camera manager (don't recall if it was Opus or ChasePlane already) needed more than 2 or 3 cores in order to run smoothly.


Best regards,

Wanthuyr Filho

Instagram: AeroTacto

Share this post


Link to post
Guest
This topic is now closed to further replies.
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...