Sign in to follow this  
bbuckley

Affinity Mask and add-on starting sequence

Recommended Posts

Does it matter what sequence you start add-ons when running FSX with an AffinityMask and CPU HT on?

 

I've read hundreds of (confusing) discussions on AffinityMask and hyperthreading on current high end processors. 

 

I currently have my AF set to 244 on my system:

I7-4790K, ASUS Z97 Gamer, set to ASUS Optimal OC ~4.32GHz

GTX970

500GB SSD with WIN 8.1 & FSX core software installed on it, everything else on a 1TB HDD

 

I install REX4 TD SC textures then run ASN and FSX Flight (for ForeFlight) and Pilot Edge client, starting in that order, then I start FSX.  I fly with a lot of MegaScenery and a few intense payware airports like Latin VFR John Wayne.  With all that I get 30 - 60 FPS with FSX set to unlimited.  I get occasional texture drops or anomalies but not bad.

 

Bruce

 

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Does it matter what sequence you start add-ons when running FSX with an AffinityMask and CPU HT on?

Yes. Here's a background.

 

No AM or AM=0:

4 core = 1111

4 core HT on = 11,11,11,11 (showing HT pairs between commas)

 

 

HT Enabled; AM 170 or AM 85:

4 core HT on = 10,10,10,10

4 core HT on = 01,01,01,01

 

With 170 or 85 we present the sim with the same processor layout as HT off no AM. The only difference is that with HT enabled there is the slight performance benefit during process switching. Anyone reporting worse performance in this scenario has something wrong.

 

If the exe addons do not start on core zero (rightmost 01) then allow to start the main sim thread on core zero (shown with an AM=85 on LP0, or AM=170 on LP1).

 

If exe addons start before the sim on core zero, and there's no way around that, then we might think about moving the first sim LP to core 1, or in other words LP2 or LP3. We could do that with 116=(01,11,01,00) or 184=(10,11,10,00), which still presents 4 LPs (logical processors), but only groups threads 1 and 2 (from 0 to 3) together on a core, which run on core 2 (of 0 to 3) on LP4 and LP 5. This setup allows the sim to maximise throughput of core 2.

 

dll addons start up within the affinity of the sim.

Share this post


Link to post
Share on other sites

If exe addons start before the sim on core zero, and there's no way around that, then we might think about moving the first sim LP to core 1, or in other words LP2 or LP3. We could do that with 116=(01,11,01,00) or 184=(10,11,10,00), which still presents 4 LPs (logical processors), but only groups threads 1 and 2 (from 0 to 3) together on a core, which run on core 2 (of 0 to 3) on LP4 and LP 5. This setup allows the sim to maximise throughput of core 2.

So I think I understand at least 50% of what you said...  I changed AM to 116 and loaded up as above.  Then checking the resource monitor in Task Mgr I could see CPU 0 & 1 and 3, 7 (LP0 LP1 LP3 LP7?) all at low utilizations while LP4, 5 & 6 were high and LP2 next.  Overall CPU utilization was ~52% with fsx.exe ~42% and asn.exe and pe.exe low but next.  I couldn't determine which LPs each was running on.  Does any of this make sense?  And in any event, the FPS on the deck at John Wayne (intense textures) was 60 - 70 and steadier than before.  Very nice!

Share this post


Link to post
Share on other sites

I changed AM to 116...steadier than before.  Very nice!

Basically that's three cores properly distributed to the sim, and avoids core zero. Should always produce pretty good results. If 170 is not as good that would suggest exe addons would be using cores that the sim depends on. Generally when performance is suffering, the sim is forced to run its main thread, on a core with another interjecting process, or the threads are not distributed to four LPs.

 

..and yes you should see core 1 (second core) showing only one LP fully utilised - that's what you want, since otherwise you have an interjecting process sharing the bandwidth of that core.

Share this post


Link to post
Share on other sites

Basically that's three cores properly distributed to the sim, and avoids core zero. Should always produce pretty good results. If 170 is not as good that would suggest exe addons would be using cores that the sim depends on. Generally when performance is suffering, the sim is forced to run its main thread, on a core with another interjecting process, or the threads are not distributed to four LPs.

 

..and yes you should see core 1 (second core) showing only one LP fully utilised - that's what you want, since otherwise you have an interjecting process sharing the bandwidth of that core.

 

Steve,

I have never been able to quite get AM to produce a benefit with my 6-Core 3960k @ 4.7ghz in P3D or FSX. How can I ensure the LP's are being used correctly? If I run addons like ASN what would you recommend my AM be? 

Share this post


Link to post
Share on other sites

Steve,

I have never been able to quite get AM to produce a benefit with my 6-Core 3960k @ 4.7ghz in P3D or FSX. How can I ensure the LP's are being used correctly? If I run addons like ASN what would you recommend my AM be?

P3D/FSX, 6 core HT=OFF, AM=30=(011110)

P3D/FSX, 6 core HT=ON, AM=340=(00,01,01,01,01,00) or 680=(00,10,10,10,10,00)

 

that's 4 threads on 4 processors avoiding core 0 and core 5.

Share this post


Link to post
Share on other sites

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