Jump to content
Sign in to follow this  
MammyJammy

New P3D 5.3+ Affinity Mask Calculator

Recommended Posts

Hi All,

With the new release of P3D 5.3 and the increase in settings for the [JobScheduler], combined with the myriad of threads out here about setting affinity masks and how to figure it out, I threw together a new calculator for these settings.  I hope it's easier to use in that all you do is enter your core count/logical processors, then basically click to select what you want each core to do.  Think of it like a "paint brush" for your CPU/core configuration.  There's a section that has some info from a thread at prepar3d.com describing the new settings, as well as my own observations based on tinkering with these since the 5.3 release.

As the disclaimer on the tool states, This is advanced configuration of Prepar3D that requires manual editing of the Prepar3D.cfg file. If you do not have experience editing INI-based configuration files or manually entering settings into the Prepar3D.cfg, you are encouraged to turn around and head back the other way. You can screw up your config (deleting it will rebuild a new one) if you don't know what you are doing.

http://izn-flightsim.s3-website-us-east-1.amazonaws.com/affinity.html

I'll check in on this thread for any feedback or issues, however don't expect me to offer a "use this setting" kind of advice.  Each and every one of us has a different PC, different P3D config, and different add-ons.  YMMV compared to mine or anyone else's.

  • Like 9
  • Upvote 4

Share this post


Link to post

Hey @Rob_Ainscough - I just took a look at your post.  Excellent description of how to optimize this stuff.  The tool I've created is to help lay out the scheduler settings visually, much as you've done in your post.  If I mock up what you've got in that thread, it looks like this using the tool:

spacer.png

One observation:  Your AffinityMask setting in that other thread is 65535, which would still make Core 0 (LP/HT 0 and 1) available to P3D, and not leave it entirely open for the OS.  That may be your intent - Just something I noticed.

  • Like 1

Share this post


Link to post
1 hour ago, MammyJammy said:

Hi All,

With the new release of P3D 5.3 and the increase in settings for the [JobScheduler], combined with the myriad of threads out here about setting affinity masks and how to figure it out, I threw together a new calculator for these settings.  I hope it's easier to use in that all you do is enter your core count/logical processors, then basically click to select what you want each core to do.  Think of it like a "paint brush" for your CPU/core configuration.  There's a section that has some info from a thread at prepar3d.com describing the new settings, as well as my own observations based on tinkering with these since the 5.3 release.

 

Hi, I just tried to use the calculator but for some reason it didn't draw out the table.  I'm using the cpu in my sig that has 6 cores/12 threads but when I click the draw button I don't get any results displayed.

Edited by jalbino59

Jose A.

Core Components: AMD Ryzen7 7700X - G.Skill FlareX 32 GB DDR5 6000 CL36 (XMP)  - Gigabyte B650M Aorus Elite AX  - Asus ROG Strix RTX3060 12gb

Storage: WD Black SN750 NVMe 1TB - AData sx8200 Pro NVMe 1TB - Samsung 860 EVO 500GB - Samsung 870 EVO 1TB

WIN10 - P3D v.5.3 HF2 - XPLANE 11 - MSFS

 

Share this post


Link to post

Thank you, works perfectly fine. 

Double Checked my Configuration I did 2 days ago and your result is exactly the same as mine when I calculated it "manualy".

 

 


sfo_a320.png

 

C. W. ,Ryzen 9 5950X @H2O , 32 GB RAM DDR4 3600 Mhz CL15 , Corsair MP600 Pro Watercooled 2 TB for P3D, Samsung SSD980 1 TB for Addons and Crucial MMX500,  Red Devil Ultimate 6900 XT

Share this post


Link to post

Hi Everyone,

I apologize to you, but I’m not that much of a “specialist,” so I’d rather ask for help.
I use a built in cockpit. ProSim 737 v3.12, 2 Pc
Parameters of the main Pc:
CPU: i9 10900KF
GPU: Asus Rog Strix RTX3090
Mem: 32GB
PSU: Corsair 1200W
2x 1TB M.2, + 3x SSD
Display: Samsung 65 "Curved
I am currently using a P3D5.2 HF
I plan that sometime when P3D5.3 is already "perfect" I will switch.
I would like to ask what should I type in the P3D cfg Affinity Mask ....?
HT on or off?
Currently, no reference is entered in the cfg.

Thank you for all your help!
Best Regards,
Peter

Share this post


Link to post
58 minutes ago, jalbino59 said:

Hi, I just tried to use the calculator but for some reason it didn't draw out the table.

Same here using an iPad.


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

Same here using an iPad.

Hmm...I will look into it.  It works OK on both my iDevices.  The table will appear below a bunch of radio buttons.  Do you see it if you scroll down?

Share this post


Link to post
38 minutes ago, Rob_Ainscough said:

Beau's post suggests that P3DCoreAffinityMask is what governs the cores P3D will use ... he also provided an example.  In my own testing, that bares out per my post here:

