Jump to content
Sign in to follow this  
MammyJammy

New P3D 5.3+ Affinity Mask Calculator

Recommended Posts

3 minutes ago, GSalden said:

Hoe about a 12900K cpu ?

8 performance cores @ 5.2-5.5 Ghz

8 efficiency cores @ 3.9 Ghz

That’s an odd CPU with Efficiency Cores. No idea. @Rob_Ainscoughmight know.

Regarding the OS and what it uses, I’m just going off the advice posted here.


Ray (Cheshire, England).
System: P3D v5.3HF2, Intel i9-13900K, MSI 4090 GAMING X TRIO 24G, Crucial T700 4Tb M.2 SSD, Asus ROG Maximus Z790 Hero, 32Gb Corsair Vengeance DDR5 6000Mhz RAM, Win 11 Pro 64-bit, BenQ PD3200U 32” UHD monitor, Fulcrum One yoke.
Cheadle Hulme Weather

Share this post


Link to post

Isn't that old joke more like this ? :-

There are only 10 types of people in the world – those who understand binary, and those who don’t.

  • Upvote 1

Share this post


Link to post
1 minute ago, Sparkrite said:

Isn't that old joke more like this ? :-

There are only 10 types of people in the world – those who understand binary, and those who don’t.

You are entirely correct on that. 


Richard

7950x3d   |   32Gb 6000mHz RAM   |   8Tb NVme   |   RTX 4090    |    MSFS    |    P3D    |      XP12  

Share this post


Link to post

With version 5.3 my interest in P3D has rekindled. Got to say I like it. One thing that stands out to me is the AA performance. Last time I used P3D (I guess that might have been v 5.1) the AA was absolutely horrendous. Shimmering no matter what; especially at night. I have none of that now. I have been impressed by 5.3 to the point I am contemplating the CS 733 (would like to know from you guys if it is decent enough.. 😉). Earlier today I flew into KBFI overflying KSEA (all stock) with solid FPS (and settings) in the PMDG777. At night. Sure. There is no denying p3d is orders of magnitude behind "the other" sim in the GFX dpt, but it was really enjoyable non the less. I think I might like it here while I wait half an eternity for something nice in the 7XX family joins the party in MSFS. 


Richard

7950x3d   |   32Gb 6000mHz RAM   |   8Tb NVme   |   RTX 4090    |    MSFS    |    P3D    |      XP12  

Share this post


Link to post
14 minutes ago, Ray Proudfoot said:

That’s an odd CPU with Efficiency Cores. No idea. @Rob_Ainscoughmight know.

Regarding the OS and what it uses, I’m just going off the advice posted here.

If you enter in the 16 cores and 24 threads of the 12900K into the tool I have built and linked, it will label the cores with performance, HT/SMT, and efficiency correctly.  From there you can use a preset or manually configure until your heart's content.

Edited by MammyJammy
clarity

Share this post


Link to post
1 hour ago, TomCYYZ said:

I would never have known to come up with "P3DCoreAffinityMask=1020". Would that have been derived from the "Calculator" if I knew what I was doing? This makes the whole "Affinity mask" subject so much easier for me. I will give this a go.

Yes, the tool calculates out the Affinity Masks converting binary into the proper order (last-to-first) and then switching to the decimal value (Base-2 to Base-10 conversion).  It also sets the XThreadSchedulers relative to the masks (you can move them around if you'd like - point being you don't need to worry about the numbers themselves).  All you need to do is point-and-click with how you want to set each core.  You can select a preset and then customize from there.

For your CPU, I entered in 6 core, 12 logical processors and clicked begin.  I clicked the first core free preset, then using the radio buttons selected the P3D Core Mask and simply clicked on the last physical core and HT core to remove the mask from it.  It's pretty quick and easy and looks like this when done:

spacer.png

 

 

  • Like 1
  • Upvote 2

Share this post


Link to post
21 minutes ago, Sparkrite said:

Isn't that old joke more like this ? :-

There are only 10 types of people in the world – those who understand binary, and those who don’t.

Sounds about right. It was a long time ago.


