Jump to content
Sign in to follow this  
Cruachan

Using Loading Times to determine Affinity Mask

Recommended Posts

Hi,
 
With all the discussions surrounding the correct choice of Affinity Mask for Prepar3D, some of you might find what follows to be helpful. Credit goes to Steve as his posts in another recent thread prompted me to devise this testing method.
 
Loading Times (Prepar3D v4.3)
 
Intel i7-5960X [8 Physical Cores, 16 Logical Processors (LP)]
 
HYPERTHREADING = ENABLED
 
All Addons that load with the simulator: Disabled
All items in the two DLL.XML and the two EXE.XML files (found in AppData and ProgramData folders): Disabled
 
To speed up testing it can be helpful to disable third party scenery products, including ORBX airports and airfields. ORBX Global, Vector and Regions can be left enabled as can any mesh products.
 
Show Scenario Startup Screen: Disabled
Double-click Prepar3D icon: START Loading Time.
Prepar3D Default Scenario appears on screen: STOP Loading Time.
All tests performed in sequence and Loading Times were determined by using a stop-watch.
I continued to test Loading Times for each Affinity Mask until I achieved 3 matching consecutive results.
 
a) Prepar3D v4.3 Splash-screen loads and displays in 11 seconds.
b) Loading scenery objects appears in 26 seconds.
LP 0 is used exclusively while loading a) and up to the point when b) appears.
 
LP 0 = First bit starting from the right of pattern (*)
AM = Affinity Mask
 
#LPs     AM (Binary)                                       AM (Integer)                    Time to Load (secs)
 
1           00,00,00,00,00,00,00,01*                           1                                      95, 95, 95
4YYA2Hx.jpg
 
2          00,00,00,00,00,00,01,01                              5                                     92, 92, 92
5eJBWkq.jpg
 
3         00,00,00,00,00,00,11,01                              13                                    93, 93, 93
dlbajlq.jpg
 
4         00,00,00,00,00,01,11,01                              29                                    78, 78, 78
hBNu5IZ.jpg
 
5         00,00,00,00,00,11,11,01                              61                                    77, 77, 77
l7ucDZi.jpg
 
6         00,00,00,00,01,11,11,01                           125                                     71, 71, 71
Mc5SlnY.jpg
 
7         00,00,00,00,11,11,11,01                           253                                     68, 68, 68
M1hndCV.jpg
 
8         00,00,00,01,11,11,11,01                           509                                     65, 65, 65
Qxhe0A8.jpg
 
9         00,00,00,11,11,11,11,01                         1021                                     64, 64, 64
e3DzYra.jpg
 
10       00,00,01,11,11,11,11,01                         2045                                     63, 63, 63
X4TYUpw.jpg
 
11       00,00,11,11,11,11,11,01                          4093                                    61, 61, 61
TVINO8S.jpg
 
12       00,01,11,11,11,11,11,01                         8189                                     61, 61, 61
iG8cLvX.jpg
 
13       00,11,11,11,11,11,11,01                       16381      <<<<<                    60, 60, 60
xwXO53h.jpg
 
14       01,11,11,11,11,11,11,01                        32765                                    60, 60, 60
QFFWeBx.jpg
 
15       11,11,11,11,11,11,11,01                        65533                                    60, 60, 60
ujDd5S2.jpg
 
In use prior to testing:
 
8        00,00,11,11,01,01,01,01                           3925                                    65, 65, 65
182xHk6.jpg
 
8        01,01,01,01,01,01,01,01                        21845                                     61, 61, 61
Nrnwsuq.jpg
 
6        00,00,01,01,01,01,01,01                           1365                                    66, 66, 66
dAMStzM.jpg
 
Conclusion: Based on these Loading Times results, Affinity Mask 16381 [leaving 1 Physical Core (2LPs) free] appears to be optimal for my i7-5960X. After an hour of initial in-flight testing the results are very encouraging. I feel that this same technique could be used successfully to identify the best Affinity Mask value for other multi-cored processors.
 
Edit: Display page in maximized window to avoid any formatting issues with Loading Time results.
 
Regards,
Mike
  • Like 4
  • Upvote 1

Share this post


Link to post

Very well done Mike and thanks for sharing your findings + graphs with us .


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

Hi Gerard,

Thank you! Thought it might help clear up some of the confusion.

Regards.

Mike

———————————————————————————

Supplemental (1):

To facilitate changes, testing and retesting, all calculations were done in advance using the excellent utility provided by the Gatwick Flight Simulation Group at:

http://www.gatwick-fsg.org.uk/affinitymask.aspx?SubMenuItem=hardware

