Jump to content
Sign in to follow this  
Zimmerbz

Locking Frame Rate

Recommended Posts

1 hour ago, Wanthuyr Filho said:

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

Yes, planned carefully it uses resources more efficiently, doesn't spread the shared cache thinner than need be, leaves spare cores...

Other exe's in the exe.xml - you can do those they don't have to be in there (some might due to the way programmed).

No. Windows can't determine the best partitioning - but you can.

 

Edited by SteveW

Steve Waite: Engineer at codelegend.com

Share this post


Link to post

Hi Wanthuyr,

1 hour ago, Wanthuyr Filho said:

Do you see better P3D performance taken from this approach? 

Yes! I'm not referring to frame rates as these will remain unchanged. By assigning an Affinity Mask to Apps, such as I have listed by way of those commonly used examples, you are ensuring that they are not competing with Prepar3D for CPU resources. Testing has confirmed that the Affinity Mask pattern (00,00,11,11,11,11,01,01) on my i7- 5960X is optimal for Prepar3D. This leaves 2 cores free for such Addon executables. Running them on these Cores keeps them away from those LPs assigned to Prepar3D thereby eliminating any risk of contention and consequent stuttering of the sim.

1 hour ago, Wanthuyr Filho said:

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?

No, these should be left alone. I am assuming that the Developers of these products have taken this into consideration by implementing product specific measures to ensure the preservation of optimal performance.

Edit: I note Steve beat me to it...lol! He has a slightly different take on this. On balance I, as a rank amateur, would suggest that it is probably unnecessary.

Regards,

Mike

 

Share this post


Link to post
47 minutes ago, Cruachan said:

Hi Wanthuyr,

Yes! I'm not referring to frame rates as these will remain unchanged. By assigning an Affinity Mask to Apps, such as I have listed by way of those commonly used examples, you are ensuring that they are not competing with Prepar3D for CPU resources. Testing has confirmed that the Affinity Mask pattern (00,00,11,11,11,11,01,01) on my i7- 5960X is optimal for Prepar3D. This leaves 2 cores free for such Addon executables. Running them on these Cores keeps them away from those LPs assigned to Prepar3D thereby eliminating any risk of contention and consequent stuttering of the sim.

No, these should be left alone. I am assuming that the Developers of these products have taken this into consideration by implementing product specific measures to ensure the preservation of optimal performance.

Edit: I note Steve beat me to it...lol! He has a slightly different take on this. On balance I, as a rank amateur, would suggest that it is probably unnecessary.

Regards,

Mike

 

Yes exactly. They can be tested and they most likely are just the same, an exe making a SimConnect client so the exe tasks can be moved off of the sim affinity if you have spare cores. The thing to watch is if they are built to start the SimConnect conversation at a specified point. But that's rare, in general the client will wait for the server to start. There's no performance benefit to staying in there, so you might find some optimisation possibilities if they are programmed the usual way..


Steve Waite: Engineer at codelegend.com

Share this post


Link to post
1 hour ago, Cruachan said:

as a rank amateur, 

You've got a better grasp than most pro's Mike. OK how about what happens after the sim is started up and you then add a SImConnect client? Forget dlls they are run in the sim so they can't be moved out. Extra threads are created within the affinity of the sim to support the client and the client exe runs on another core (if we put it there). Remember that after the layout is complete the AM can be expanded to support more spare cores for the additional threads coming in. Guys have posted in forums about going into task manager and enabling more cores after it started and before it was unpaused or some such like that. So it has been noticed that there is some extra performance available somewhere, somehow.

Edited by SteveW
  • Upvote 1

Steve Waite: Engineer at codelegend.com

Share this post


Link to post
2 hours ago, SteveW said:

Yes, planned carefully it uses resources more efficiently, doesn't spread the shared cache thinner than need be, leaves spare cores...

Other exe's in the exe.xml - you can do those they don't have to be in there (some might due to the way programmed).

No. Windows can't determine the best partitioning - but you can.

 

This is what I understood from a former post of yours, which says:

"

Another mis-conception of how the operating system works.

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

"

That made me think that Windows would assign the less used core, thus balancing the whole stuff.


