August 27, 20214 yr I've seen lots of people refer to an 'Affinity mask'. I have no idea what it is, but the idea of trying anything to improve performance always gets me interested! So, what is it? How does it work? And how do I use it? (word not allowed's guide!) I'm using 5.2. Thanks AMD Ryzen™ 9 9900X3D, AM5, Zen 5, 12 Core, 24 Threads, 4.4GHz, 5.5GHz Turbo 64GB (2x32GB) DDR5 6000MHz Corsair Vengeance 32GB GeForce® RTX 5090 Graphics Card
August 27, 20214 yr Don't bother with it, would be my advice. It's mostly a remnant from FSX, although many will swear it works in P3D too. There's a good chance it's nothing but a placebo. (Cue angry "it too works" responses below.) If you have performance issues, accepting that you have to tune down your settings will be much more effective.
August 27, 20214 yr You can simply try it using task manager and disable/reenable some core for P3D see if it have any effect. For me, I tend to disable core0 or 1 for P3D and leave it for LINDA , that could reduce some change when P3D is very heavy on CPU and jam the LINDA.
August 27, 20214 yr CPU’s have ‘cores’ that can run operations. Think of it like how you have arms. You can to different things with both of them. CPU’s have between 4 and 16 (for the most part today) cores. In the simplest way posssible: The AffinityMask setting in the CFG file tells P3D which cores to use. By default, P3D will use every core available. You can eliminate cores from use with different settings. There are situations (hyperthreading for example) where this can be beneficial; less so for an FPS boost and more for stutter reduction. Theres debate on what settings work best (HT on/HT off) works best but that gets to the core of this issue: every system is unique and affinitymask doesn’t exist in a vacuum. You also have to look at what other processes are on which cores.
August 27, 20214 yr This tweak controls which CPU cores Prepar3D can use. However, Prepar3D cannot utilize multiple cores for a task and so it executes code in a singular way across single cores. A more modern approach would be to perform a single task across multiple cores so that the load is spread. You can see this in the task manager, if you load up Prepar3D and have a lot of AI, autogen etc then one of the cores will likely be getting hit 100%, the others however will barely be doing anything. If you set an AM then Prepar3D will only be able to execute code on certain cores based upon that setting but the fundamental behaviour is still the same. Think of it as this, if you set AM to use 6 CPU cores then you have 6 people available to do any particular job. However, it still remains a problem that you cannot ask 2 people to help each other to do the same job so in reality the tweak will make no difference at all. The default behaviour is that Prepar3D has all cores available so you are most likely to get maximum performance by leaving the tweak out. The only benefit I can see is setting an AM may help stability if you have lots of other things running in the background. For example you may wish to prevent Prepar3D from using a core to enable other applications to use that core. Edited August 27, 20214 yr by G MIDY Lawrence Ashworth
August 27, 20214 yr 43 minutes ago, G MIDY said: if you load up Prepar3D and have a lot of AI, autogen etc then one of the cores will likely be getting hit 100%, the others however will barely be doing anything This is only true as long as one is stationary. Start moving, and you will see the other cores being used. 45 minutes ago, G MIDY said: For example you may wish to prevent Prepar3D from using a core to enable other applications to use that core This is what I am aiming for with my next CPU, which should have enough cores. Best regards, Dimitrios 9950X3D - 64 GB - RX 7900 XTX - TrackIR - Power-LC M39 WQHD - Honeycomb Alpha yoke, Saitek pedals & throttles in a crummy home-cockpit - MSFS for props, P3D for jets
August 27, 20214 yr 1 hour ago, G MIDY said: For example you may wish to prevent Prepar3D from using a core to enable other applications to use that core. Yes indeed, you could do something like place the main thread that typically runs on core zero on an alternate core which may happen to be the stronger better performing core, or just because practically everything tends to run on core zero anyway. I use an affinity mask to push the main thread onto core 3, then have Process Lasso enable P3D on all cores. Result is P3D running on all cores and the main thread running on core 3. P3D tends to use just 6 cores in general use (v 4.5 at least), although when loading and decompressing scenery will use all cores. This pic shows the main thread running on Core 3 (SMT is disabled) and cores 7 & 8 are lesser used by P3D. I use Process Lasso to assign basically every other component used with P3D onto those 2 x lesser used cores. And although the FPS counter is showing 28 it's actually vsync'd to 30 Hz and runs at 30 fps all day every day, apart from when I took the screen grab via GreenShot causing a few frames drop for the time of the grab. Edited August 27, 20214 yr by Rogen not enough cores ! (and another pic) Ryzen 5800X clocked to 4.7 Ghz (SMT off), 32 GB ram, Samsung 1 x 1 TB NVMe 970, 2 x 1 TB SSD 850 Pro raided, Asus Tuf 3080Ti P3D 4.5.14, Orbx Global, Vector and more, lotsa planes too. Catch my vids on Oz Sim Pilot, catch my screen pics @ Screenshots and Prepar3D
August 27, 20214 yr 2 hours ago, BWBriscoe said: I've seen lots of people refer to an 'Affinity mask'. I have no idea what it is, but the idea of trying anything to improve performance always gets me interested! So, what is it? How does it work? And how do I use it? (word not allowed's guide!) I'm using 5.2. Thanks Depends on your CPU and system. I run an i9 10850 with 10 physical cores. I have found through trial and error that my system works best with HT on (so 20 virtual cores), and an AM set of 00000101010101010101. I set all other simming apps to the last 4 virtual cores using process lassoo. P3D therefore has 8 physical cores all to itself and there are 4 virtual cores remaining for other apps. More physical cores allocated to P3D compromises the primary rendering thread and reduces performance (for me). I also o/c my CPU to 5.1 GHz all cores and it helps to have a 3090 chugging away 🙂 With that solid basis, I can sustain 30fps with all settings maxed in P3D5.2HF1 in any aircraft using 2xSSAA in 4k. With less demanding aircraft, I can either boost that to 50fps or increase the AA to 4x in any scenario. Unfortunately the 3090 isn't quite strong enough to be able to cope with 50fps at 4k with 4xSSAA in heavy weather, using full EA. If you have a less capable CPU, perhaps with fewer cores, or you run a different spectrum of background apps, you'll need to make a different judgement as to what will work best for you. Kevin Firth - AMD 9800X3D; Asus Prime X670E; 64Gb Cas30 6000 DDR5; RTX5090; AutoFPS
August 27, 20214 yr 1 hour ago, Rogen said: I use an affinity mask to push the main thread onto core 3, then have Process Lasso enable P3D on all cores This isn't something I'd recommend myself. I would strongly advise only to use PL to alter the AM for any app which does NOT have an integral configuration setting for it. Kevin Firth - AMD 9800X3D; Asus Prime X670E; 64Gb Cas30 6000 DDR5; RTX5090; AutoFPS
August 27, 20214 yr 3 minutes ago, kevinfirth said: This isn't something I'd recommend myself. I tick the checkbox to "Strongly Disagree" 😉 As the aim being to move the main thread to an alternate core while also providing all cores for P3D to run with. Now in your instance you've dividing up 20 cores/threads and reducing the number of available cores assigned to P3D therefore an affinity mask will do just fine in providing a "window" of cores assigned to P3D, whereas I want P3D to use all cores but just run the main thread on the strongest core (because not all cores are created equal). Indeed I find it works very well and has so for some years now. I just need a stronger GPU... but @ around $3900.00 for a 3900, I think lotto will have to rescue me 🎶 Cheers Ryzen 5800X clocked to 4.7 Ghz (SMT off), 32 GB ram, Samsung 1 x 1 TB NVMe 970, 2 x 1 TB SSD 850 Pro raided, Asus Tuf 3080Ti P3D 4.5.14, Orbx Global, Vector and more, lotsa planes too. Catch my vids on Oz Sim Pilot, catch my screen pics @ Screenshots and Prepar3D
August 27, 20214 yr 1 hour ago, Rogen said: I use an affinity mask to push the main thread onto core 3 Could I ask how you achieve this? I know how to use an affinity mask to limit the number of cores and restrict certain cores from being used by P3D but I don't know how to force the main thread to use a certain core.🤔
August 27, 20214 yr Commercial Member Why not try yourself and if doesn’t works for you simply delete it ?
August 27, 20214 yr 32 minutes ago, Caveney737 said: Could I ask how you achieve this? I know how to use an affinity mask to limit the number of cores and restrict certain cores from being used by P3D but I don't know how to force the main thread to use a certain core.🤔 It's the affinity mask that does it. Say as in my case I've 8 cores, starting P3D without an affinity mask means the main thread will start and run on Core zero i.e. the first core So we set an affinity mask to restrict P3D to run on Cores 2 to 7 (i.e. the third to the last core) For my 8 cores this is AffinityMask=252. Now when P3D starts the main thread will start and run on core 2, all good so far. Then we simply enable core 0 & 1 for P3D, for which I use Process Lasso to set P3D to all cores, P3D now is running on all cores with the main thread staying on core 2, you could probably also tick the boxes for affinity in Windows Task Manager to trial it out. Cheers https://www.gfsg.co.uk/affinitymask.aspx?SubMenuItem=utilties Edited August 27, 20214 yr by Rogen Ryzen 5800X clocked to 4.7 Ghz (SMT off), 32 GB ram, Samsung 1 x 1 TB NVMe 970, 2 x 1 TB SSD 850 Pro raided, Asus Tuf 3080Ti P3D 4.5.14, Orbx Global, Vector and more, lotsa planes too. Catch my vids on Oz Sim Pilot, catch my screen pics @ Screenshots and Prepar3D
August 27, 20214 yr 1 hour ago, kevinfirth said: Unfortunately the 3090 isn't quite strong enough to be able to cope with 50fps at 4k with 4xSSAA in heavy weather, using full EA. Just reading these words made my GPU overheat.
August 27, 20214 yr 35 minutes ago, Rogen said: when P3D starts the main thread will start and run on core 2, all good so far. Then we simply enable core 0 & 1 for P3D, for which I use Process Lasso to set P3D to all cores, P3D now is running on all cores with the main thread staying on core 2, How can you be sure that the main thread stays on core 2 for the duration? Just interested 🙂 Kevin Firth - AMD 9800X3D; Asus Prime X670E; 64Gb Cas30 6000 DDR5; RTX5090; AutoFPS
Archived
This topic is now archived and is closed to further replies.