These (affinity mask values) were all entered into my Prepar3D.cfg configuration file and edited using Notepad++. As you can see, the only Affinity Mask line active is AffinityMask=16381 which provides the best scenery/terrain/autogen loading speeds for my installation and hardware.

n24D68Y.jpg

Mike

 

Share this post


Link to post

Hi Mike - this is an interesting approach.  Why is logical core 2 on processor 0 always off (xx,xx,xx,xx,xx,xx,xx,0,1)?

Regards,

Paul.


Paul Davies.

Share this post


Link to post

Intresting, this test   8        01,01,01,01,01,01,01,01                        21845                                     61, 61, 61 , its as you run HT OFF ?

the best you have was 60 but if you can clockk cpu 200mhz higher with HT off you have 58sec , how to judge that in to any conclution for performance.

did a test with same settings (mine that a run the sim) mesure from click on p3d icon and stop when ezca profile is loaded in the airplane.

4.4ghz    62sec    10 Physical Cores

4.7ghz    56sec    10 Physical Cores

5.0ghz    52sec     10 Physical Cores

cpu 7920X (12 Physical Cores, 24 Logical Processors cpu)  5.0 ghz 10Physical Cores all cores synced, 2 cores disabled in bios, HT off.

4.7ghz  with 12 Physical Cores, 24 Logical Processors  or to say HT on, time 56sec

With HTon and all cores synced max is 4.8ghz on this cpu , can run type 4.9ghz on 2cores and 4.6 on 10cores but the loadtimes is worse , i dont like to run different  cpu speeds on cores , my pc work best with 5ghz HT off ,10cores with 2 cores disabled , this is my personal thoughts and it works for me, can be differnt on another system.

Edited by westman

Share this post


Link to post

Interesting stats Mike, but surely what this shows is only which AM results in the lowest scenery loading time.  The more important data would be performance in sim for each of these AMs re frame-times?  Im not sure that AMs good for scenery loading are necessarily just as good for flying..?

  • Upvote 1

Kevin Firth - i9 10850K @5.2; Asus Maximus XII Hero; 32Gb Cas14 3200 DDR4; RTX3090

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

xaP1VAU.png

Share this post


Link to post
9 minutes ago, kevinfirth said:

Interesting stats Mike, but surely what this shows is only which AM results in the lowest scenery loading time.  The more important data would be performance in sim for each of these AMs re frame-times?  Im not sure that AMs good for scenery loading are necessarily just as good for flying..?

I think it was Steve W that suggested this approach. 

Share this post


Link to post

Thanks for doing this testing, Mike.  I'm ready to build a new system, and had considered going with the current 8086K (6C/12T) to save some money.  But I wondered if P3Dv4 could actually use more cores (I thought so but convincing tests simply weren't available) and if I should wait for the 9000 series CPU's soon to be released.  You've now made the decision easy... I'll be waiting and then biting the bullet to pay more for the new CPU's.  You've proven it will be money well spent!

Cheers! 🍻

Greg

Share this post


Link to post
1 hour ago, kevinfirth said:

Interesting stats Mike, but surely what this shows is only which AM results in the lowest scenery loading time.  The more important data would be performance in sim for each of these AMs re frame-times?  Im not sure that AMs good for scenery loading are necessarily just as good for flying..?

Agreed. I'm not sure how this relates to anything except loading times?

Share this post


Link to post
2 hours ago, westman said:

Intresting, this test   8        01,01,01,01,01,01,01,01                        21845                                     61, 61, 61 , its as you run HT OFF ?

the best you have was 60 but if you can clockk cpu 200mhz higher with HT off you have 58sec , how to judge that in to any conclution for performance.

did a test with same settings (mine that a run the sim) mesure from click on p3d icon and stop when ezca profile is loaded in the airplane.

4.4ghz    62sec    10 Physical Cores

4.7ghz    56sec    10 Physical Cores

5.0ghz    52sec     10 Physical Cores

cpu 7920X (12 Physical Cores, 24 Logical Processors cpu)  5.0 ghz 10Physical Cores all cores synced, 2 cores disabled in bios, HT off.

4.7ghz  with 12 Physical Cores, 24 Logical Processors  or to say HT on, time 56sec

With HTon and all cores synced max is 4.8ghz on this cpu , can run type 4.9ghz on 2cores and 4.6 on 10cores but the loadtimes is worse , i dont like to run different  cpu speeds on cores , my pc work best with 5ghz HT off ,10cores with 2 cores disabled , this is my personal thoughts and it works for me, can be differnt on another system.