Best regards,

Wanthuyr Filho

Instagram: AeroTacto

Share this post


Link to post
On 9/13/2018 at 5:35 PM, Cruachan said:

Something I must be doing wrong. I now tried both lines in the link you provided, yet if I check via Task Manager on which processors the software runs, always all CPU's are marked. What am I doing wrong? My bat file now looks as follows:

CD /D "D:\HiFi\AS_P3Dv4"
C:\Windows\System32\cmd.exe /C start /affinity AA0 AS_P3Dv4.exe

I tried to play around with the HEX affinity mask, but whatever HEX value I put there, always all CPUs are ticked in the Task manager... I am lost, as the last time I tried this...


Greetings, Chris

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

Share this post


Link to post

Hi, @SteveW,

Appreciate your explanation of the difference between locking frame vs unlimited. Based on that, I did some test under:

VS=on

Trippel buffer=on

frame=unlimited

No AM setting

 

My rig is pretty old today, which is:

CPU: i5 3570K @ 3.57GHz (Yes, I'm not a fan of OC though)

GPU: GTX970

RAM: 16G DDR3

HD: 256G SSD

Display: 60Hz

 

As a base line, I started at a small airport in default scenery with the default Cub, clear sky, no AI, no road traffic, no other background programs like Active sky/ProATC.

a) Under the lowest graphic setting, core 0 usage is 50%, core 1 usage is 25%, core 2 & core 3 usage is less than 5%.

b) Under a "moderate" graphic setting, core 0 usage rose up to 55% while usage of the other cores remain almost unchanged.

Please note that by saying "moderate", it contains 4xMSAA, 16xTexture Filtering, LOD=high, mesh resolution=5m, texture resolution=15cm, Dynamic lighting on, dynamic reflection/water/shadow/special effect = medium, scenery complexity/autogen density=sparse, autogen distance=low.

Among all the settings, I found scenery complexity, autogen density,  autogen distance are the biggest three killers of core 0 CPU usage while the others have much less impact.

Of course, just like you've said, as long as the core 0 usage is less than 100%, frame rate can keep synced with monitor refresh rate, in my case, 60fps.

 

Then, I switched the plane to the good old PMDG NGX, at the same location/weather and other non graphic setting, this time:

Even under the lowest graphic setting, core 0 usage is 100%, core 1 usage is 40%, core 2 & core 3 usage is less than 5%.

Of course, frame rate dropped to around 30-40. I didn't expect so much decreasing in performance. I think the reason is my CPU is too old. So my first question is:

Will it be any better on new platforms? For example, on a 8700K platform, under the same lowest graphic setting, the core 0 usage will be less than 100%, is that true?

If true, to what degree can it hold while tuning up the settings?

Again, based on the theory, I think it is the same question as:

On a modern platform, under the same scenario/graphic setting, can it hold 60 fps?

 

To continue my testing, I switched to Orbx KSAN with default cub,  clear sky, no AI, no road traffic, no other background programs like Active sky/ProATC.

a) Under the lowest graphic setting, core 0 usage is 50%, core 1 usage is 30%, core 2 & core 3 usage is less than 5%.

b) Under the same "moderate" graphic setting, core 0 usage rose up to 70% while usage of the other cores remain almost unchanged.

Again, the result is unexpected. It seems that the complex scenery add-on is not as "thirsty" as add-on planes. I didn't realize this until today....

 

 

 

  • Like 1

Share this post


Link to post
40 minutes ago, AnkH said:

Something I must be doing wrong. I now tried both lines in the link you provided, yet if I check via Task Manager on which processors the software runs, always all CPU's are marked. What am I doing wrong? My bat file now looks as follows:

CD /D "D:\HiFi\AS_P3Dv4"
C:\Windows\System32\cmd.exe /C start /affinity AA0 AS_P3Dv4.exe

I tried to play around with the HEX affinity mask, but whatever HEX value I put there, always all CPUs are ticked in the Task manager... I am lost, as the last time I tried this...

Always use a trusted app to test the setting - that's why I recommend dong your BAT for Notepad, check the result, looks good? Now exchange that for an app that you don't yet know how it might work.

