Jump to content
Sign in to follow this  
toby23

One Tweak to Rule Them All - How to set Affinity Mask Correctly

Recommended Posts

ONE TWEAK TO RULE THEM ALL :lol:

Like so many of you, I spent more time tweaking and staring at the start-up screen in FSX than actually flying.

When I first installed Prepar3D a few weeks ago, I tried so many different ’tweaks’, each proclaiming to be the ‘silver bullet’, the ‘one true setting’, the ‘holy grail’ for perfect visual fidelity and smooth flight. The truth was that none of them worked. They all resulted in blurred ground textures, caused stuttering or made the simulator crash. The problem with all of these ‘holy grails’ is that what works for one person won’t necessarily work for another because we all have a unique combination of hardware and software.

 

Q. If all that you need to make Prepar3D shine is the correct Affinity Mask setting, how are you supposed to figure that out?

STEP ONE - USE TASK MANAGER

 

Before you start, remove any [JOBSCHEDULER] AffinityMask=xxx entry that you might have made in your Prepar3d.cfg file.

 

Using Task Manager with Prepar3D running in window mode, I can see the computer activity on the eight cores of my cpu, from the left 1,2,3,4,5,6,7,8.

I have a quad core cpu with Hyperthreading enabled, so I see eight visible cores in the CPU Usage History.

 

0b7b8zX.jpg
 
Looking at the image above, I see a lot of activity on core 3 and a bit of activity on cores 5 and 7. This means that Prepar3D has a preference for those cores on my set-up. Your Task Manager will probably look completely different, it all depends on your unique set-up.

I also see minimal activity on cores 1 and 2, which indicates system activity, so I will reserve these two cores, as well as core 4, for the system and other programmes and assign cores 3,5,6,7 and 8 to Prepar3D. 5 cores is plenty for Prepar3D and 3 is fine for the system and other programmes.

 

STEP TWO - CALCULATING THE AFFINITY MASK VALUE

I won't try to explain the Affinity Mask setting in detail but you assign the cores backwards using binary code to generate a decimal value.

In this case I want to assign cores 3,5,6,7 and 8 to Prepar3D.
T6SsGZn.jpg
From the above, you can see that this equals 11110100 in binary.

CALCULATING THE AFFINITY MASK VALUE

1. Open the Windows Calculator
2. Click the radio button 'Bin'
3. Click the radio button 'Word'
4. Enter the value which describes the cores you want to use, in my case 11110100
5. Click the radio button 'Dec' and note the decimal number that appears, in my case 244.

 703R0G8.jpg

 

TmeDuxg.jpg

6. Open C:\Users\USERNAME\AppData\Roaming\Lockheed Martin\Prepar3D v2\Prepar3D.cfg and enter the following at the top.

[JOBSCHEDULER]
AffinityMask=244


244 is my unique value and your value might be the same but if it is different, it does not matter as long as you used the Task Manager to figure out which cores to assign to Prepar3D.

7. Save the Prepar3D.cfg file.

8. If you have an Nvidia Graphics Card, go to Step Three, if you don't, you're ready to fly!

STEP THREE - ADAPTIVE VSYNC FOR NVIDIA USERS

If you have an Nvidia Graphics Card, enable Adaptive VSync.

Selecting Adaptive in Nvidia Inspector will not have the same effect as using the Nvidia Control Panel to set it.

1. Right click on the desktop and select NVIDIA Control Panel
2. Under Manage 3D Settings, select the Program Settings Tab
3. Select Prepar3d (prepar3d.exe) from the drop down menu
4. Scroll down and set Vertical sync to Adaptive
3. Save and close the Control Panel
4. Open Prepar3D, start a flight and under Options>Settings>Display>Frame Rate Controls, check that VSync is Off and that Triple Buffer is unchecked.
5. Enjoy your flight

Read more here: http://www.geforce.com/hardware/technology/adaptive-vsync/technology

CbmSLs9.jpg

 

uYbCQOp.jpg

 

yN4ZCAH.jpg

 

————————————————————————————————————
————————————————————————————————————

Disclaimer

If I fly in bad weather with AI, road traffic and cloud shadows over detailed scenery in a complicated aircraft, I am asking for trouble and my performance will suffer as a direct result. There is no magical setting but there is a computational limit to what our hardware can process in realtime. In five years, maybe the hardware will have caught up with the software. I hope so.

I cannot be held responsible for any adverse effects that might arise out of the use of the information presented above. It is presented as is.
This document is dedicated to Mike Greenblatt who taught me the importance of unification and gave me the tools I needed to get started.

YMMV.
Toby.

————————————————————————————————————
————————————————————————————————————
 

My Hardware
i7 4700k at stock speed 3.5ghz
EVGA GTX 780 Ti SC ACX
8 GB DDR3 1600mhz Ram
Windows 7 64 Bit on 256 GB SSD
Prepar3D and all add-ons on 1TB WD Blue HD 7000rpm
Corsair RM 650w PSU

Dell HP ZR30W monitor at 2560x1060

TM Warthog HOTAS
Saitek Combat Pedals and Throttle Quadrant
Track-IR
Buttkicker


My Settings Prepar3D v2.2

yN4ZCAH.jpg
 

8z4D11A.jpg

 

0aTuIUy.jpg
 

1AuSMm6.jpg

 

XqBLQTu.jpg
 

 

 


Ryzen 5800X3D, 64GB RAM, RTX 4090, Windows 10, Varjo Aero, DOF H3

Share this post


Link to post