was not able to edit:

did one more test with 5.1ghz  10cores Ht off thats maxstable frq with this cpu , i run it at 5ghz with less vcore thats my allday setting

the time 51.5sec , the loadtimes seems to be linear to the frq. 12corres with ht on 24 LP doing nothing to the loadtimes on this cpu

shall be very intresting with the new 9900k or 9700k at + 5.4ghz

Edited by westman

Share this post


Link to post
1 hour ago, GHarrall said:

I think it was Steve W that suggested this approach. 

I'm in dialog with Steve :) I would take his learned opinion over mine any day of the week, but I do know from our conversations that there is a limit on how many extra cores are beneficial when flying, that limit being where adding more cores creates more performance overheads than actual benefits.   This may of course be different for separate PCs or indeed in separate usecases on the same PC!  My point was really curiosity about whether the AM sweetspot for scenery loading times is the same as for actual flying :)

Edited by kevinfirth

Kevin Firth - i9 10850K @5.2; Asus Maximus XII Hero; 32Gb Cas14 3200 DDR4; RTX3090

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

xaP1VAU.png

Share this post


Link to post
16 hours ago, Cruachan said:
Hi,
 
With all the discussions surrounding the correct choice of Affinity Mask for Prepar3D, some of you might find what follows to be helpful. Credit goes to Steve as his posts in another recent thread prompted me to devise this testing method.
 
Loading Times (Prepar3D v4.3)
 
Intel i7-5960X [8 Physical Cores, 16 Logical Processors (LP)]
 
HYPERTHREADING = ENABLED
 
All Addons that load with the simulator: Disabled
All items in the two DLL.XML and the two EXE.XML files (found in AppData and ProgramData folders): Disabled
 
To speed up testing it can be helpful to disable third party scenery products, including ORBX airports and airfields. ORBX Global, Vector and Regions can be left enabled as can any mesh products.
 
Show Scenario Startup Screen: Disabled
Double-click Prepar3D icon: START Loading Time.
Prepar3D Default Scenario appears on screen: STOP Loading Time.
All tests performed in sequence and Loading Times were determined by using a stop-watch.
I continued to test Loading Times for each Affinity Mask until I achieved 3 matching consecutive results.
 
a) Prepar3D v4.3 Splash-screen loads and displays in 11 seconds.
b) Loading scenery objects appears in 26 seconds.
LP 0 is used exclusively while loading a) and up to the point when b) appears.
 
LP 0 = First bit starting from the right of pattern (*)
AM = Affinity Mask
 
#LPs     AM (Binary)                                       AM (Integer)                    Time to Load (secs)
 
1           00,00,00,00,00,00,00,01*                           1                                      95, 95, 95
4YYA2Hx.jpg
 
2          00,00,00,00,00,00,01,01                              5                                     92, 92, 92
5eJBWkq.jpg
 
3         00,00,00,00,00,00,11,01                              13                                    93, 93, 93
dlbajlq.jpg
 
4         00,00,00,00,00,01,11,01                              29                                    78, 78, 78
hBNu5IZ.jpg
 
5         00,00,00,00,00,11,11,01                              61                                    77, 77, 77
l7ucDZi.jpg
 
6         00,00,00,00,01,11,11,01                           125                                     71, 71, 71
Mc5SlnY.jpg
 
7         00,00,00,00,11,11,11,01                           253                                     68, 68, 68
M1hndCV.jpg
 
8         00,00,00,01,11,11,11,01                           509                                     65, 65, 65
Qxhe0A8.jpg
 
9         00,00,00,11,11,11,11,01                         1021                                     64, 64, 64
e3DzYra.jpg
 
10       00,00,01,11,11,11,11,01                         2045                                     63, 63, 63
X4TYUpw.jpg
 
11       00,00,11,11,11,11,11,01                          4093                                    61, 61, 61
TVINO8S.jpg
 
12       00,01,11,11,11,11,11,01                         8189                                     61, 61, 61
iG8cLvX.jpg
 
13       00,11,11,11,11,11,11,01                       16381      <<<<<                    60, 60, 60
xwXO53h.jpg
 
14       01,11,11,11,11,11,11,01                        32765                                    60, 60, 60
QFFWeBx.jpg
 
15       11,11,11,11,11,11,11,01                        65533                                    60, 60, 60
ujDd5S2.jpg
 
In use prior to testing:
 
8        00,00,11,11,01,01,01,01                           3925                                    65, 65, 65
182xHk6.jpg
 