So you may find the app you are trying to corral doesn't respond in the same way, it could be only part of the app or it might be under control in another way or by another program.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post
23 minutes ago, falconluan said:

Hi, @SteveW,

Appreciate your explanation of the difference between locking frame vs unlimited. Based on that, I did some test under:

VS=on

Trippel buffer=on

frame=unlimited

No AM setting

 

My rig is pretty old today, which is:

CPU: i5 3570K @ 3.57GHz (Yes, I'm not a fan of OC though)

GPU: GTX970

RAM: 16G DDR3

HD: 256G SSD

Display: 60Hz

 

As a base line, I started at a small airport in default scenery with the default Cub, clear sky, no AI, no road traffic, no other background programs like Active sky/ProATC.

a) Under the lowest graphic setting, core 0 usage is 50%, core 1 usage is 25%, core 2 & core 3 usage is less than 5%.

b) Under a "moderate" graphic setting, core 0 usage rose up to 55% while usage of the other cores remain almost unchanged.

Please note that by saying "moderate", it contains 4xMSAA, 16xTexture Filtering, LOD=high, mesh resolution=5m, texture resolution=15cm, Dynamic lighting on, dynamic reflection/water/shadow/special effect = medium, scenery complexity/autogen density=sparse, autogen distance=low.

Among all the settings, I found scenery complexity, autogen density,  autogen distance are the biggest three killers of core 0 CPU usage while the others have much less impact.

Of course, just like you've said, as long as the core 0 usage is less than 100%, frame rate can keep synced with monitor refresh rate, in my case, 60fps.

 

Then, I switched the plane to the good old PMDG NGX, at the same location/weather and other non graphic setting, this time:

Even under the lowest graphic setting, core 0 usage is 100%, core 1 usage is 40%, core 2 & core 3 usage is less than 5%.

Of course, frame rate dropped to around 30-40. I didn't expect so much decreasing in performance. I think the reason is my CPU is too old. So my first question is:

Will it be any better on new platforms? For example, on a 8700K platform, under the same lowest graphic setting, the core 0 usage will be less than 100%, is that true?

If true, to what degree can it hold while tuning up the settings?

Again, based on the theory, I think it is the same question as:

On a modern platform, under the same scenario/graphic setting, can it hold 60 fps?

 

To continue my testing, I switched to Orbx KSAN with default cub,  clear sky, no AI, no road traffic, no other background programs like Active sky/ProATC.

a) Under the lowest graphic setting, core 0 usage is 50%, core 1 usage is 30%, core 2 & core 3 usage is less than 5%.

b) Under the same "moderate" graphic setting, core 0 usage rose up to 70% while usage of the other cores remain almost unchanged.

Again, the result is unexpected. It seems that the complex scenery add-on is not as "thirsty" as add-on planes. I didn't realize this until today....

 

 

 

That's correct. Installing an addon that utilises complex dlls and gauges can bring the sim down in pace because those are run in the sim by the sim and take time directly proportionally away from the performance of the sim. dlls are easy to produce since they don't carry anything like the baggage of an exe. Not only that but these dlls often make a network connection SImConnect client to talk to the sim they are run by, seems like an odd way to do things but it makes it easy to add in that stuff.

Edited by SteveW

Steve Waite: Engineer at codelegend.com

Share this post


Link to post
30 minutes ago, SteveW said:

Always use a trusted app to test the setting - that's why I recommend dong your BAT for Notepad, check the result, looks good? Now exchange that for an app that you don't yet know how it might work.

So you may find the app you are trying to corral doesn't respond in the same way, it could be only part of the app or it might be under control in another way or by another program.

Ok, strange. Restarting Windows at least changed something. Now, ProATC/X and REX is firing up using the .bat file as it should and running only on the cores I defined. However, ActiveSky does NOT run only on the defined cores, but still on all available ones. I do not understand this...

Edited by AnkH

Greetings, Chris

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

Share this post


Link to post
19 minutes ago, SteveW said:

