Prepar3D 5 min read

How do I set an affinity mask in Prepar3D v4?

Ian Stephens
In short

Set a Prepar3D v4 affinity mask safely, calculate its decimal value, edit Prepar3D.cfg correctly, and undo changes that reduce performance.

To set an affinity mask in Prepar3D v4, close the simulator, open Prepar3D.cfg in the Prepar3D v4 AppData folder, add an AffinityMask decimal value under [JOBSCHEDULER], save, then retest. Back up the file first: a copied mask can disable useful logical processors and lower performance.

Set the affinity mask in Prepar3D.cfg

  1. Close Prepar3D v4. Changes made while the simulator is running may be overwritten when it exits.
  2. Open the configuration folder. Press Windows key plus R and enter %APPDATA%\Lockheed Martin\Prepar3D v4. If Prepar3D.cfg does not exist, run Prepar3D once and close it normally.
  3. Back up Prepar3D.cfg. Copy it to another folder or give the copy a recognisable backup name.
  4. Edit the existing job scheduler section. Open the CFG file in a plain-text editor. Find [JOBSCHEDULER], or add that heading if it is absent. Do not create a second copy of the section.
  5. Add the decimal mask. For example, selecting logical processors 1, 2 and 3 gives AffinityMask=14. Place that line directly beneath [JOBSCHEDULER].
  6. Save and restart Prepar3D. Confirm that the file remains named Prepar3D.cfg, not Prepar3D.cfg.txt.

The resulting entry in this example is [JOBSCHEDULER] followed by AffinityMask=14. The number 14 is only an arithmetic example, not a universal recommendation.

How do I calculate a Prepar3D affinity mask?

An affinity mask is the sum of the bit values for the Windows logical processors you want Prepar3D's job scheduler to use.

Logical processor 0 has a value of 1, processor 1 is 2, processor 2 is 4, processor 3 is 8, processor 4 is 16, and each subsequent value doubles. To select processors 1, 2 and 3, calculate 2 + 4 + 8 = 14 and enter AffinityMask=14.

Selected logical processorsBinary maskDecimal value
0–3111115
1–3111014
0–711111111255
1–711111110254

The rightmost binary bit represents logical processor 0. Enter the result as a decimal integer in the CFG file; do not paste the binary sequence itself. Use only logical processors that actually exist on your system, and never use a zero mask.

Which affinity mask should I use?

For most systems, the best starting point is no AffinityMask line at all, allowing Prepar3D and Windows to use their normal scheduling behaviour.

An affinity mask does not create additional CPU capacity or divide Prepar3D's main thread among more cores. It only restricts which logical processors the simulator's job scheduler may use. If the main thread is already the limiting factor, reducing its available processors may produce worse frame times; our Prepar3D FPS and main-thread troubleshooting guide explains how to identify that bottleneck before changing processor affinity.

  • Keep the default when performance is acceptable, the CPU has relatively few logical processors, or you have not identified processor contention.
  • Test a restricted mask when measurements show that Prepar3D is competing with another CPU-heavy application and you have a deliberate processor-allocation plan.
  • Avoid copied “magic” masks. A value designed for a different core count or simultaneous multithreading layout may select the wrong processors on your machine.

Windows numbers logical processors, not just physical cores. On a processor with simultaneous multithreading, two logical processors may share one physical core, but their numbering and pairing should not be assumed from somebody else's CPU. Fast main-thread performance remains central, as covered in our processor and hardware guidance for Prepar3D.

Task Manager's Set affinity command is not the same setting. It applies a temporary, process-wide restriction and normally resets at the next launch. The CFG entry persists and controls Prepar3D's job scheduler; it should not be treated as a guaranteed affinity rule for every add-on thread or separate external program.

Why is the affinity mask ignored or ineffective?

An apparently ignored affinity mask usually comes from editing the wrong file, saving an invalid value or expecting a CPU restriction to fix a different bottleneck.

  • Check that you edited the Prepar3D v4 AppData folder rather than the folder for another Prepar3D version.
  • Remove duplicate [JOBSCHEDULER] headings or duplicate AffinityMask lines.
  • Make sure the value is decimal, contains digits only and selects valid logical processors.
  • Confirm that Windows has not hidden the added .txt extension.
  • Do not make the entire CFG file read-only merely to preserve this line; that can stop unrelated simulator settings from being saved.
  • Remember that a GPU limit, scenery loading delay or add-on problem will not necessarily respond to an affinity change.

How do I test and undo an affinity mask?

Test each mask against the default using the same aircraft, location, weather, traffic and camera view, changing only one setting at a time.

Restart Prepar3D after every edit and compare both frame rate and visible stuttering over repeat runs. A single brief FPS peak is not useful evidence. If the result is worse or shows no repeatable improvement, close Prepar3D and delete the AffinityMask line; the empty [JOBSCHEDULER] heading may also be removed. Restoring the backup CFG achieves the same result.

AI Assistant New

Still stuck? Ask Fly Away

Ask Fly Away is our AI flight-sim assistant. Ask your exact question and get a direct, step-by-step answer in seconds — free to try.

Ask Fly Away Free preview · unlimited for PRO members