8        01,01,01,01,01,01,01,01                        21845                                     61, 61, 61
Nrnwsuq.jpg
 
6        00,00,01,01,01,01,01,01                           1365                                    66, 66, 66
dAMStzM.jpg
 
Conclusion: Based on these Loading Times results, Affinity Mask 16381 [leaving 1 Physical Core (2LPs) free] appears to be optimal for my i7-5960X. After an hour of initial in-flight testing the results are very encouraging. I feel that this same technique could be used successfully to identify the best Affinity Mask value for other multi-cored processors.
 
Edit: Display page in maximized window to avoid any formatting issues with Loading Time results.
 
Regards,
Mike

An OK test Mike but not the way it should be done precisely.

Not taking note of single LP performance growth is a mistake.

Go first by increasing by '01's and not '11's.

When you have all '01's only NOW you can you start adding '11's but only those that can do it with proper performance AND in so doing looking to reduce some '01's on some cores to leave free.

Sorry to sound dismissive, it's a good effort. I'm here to convey this knowledge fully and so hopefully you can try that next.

Regards

Steve.

 

 

 

  • Like 1

Steve Waite: Engineer at codelegend.com

Share this post


Link to post
4 hours ago, SteveW said:

When you have all '01's only NOW you can you start adding '11's but only those that can do it with proper performance AND in so doing looking to reduce some '01's on some cores to leave free.

Hi Steve,

Hoped you would contribute to this thread - thanks! I have no illusions about all this and had a feeling that my testing was likely to be incomplete. However, my post was more to introduce the concept of a methodical approach aimed at determining the best user choice of Affinity Mask rather than the somewhat haphazard approach adopted hitherto by so many others, myself included. Subjective impressions, as regards performance, are complicated by many variables and consequently outcomes are unreliable and, frankly, inconsistent....hence the recurring debates on these forums.

My initial testing results are suggesting the choice of Affinity Mask to be optimal based on best loading times in a controlled sim environment. However, 6/7 of the i7-5960X’s 8 cores are fully engaged leaving only one core free and this may not be ideal.

What is apparent is that as more LPs are assigned to the loading of scenery elements the greater the spread of such workload over these LPs with the reduced likelihood of them ever maxing out and then only for very brief periods. There is no doubt that Prepar3D will use all cores/LPs made available to it. However, there appears to be an optimum number beyond which further performance improvements are unlikely and, indeed, may prove to be counterproductive.

Prior to testing I was using an Affinity Mask (3925) which seemed to deliver good performance and yet I was experiencing extended pauses in relatively few, but repeatable, situations followed by periods of heavy stuttering. This coincided with LP 0 and the other active LPs to lock out in the maxed state along with the coincident dramatic reduction in GPU usage. This resolved spontaneously after a few seconds and the sim again proceeds normally. I am not experiencing these issues with Affinity Mask 16381 and performance thus far is very good. All of which leads me to believe I may be on the right track. 

I will continue testing along the lines you have suggested. But, before doing so could I ask you to explain what I should be looking out for before starting to add the ‘11’s? I  am assuming I should continue the same testing method as outlined in my original post. Should I be identifying those ‘01’s that appear to be exhibiting the greatest activity, and concentrate on those while, at the same time, ignoring cores with LPs that are less well performing, but still leave the latter in the mix, or take them out of the equation altogether?

Regards,

Mike

Share this post


Link to post

"However, there appears to be an optimum number beyond which further performance improvements are unlikely and, indeed, may prove to be counterproductive. "

Thank you Mike. I have been saying all along since time immemorial. The no-AM guys are dead in the water.

 

OK then Mike, consider this going forward:

 

When doing these tests we need to be aware that the process layout configuration changes when we change the number of available LPs. We can see the usual tasks fan out in the Task Manager CPU Logical Processor display as we enable cores.

So we usually see the rightmost LP lit up the most when we disable VSync (VSync=Off in P3D Display Settings that is) with Unlimited on the fps slider and have high enough settings.

We see most LPs light up fully when loading the scenario and drop back as the sim settles. We can see the effect of changing our FFTF cfg value there.

We also see that some LPs only run 30% or so after the sim settles.

A mistake commonly made is to assume that just because a process uses less than 30% does not mean it can be shared without care. Put it this way, whenever that core is occupied by other processes even with only that meagre 20% process is interrupted.

 

So in effect we have a simple test - how long the scenario loads.. But fps is different and a red herring.

All we can do with fps is measure the consistency and as you mention before I provide the best tool available for assessing that. So far I have more than enough correspondence to make posts here confidently.

 

Good luck with further testing.

 

 


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