That's correct. Installing an addon that utilises complex dlls and gauges can bring the sim down in pace because those are run in the sim by the sim and take time directly proportionally away from the performance of the sim. dlls are easy to produce since they don't carry anything like the baggage of an exe. Not only that but these dlls often make a network connection SImConnect client to talk to the sim they are run by, seems like an odd way to do things but it makes it easy to add in that stuff.

So, can I understand that as even the most modern hardware doesn't hold up well on complex add-on planes(even NGX which is usually regard to be the frame friendly side)?

Majestic Dash 8 uses external system simulation, so it runs outside of p3d's compute cycle in core 0, that's why it's so frame friendly. Is my understanding correct? Thanks

Share this post


Link to post
1 hour ago, AnkH said:

Something I must be doing wrong. I now tried both lines in the link you provided, yet if I check via Task Manager on which processors the software runs, always all CPU's are marked. What am I doing wrong? My bat file now looks as follows:

CD /D "D:\HiFi\AS_P3Dv4"
C:\Windows\System32\cmd.exe /C start /affinity AA0 AS_P3Dv4.exe

I tried to play around with the HEX affinity mask, but whatever HEX value I put there, always all CPUs are ticked in the Task manager... I am lost, as the last time I tried this...

Hi Chris,

Nearly there! Just a wee problem with the syntax.

To change to another drive simply type D (or the drive letter of the Drive to which you wish to change) followed by a colon.

Then change to the 'AS_P3Dv4' directory by typing cd\HiFi\AS_P3Dv4

However, there is an easier way and much less likely to get you entangled in confusion.

Create your bat file in Notepad or Notepad++ and save it as, say, Active Sky.bat

Simply type (or copy and paste) the following:

C:\Windows\System32\cmd.exe /c start "Active Sky for P3D4" /affinity AA0 "D:\HiFi\AS_P3Dv4\AS_P3Dv4.exe"

Now start Active Sky and observe how it uses the Logical Processors in Windows Task Manager.. You might find that it does not need 4 LPs.

You have chosen to assign the Affinity Mask AA0 (hex)=2720 (Dec)=(10,10,10,10,00,00) to Active Sky. That's LP 5 ,7, 9 and 11 on 4 cores of your HT enabled 6-Cored CPU. This should work, but might not be ideal. Instead, I would experiment by 'restricting' Active Sky to using LPs on the last 1 or 2 Cores (4 and 5) and leave the rest for Prepar3D. That's assuming, of course, that you have determined an optimal Affinity Mask for use by Prepar3D.

Edit: I should have added that 'Active Sky for P3Dv4' does accept an AM assignment. On my i7-5960X with affinity F000 it has been assigned LPs 12-15 but is only using 13 and 15). Without the AM it is spread across the board.

Regards,

Mike

Edited by Cruachan
  • Like 2

Share this post


Link to post
6 minutes ago, falconluan said:

So, can I understand that as even the most modern hardware doesn't hold up well on complex add-on planes(even NGX which is usually regard to be the frame friendly side)?

Majestic Dash 8 uses external system simulation, so it runs outside of p3d's compute cycle in core 0, that's why it's so frame friendly. Is my understanding correct? Thanks

Yes, The MJC can be placed on whatever core you like.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post
18 minutes ago, Cruachan said:

Hi Chris,

Nearly there! Just a wee problem with the syntax.

There is no syntax problem in my .bat file, as executing the bat file correctly starts ActiveSky. I use three almost identical .bat files now, for ProATC/X, REX and ActiveSky, and only Active Sky is not limited to the wanted cores, both others are. And I have no idea why...

EDIT: I now used the string you provided. AS is still firing up, but still no AM set. I am lost...

Sure, I can limit the cores further down. I use an AM of 1365 for my 8700K with HT on, what would you suggest to be the best AM for those three addons?

Edited by AnkH

Greetings, Chris

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

Share this post


Link to post
4 minutes ago, AnkH said:

 what would you suggest to be the best AM for those three addons?

The AM should give add-on exe apps that use SimConnect at least two LPs (even if on the same core), away from the sim LPs if there are enough cores, or at least occupy cores that do not run time sensitive sim tasks.


Steve Waite: Engineer at codelegend.com

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