Ray (Cheshire, England).
System: P3D v5.3HF2, Intel i9-13900K, MSI 4090 GAMING X TRIO 24G, Crucial T700 4Tb M.2 SSD, Asus ROG Maximus Z790 Hero, 32Gb Corsair Vengeance DDR5 6000Mhz RAM, Win 11 Pro 64-bit, BenQ PD3200U 32” UHD monitor, Fulcrum One yoke.
Cheadle Hulme Weather

Share this post


Link to post
9 minutes ago, MammyJammy said:

Yes, the tool calculates out the Affinity Masks converting binary into the proper order (last-to-first) and then switching to the decimal value (Base-2 to Base-10 conversion).  It also sets the XThreadSchedulers relative to the masks (you can move them around if you'd like - point being you don't need to worry about the numbers themselves).  All you need to do is point-and-click with how you want to set each core.  You can select a preset and then customize from there.

For your CPU, I entered in 6 core, 12 logical processors and clicked begin.  I clicked the first core free preset, then using the radio buttons selected the P3D Core Mask and simply clicked on the last physical core and HT core to remove the mask from it.  It's pretty quick and easy and looks like this when done:

 

 

 

Have to say a great tool, thank you appreciated  🙌


 

André
 

Share this post


Link to post
39 minutes ago, MammyJammy said:

If you enter in the 16 cores and 24 threads of the 12900K into the tool I have built and linked, it will label the cores with performance, HT/SMT, and efficiency correctly.  From there you can use a preset or manually configure until your heart's content.

That indeed is working.

However I prefer not to use HT on as my experience with my former 14 core cpu was that with that many cores HT is bringing performance down. 

Is there a way to use the tool for a 12900K with HT off ? 
 

And it would be nice if one could set non P3D cores too (for addon apps). The table cell part then would need an extra grey part.

Thanks 

 

Edited by GSalden

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
27 minutes ago, GSalden said:

Is there a way to use the tool for a 12900K with HT off ? 

Yep - Just enter in 16 cores/16 threads.  It won't label the perf./efficiency cores (it has no way of knowing it's a 12900K as if the cores/threads are equal, there's no way to distinguish different core types).  The efficiency cores on the 12X000 processors are the last set of cores.  For the 12900K, it's the last 8.  I have a 12900K with HT off and run with the following:

[JobScheduler]
AffinityMask=65535
P3DCoreAffinityMask=65534
MainThreadScheduler=2
RenderThreadScheduler=0
FrameWorkerThreadScheduler=5

I have moved the ThreadSchedulers around to the coolest and highest frequency cores of my CPU.  Yours will differ but the presets in the tool will assign reasonable cores.

 

28 minutes ago, GSalden said:

And it would be nice if one could set non P3D cores too (for addon apps). The table cell part then would need an extra grey part.

It supports this.  Using the radio button for the P3D affinity mask (blue) you can turn off cores from P3D all together.  There's some recommendations in this thread from Rob A. to not do so, but the tool and the Prepar3D.cfg both support this.  Otherwise you can limit the P3DCoreAffinityMask (green) as a subset of the AffinityMask such that other add-ons in the P3D process space are on cores separate from the primary P3D processes (with limitations on CPU thread scheduling and how the add-ons are written).

Share this post


Link to post
14 minutes ago, MammyJammy said:

Yep - Just enter in 16 cores/16 threads.  It won't label the perf./efficiency cores (it has no way of knowing it's a 12900K as if the cores/threads are equal, there's no way to distinguish different core types).  The efficiency cores on the 12X000 processors are the last set of cores.  For the 12900K, it's the last 8.  I have a 12900K with HT off and run with the following:

[JobScheduler]
AffinityMask=65535
P3DCoreAffinityMask=65534
MainThreadScheduler=2
RenderThreadScheduler=0
FrameWorkerThreadScheduler=5

I have moved the ThreadSchedulers around to the coolest and highest frequency cores of my CPU.  Yours will differ but the presets in the tool will assign reasonable cores.

 

It supports this.  Using the radio button for the P3D affinity mask (blue) you can turn off cores from P3D all together.  There's some recommendations in this thread from Rob A. to not do so, but the tool and the Prepar3D.cfg both support this.  Otherwise you can limit the P3DCoreAffinityMask (green) as a subset of the AffinityMask such that other add-ons in the P3D process space are on cores separate from the primary P3D processes (with limitations on CPU thread scheduling and how the add-ons are written).

