Jump to content
Sign in to follow this  
angeli662

AffinityMask - Why?

Recommended Posts

On my P3D v4 without AM on a 8 core CPU the core 01 always runs about 40%  and the others around 100, so I decided to use AM=255  all cores but still core 01 around 40% could it be that is the way P3D v4 utilizes the preocessor and it doesn't matter what AM is in the config?


Asus Rampage VI Extreme Encore(water Cooled) EVGA RTX 3090 FTW3 Hybrid, 64 DD4 @ 2800 2 x 2x M.2 in raid 0.

 

Share this post


Link to post

That is because no AM specified with a four core+HT is equivalent to AM 0  is equivalent to AM 255  is equivalent to 11,11,11,11 in binary. And so you will see the sim task on LP 0 (LP zero is the binary digit '1' on the far right, which is the top left graph in Task Manager) shares core zero with the sim task on LP 1 (rightmost pair ',11'). This setup works OK but you can do better with AM=85 and keep addon exe apps on the last two cores, LPs 5 and 7.

  • Upvote 1

Steve Waite: Engineer at codelegend.com

Share this post


Link to post

Great example Steve (as always brother).

I've lost count of the number of times I've seen Affinity Mask explained as being read Left to Right, instead of Right to Left.

 

  • Upvote 1

Dave Hodges

 

System Specs:  I9-13900KF, NVIDIA 4070TI, Quest 3, Multiple Displays, Lots of TERRIFIC friends, 3 cats, and a wonderfully stubborn wife.

Share this post


Link to post
21 minutes ago, SteveW said:

That is because no AM specified with a four core+HT is equivalent to AM 0  is equivalent to AM 255  is equivalent to 11,11,11,11 in binary. And so you will see the sim task on LP 0 (LP zero is the binary digit '1' on the far right, which is the top left graph in Task Manager) shares core zero with the sim task on LP 1 (rightmost pair ',11'). This setup works OK but you can do better with AM=85 and keep addon exe apps on the last two cores, LPs 5 and 7.

Steve, this is a 8 core 16 thread no HT, are you saying AM=85 for this processor?  thanks


Asus Rampage VI Extreme Encore(water Cooled) EVGA RTX 3090 FTW3 Hybrid, 64 DD4 @ 2800 2 x 2x M.2 in raid 0.

 

Share this post


Link to post

Nope was thinking you were talking four core+HT as that's the norm for 8 LPs! But I see you have the 8 core HT disabled so 85 would actually work very nice. Four cores works well 01010101=85 and those addons would be well placed too. Since you have 8 unshared cores it's going to work great under all circumstances unless you turn on HT, then some kind of AM like 340 would be better.

 


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

...by the way No AM and AM=255 are still equivalent on 8 core HT Off as I stated above so no changes as you noticed. 8 core HT On no AM=AM=0=65535=11,11,11,11,11,11,11,11.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

Hi,

One question to Steve, like i read it, with 4 core HT disabled 15 would work nice?

 

Share this post


Link to post

Four core HT disabled no AM = 0 = 15 because you only have four binary digits.

 

..with HT off and 8 cores I would check out 01111110 = 126 (six cores used by sim) or 00111100 = 60 (four cores used) avoiding the first and last cores.

Even better! HT enabled and 00,01,01,01,01,01,01,00 = 5460 (six LPs) or 00,00,01,01,01,01,00,00 = 1360 (four LPs).


Steve Waite: Engineer at codelegend.com

Share this post


Link to post
10 minutes ago, SteveW said:

Nope was thinking you were talking four core+HT as that's the norm for 8 LPs! But I see you have the 8 core HT disabled so 85 would actually work very nice. Four cores works well 01010101=85 and those addons would be well placed too. Since you have 8 unshared cores it's going to work great under all circumstances unless you turn on HT, then some kind of AM like 340 would be better.

 

Thanks, Steve I will give a try HT on AM=340


Asus Rampage VI Extreme Encore(water Cooled) EVGA RTX 3090 FTW3 Hybrid, 64 DD4 @ 2800 2 x 2x M.2 in raid 0.

 