Yep, I've linked to Beau's post in the help section and have read it thoroughly.  We might be saying the same thing, but my read on the difference between the AffinityMask and the P3DCoreAffinityMask is basically:

AffinityMask = the cores that anything in the P3D process space can run on.  This would be P3D itself (hold that thought...), SimConnect modules, or other DLL/EXEs that are referenced as add-ons or in the dll.xml or exe.xml config files within P3D.  Basically this is the "big umbrella" of things that semaphore to P3D, or P3D itself.

P3DCoreAffinityMask = The cores upon which the primary processes within prepar3d.exe will run, including the stuff Beau describes in the thread involving the main scheduler, render and frame tasks, as well as terrain/scenery loading threads.

The masking off of a core from AffinityMask to P3DCoreAffinityMask gives some breathing room to add-ons that may chew CPU time such as ActiveSky, PMDG birds, or other complex aircraft, gauges, etc.  This obviously depends a bunch on how those items are developed, and how they perform across single/multi cores, and how efficient the OS is as scheduling thread tasks.  For those flying low-and-slow or without a bunch of add-ons, having any difference in the two may not make any difference.

I agree with your point to the complexity of the AffinityMask using all cores.  Unless the OS is chewing and entire CPU (which would indicate another PC issue) it's probably best to give the entire process space access to every core.

38 minutes ago, Rob_Ainscough said:

The 3 thread scheduler entries are Relative to the P3DCoreAffinityMask.

Adjusting the AffinityMask to anything other than ALL available cores would just add unnecessary complexity.

It can also help to distinguish a real core vs. the HT core, hence why I use C0 HT0 in my reference rather than LP (which the OS identifies as) which comprise of one physical core contained within one physical processor.

Yep, and the tool calculates as such.  When you position one of the ThreadSchedulers in the tool it will calc out relative based on the number of cores or logical processors that are masked off with the P3DCoreAffinityMask.

And on the C0/HT0 thing...That labeling is a feature I want to add.  I'd be nice if it was always every-other for physical/logical, but the new 12900K makes that difficult.  It has HT on the first 8 cores, and no HT on the last 8 efficiency cores.  If I can find a listing of all CPUs and their actual topology, I'll make the starting point simply a drop-down to select a CPU and label them appropriately.

  • Upvote 1

Share this post


Link to post
1 hour ago, MammyJammy said:

Hmm...I will look into it.  It works OK on both my iDevices.  The table will appear below a bunch of radio buttons.  Do you see it if you scroll down?

I see the six radio buttons, and I tried clicking the calculate and draw button but nothing happens.  I'm sure it's something on my end I'll clear my browser cache and try again. In the meantime I don't want to take you away from your activities so I'll just say thanks, Happy New Year, have fun but most of all be safe, and stay healthy.

 

Edited by jalbino59

Jose A.

Core Components: AMD Ryzen7 7700X - G.Skill FlareX 32 GB DDR5 6000 CL36 (XMP)  - Gigabyte B650M Aorus Elite AX  - Asus ROG Strix RTX3060 12gb

Storage: WD Black SN750 NVMe 1TB - AData sx8200 Pro NVMe 1TB - Samsung 860 EVO 500GB - Samsung 870 EVO 1TB

WIN10 - P3D v.5.3 HF2 - XPLANE 11 - MSFS

 

Share this post


Link to post
1 hour ago, MammyJammy said:

Hmm...I will look into it.  It works OK on both my iDevices.  The table will appear below a bunch of radio buttons.  Do you see it if you scroll down?

Got it working but it’s not clear you have to touch each of the cells for each core.

I just entered 6 for my cores and pressed “Draw CPUs and start calculating”. When I started to select each cell the AM value was calculated.


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
1 hour ago, Ray Proudfoot said:

Got it working but it’s not clear you have to touch each of the cells for each core.

I just entered 6 for my cores and pressed “Draw CPUs and start calculating”. When I started to select each cell the AM value was calculated.

Appreciate the feedback Ray.  I've made some UI tweaks to make the process a little clearer.  Let me know if you have any other feedback.

Share this post


Link to post
4 hours ago, Ray Proudfoot said:

Got it working but it’s not clear you have to touch each of the cells for each core.

I just entered 6 for my cores and pressed “Draw CPUs and start calculating”. When I started to select each cell the AM value was calculated.

I am not sure where this click spot is [“Draw CPUs and start calculating”]. I do not see it. I also have 6 cores and 12 LP.  Is this a trial and error thing or does the calculator do it for you?


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

All I can say is that I can see now why I never became a computer programmer. I have read the posts but really have no idea what it all means.😉 I will stick with the trial and error method.


Intel i7 6700K @4.3. 32gb Gskill 3200 RAM. Z170x Gigabyte m/b. 28" LG HD monitor. Win 10 Home. 500g Samsung 960 as Windows home. 1 Gb Mushkin SSD for P3D. GTX 1080 8gb.

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