Thanks for explaining. Great tool 👍


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
4 hours ago, Ray Proudfoot said:

@TomCYYZ, it’s easy if you understand binary. 0=off; 1=on.

On your 12 virtual cores for each one to be on the binary value is:-

111111111111

We read binary values from right to left. The first decimal equivalent value =1; the second=2; the third is 4. Each subsequent value is double the previous one. In a 12 virtual core (VC) CPU the last number is 2048. Or...

2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1.

Where all 12 VCs are to be used just add up the numbers above and you get 4095.

So if we want the first two and last two virtual cores to be off we ignore 1, 2, 1024 and 2048. Adding up the remaining numbers gives 1020. Convert that to binary gives:-

001111111100

So the first pair are off as are the last pair. All the other cores are on. When Hyperthreading is enabled in the BIOS each pair of virtual cores should be treated the same. So don’t have one on and the other off.

Hope that helps. There’s an old joke about binary. Only 10 people in the world understand it. 🤣

Of course you don’t need to work it out manually. The programmer mode of the Windows calculator does it for you. Switch to BIN mode and enter the binary for each VC and when you press DECimal the answer is provided.

This is awesome Ray! Thank you  for taking the time to educate me. An excellent presentation, well said and easy to understand, even for a layman like myself. Very much appreciated.

Regards,

Tom


i913900KF (5.8GHz) | Case: Fractal PopAir RGB I MSI Z790-VC | MSI Gaming RTX 4070Ti Super 16GB | Kingston Fury Beast 32GB DDR5 | SOLIDIGM P41 Plus 2TB NVMe M.2 SSD | Samsung SSD 870 EVO 2TB | Thermalright Frozen Notte 240 MM Liquid Cooling | Samsung 41" Monitor 1920 x 1080 60Hz | Honeycomb Alpha & Bravo | Logitech G Pro pedals | Tobii EyeTracker | 850W Thermaltake 80+ GOLD |

Share this post


Link to post
3 hours ago, MammyJammy said:

Yes, the tool calculates out the Affinity Masks converting binary into the proper order (last-to-first) and then switching to the decimal value (Base-2 to Base-10 conversion).  It also sets the XThreadSchedulers relative to the masks (you can move them around if you'd like - point being you don't need to worry about the numbers themselves).  All you need to do is point-and-click with how you want to set each core.  You can select a preset and then customize from there.

For your CPU, I entered in 6 core, 12 logical processors and clicked begin.  I clicked the first core free preset, then using the radio buttons selected the P3D Core Mask and simply clicked on the last physical core and HT core to remove the mask from it.  It's pretty quick and easy and looks like this when done:

spacer.png

 

 

This is awesome! Thank you so much for your time and patience in providing a very concise and easy to understand explanation. You’ve made my P3D life easier and more enjoyable.

Regards


i913900KF (5.8GHz) | Case: Fractal PopAir RGB I MSI Z790-VC | MSI Gaming RTX 4070Ti Super 16GB | Kingston Fury Beast 32GB DDR5 | SOLIDIGM P41 Plus 2TB NVMe M.2 SSD | Samsung SSD 870 EVO 2TB | Thermalright Frozen Notte 240 MM Liquid Cooling | Samsung 41" Monitor 1920 x 1080 60Hz | Honeycomb Alpha & Bravo | Logitech G Pro pedals | Tobii EyeTracker | 850W Thermaltake 80+ GOLD |

Share this post


Link to post

on the p3d forum rob posted an informative video on using the process lasso program. It is instructive, but it is still having to tinker to have a game that runs fully. I understand better why msfs is so closed to external program developers.


Frédéric Giraud

Share this post


Link to post

i suppose someone's checked navigraph simlink ?


MSI X670E Carbon Wifi, 7800X3D, TUF 4090 , X4 NVME's. OS on a 2TB 980 Pro , MSFS on " 2TB WD Black , G Skill F5 32 GB RAM ( 6000 allegedly) Corsair RM1000 PSU, Artic Freezer 280 AIO Cooler . Phanteks P600s Case ,TCL QM8B 50" 120/144 Hz TV, Warthog Stick and TCA Captains throttle ( full pack) Logitech / Saitek Rudder Pedals , Streamdeck XL / Streamdeck +

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