Share this post


Link to post

01111110 = 126 or 00111100 = 60 would be the first I would try with HT Off and 8 cores.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

Steve can you agree to this in difference HT on off in terms of raw CPU power.

Lot here tinkering they get the same power on 4core CPU with HT on as with a 8core CPU with HT off.

The gain is for a 4core intel cpu is approx 27% not 100% with HT on even more on the new Amd Ryzen 35%

Drawbacks single core performance is slightly higher with ht off with same CPU frq 1.5%

Heat you can have up to 20-25c higher CPU temp , mostly for the AVX instruktions in flight with P3dV4 not seen that in P3dv3 only on loading flight.

Not against HT , very interested to see high clocked 7820x 7900x with ht off  in P3DV4

Share this post


Link to post

Sooo... With a Core i7 4 core with HT on, an Affinity Mask of 85 would be best?


Best regards,
--Anders Bermann--
____________________
Scandinavian VA

Pilot-ID: SAS2471

Share this post


Link to post
4 hours ago, angeli662 said:

On my P3D v4 without AM on a 8 core CPU the core 01 always runs about 40%  and the others around 100, so I decided to use AM=255  all cores but still core 01 around 40% could it be that is the way P3D v4 utilizes the preocessor and it doesn't matter what AM is in the config?

I am getting 100% load on ALL cores and threads with my i7 6700K @ 4,5 ghz. This is when the AM for all cores is set. So I guess when i9 10-core processors come out. I will buy such one for P3D V4. @4,0 ghz it should run quite nicely.


I9 12900K @ 5.1ghz P-cores/ 4.0 ghz E-cores fixed HT off / Corsair iCue H150i Capellix Cooler/ MSI Z690 CARBON WiFi / 32GB Corsair DDR5 RAM @ 5200 mhz XMP on / 12GB MSI 4090 RTX Ventus 3 / 7,5 total TB SSD (2+2+2+1+0,5 all NVMe)/ PSU 850W Corsair / 27" (1080P)

Share this post


Link to post
38 minutes ago, westman said:

Steve can you agree to this in difference HT on off in terms of raw CPU power.

Lot here tinkering they get the same power on 4core CPU with HT on as with a 8core CPU with HT off.

The gain is for a 4core intel cpu is approx 27% not 100% with HT on even more on the new Amd Ryzen 35%

Drawbacks single core performance is slightly higher with ht off with same CPU frq 1.5%

Heat you can have up to 20-25c higher CPU temp , mostly for the AVX instruktions in flight with P3dV4 not seen that in P3dv3 only on loading flight.

Not against HT , very interested to see high clocked 7820x 7900x with ht off  in P3DV4

There's a difference in requirements between using the CPU overclocked HT Off as very high frequency may overcome the loss in HT performance., but most systems are relaxed and are not run at such high frequencies, HT makes up for that. Heat related issues can be associated with HT enabled, overclock should be moderated to accommodate HT enabled.

Another thing to note is that the P3D type app (D3D sim) is different to the Handbrake type app (video encode) which would utilise all LPs similarly and work faster and hotter with HT enabled, but P3D splits out work from the main process and each are differing in requirements, and monolithic - when P3D is split into four the first two directly concerned with the rendering stage become leanest preferring a core to themselves. Both apps would utilise all LPs available if unmasked - Handbrake would gain from HT using all LPs and wasting no cycles, where P3D without a mask will not since it will congregate threads onto the same cores when they are actually designed to split work out over more cores. The HT Logical Processor fools these apps as they are seen as full cores each, with P3D we help it out with the AM and that is essential to manage heat and power use.


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

...the moral of the story is that if we are going for fps world records then perhaps turn off HT. Otherwise turn on HT and moderate the overclock to accommodate it. With HT enabled literally hundreds of threads switching are consumed more readily even more so on an 8 core, but remember that some apps like P3D are provided with the AM setting for a real reason.

To turn off the expensive HT mode is to lose a load of throughput especially in networking and I/O which is highly threaded in Windows. What makes sense to me is to work out how to use HT to its advantage not turn it off, takes a little more care that's all.


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