Thanks for explaining the Affinity Mask calculation.  Very informative.   I will certainly try it out on my system. 


John Pipilas

Win 10 ​- i7 2600k CPU - AMD Radeon R9 Fury X GPU 

       

Share this post


Link to post

Going to give this a try,Thank You very much for your great informative post,Cheers!


100%75%50%d8a34be0e82d98b5a45ff4336cd0dddc

0D8701AB-1210-4FF8-BD6C-309792740F81.gif

Patrick

Share this post


Link to post

@Toby:

 

So what's your FPS range in a few example scenarios with these settings?

 

I'm trying them out, but it's just grinding to a halt with clouds around (even with shadows off) around the PNW OrbX scenery.  :-(

Share this post


Link to post

Thank you for a very informative explanation.


Howard

Jetline Systems: Intel 8th Gen Core i7 8700K (4.8GHz Overclock); GTX 1080 Ti; LG Curved UltraWide 3440x1440 Monitor

.

Share this post


Link to post

Toby 23-Nice to see you acknowledging Michael Greenblatt.  He was the best, God rest his soul.  Thanks to Michael for making flight simming the wonderful thing it is for me.


Forever indebted to the late Michael Greenblatt of FSGS.

 

 

 

Share this post


Link to post

This is all very interesting but in nvidia control panel when I select p3d.exe control panel keeps crashing - anyway your cpu usage was almost the same as mine except core 5 and 7 was much lower so I guess for now i will try your AM setting as I can not get p3d.exe to take - very weird never saw that before - thanks for the post


Well I'm digging your AM I think as you can see it is now working correctly do you agree - more activity on the cores - thanks a lot - great post

 

 

BEFORE

 

2pqnjpu.jpg

 

 

 

AFTER

 

8xj5w5.jpg


Rich Sennett

               

Share this post


Link to post

Avoid flying in bad weather or lower your settings/expectations. You need to be realistic about trying to simulate reality on a desktop PC. Try ORBX weather defaults for realistic weather without a framerate hit. I cannot fly either in heavy clouds in v2.2 with all the add-ons without suffering a noticeable framerate hit. Let's see what LM come up with in v2.3.

 

@Toby:

 

So what's your FPS range in a few example scenarios with these settings?

 

I'm trying them out, but it's just grinding to a halt with clouds around (even with shadows off) around the PNW OrbX scenery. :-(


Ryzen 5800X3D, 64GB RAM, RTX 4090, Windows 10, Varjo Aero, DOF H3

Share this post


Link to post

Well that's a bit disappointing.

 

Not even sure how well P3D/FSX simulate flying anyhow (based upon my personal experiences).

 

Sure hope P3D can get closer to XPlane like performance.

That's definitely my go to when I want it to actually be smooth and a good simulation of GA aerodynamics.

Share this post


Link to post

Nicely explained and orderly presented but to be honest - nothing new.

Spirit

Share this post


Link to post

I forgot to add some images of the Task Manager after applying the Affinity Setting and can't edit the post any more so here they are.

 

mn7ZNQy.jpg

 

UOwppNY.jpg

 

 

Here's an example of core usage while browsing the Scenario Setup menu for comparison.

 

NF9wAem.jpg


Ryzen 5800X3D, 64GB RAM, RTX 4090, Windows 10, Varjo Aero, DOF H3

Share this post


Link to post

I don't why but I don't seem to be able to edit my posts any more.
 

FLYING IN HEAVY CLOUD
I can fly using any of the default or ORBX Weather settings and my performance is hardly affected, bad weather, stormy weather, snow, it doesn't matter but If I use a real weather engine, and the weather is overcast or there are a lot of clouds, I cannot fly without suffering a noticable framerate hit.
That's just how it is at the moment in v2.2.

Without promoting any particular weather engine as I own and use them all, I have made the best experiences so far performance wise with Opus' weather engine. ASN is, in my opinion, the most realistic but also gives me the largest performance hit due to its realistic portrayal of the weather.
 

Avoid flying in bad weather or lower your settings/expectations. You need to be realistic about trying to simulate reality on a desktop PC. Try ORBX weather defaults for realistic weather without a framerate hit. I cannot fly either in heavy clouds in v2.2 with all the add-ons without suffering a noticeable framerate hit. Let's see what LM come up with in v2.3.


Well that's a bit disappointing.
Not even sure how well P3D/FSX simulate flying anyhow (based upon my personal experiences).
Sure hope P3D can get closer to XPlane like performance.
That's definitely my go to when I want it to actually be smooth and a good simulation of GA aerodynamics.


Ryzen 5800X3D, 64GB RAM, RTX 4090, Windows 10, Varjo Aero, DOF H3

Share this post


Link to post

For those who don't have (i5) or use HyperThreading, best performance seems to be to turn all 4 cores on.  (AM=15)

Share this post


Link to post

 

 


Without promoting any particular weather engine as I own and use them all, I have made the best experiences so far performance wise with Opus' weather engine. ASN is, in my opinion, the most realistic but also gives me the largest performance hit due to its realistic portrayal of the weather.

 

FWIW, I have also seen this and agree.   


i7-9700K, MSI Z370, PNY 4070 Super, GTX 750Ti, 32GB GSkill, 43" curved Samsung, 32" BenQ, 11" LED, RealSImGear GTN750, Win10,

P3DV5.4/P3DV6 and MSFS, several GoFlight modules, Saitek radio, Brunner CLS-E NG Yoke, Virtual Fly TQ6.

 

Share this post


Link to post
Guest
This topic is now closed to further replies.
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...