Set and calculate a Prepar3D v4 affinity mask safely, understand the 32-bit limit, and avoid copied CPU masks that can cause stuttering.
Prepar3D v4 stores its affinity setting in %APPDATA%\Lockheed Martin\Prepar3D v4\Prepar3D.cfg. The safe default is to omit AffinityMask and let Prepar3D and Windows schedule the work. Treat [JOBSCHEDULER] AffinityMask as an advanced diagnostic restriction, not an FPS tweak; copied values can disable useful logical processors, worsen frame times or cause stuttering.
How to set AffinityMask in Prepar3D.cfg
- Close Prepar3D v4. Editing the file while the simulator is running risks having the change overwritten when it exits.
- Open the correct configuration folder. Press Windows key plus R, enter
%APPDATA%\Lockheed Martin\Prepar3D v4and openPrepar3D.cfgin a plain-text editor. This command also works on localised Windows installations. - Back up the file. Copy
Prepar3D.cfgelsewhere or give the copy a recognisable backup name. - Find the job scheduler section. Locate
[JOBSCHEDULER], or add it if it is absent. Do not create a second copy of an existing section. - Add the decimal value. For example, the line
AffinityMask=14selects logical processors 1, 2 and 3. Put it beneath[JOBSCHEDULER]. - Save and restart Prepar3D. Confirm that the file remains named
Prepar3D.cfg, notPrepar3D.cfg.txt.
The example consists of [JOBSCHEDULER] followed by AffinityMask=14 on the next line. The value 14 is an arithmetic example, not a general recommendation. If the file is missing or an edit damages it, follow our instructions for finding, backing up and resetting Prepar3D.cfg.
Affinity mask calculator
A Prepar3D affinity mask is calculated by adding the bit values of the Windows logical processors that should remain available to the simulator's job scheduler.
Logical processor n has the value 2^n. A selected processor has a binary bit of 1; an excluded processor has a bit of 0. When a mask is written in binary, the rightmost bit represents logical processor 0, but the CFG entry itself must contain the decimal result.
Logical-processor-to-bit table
| Logical processor | Bit value | Logical processor | Bit value | Logical processor | Bit value | Logical processor | Bit value |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 8 | 256 | 16 | 65536 | 24 | 16777216 |
| 1 | 2 | 9 | 512 | 17 | 131072 | 25 | 33554432 |
| 2 | 4 | 10 | 1024 | 18 | 262144 | 26 | 67108864 |
| 3 | 8 | 11 | 2048 | 19 | 524288 | 27 | 134217728 |
| 4 | 16 | 12 | 4096 | 20 | 1048576 | 28 | 268435456 |
| 5 | 32 | 13 | 8192 | 21 | 2097152 | 29 | 536870912 |
| 6 | 64 | 14 | 16384 | 22 | 4194304 | 30 | 1073741824 |
| 7 | 128 | 15 | 32768 | 23 | 8388608 | 31 | 2147483648 |
Repeatable calculation method
- Verify the processor IDs exposed by Windows. Do not calculate from the advertised physical-core count alone.
- Write down the logical processors to include. For example: 1, 2 and 3.
- Look up and add their bit values. In that example, calculate
2 + 4 + 8 = 14. - Enter digits only. Use
AffinityMask=14, not the binary value, hexadecimal notation, commas or spaces. - Check every selected bit. Each processor ID must exist and must fall within Prepar3D v4's usable mask range.
Worked decimal-mask examples
| Selected logical processors | Calculation | Decimal mask |
|---|---|---|
| 0–3 | 1 + 2 + 4 + 8 | 15 |
| 1–3 | 2 + 4 + 8 | 14 |
| 0, 2, 4 and 6 | 1 + 4 + 16 + 64 | 85 |
| 0–7 | 256 - 1 | 255 |
| 0–11 | 4096 - 1 | 4095 |
| 0–19 | 1048576 - 1 | 1048575 |
| 16–31 | 4294967296 - 65536 | 4294901760 |
| 0–31 | 4294967296 - 1 | 4294967295 |
Masks selecting every available processor are mathematical examples, not useful performance presets. If the intention is to make every processor available, omit AffinityMask instead.
Prepar3D v4's practical 32-bit limit
Prepar3D v4's configuration value is practically limited to a 32-bit mask: logical processor IDs 0 through 31. It cannot express logical processor 32 or higher, even though Prepar3D v4 itself is a 64-bit application.
The mathematical maximum for all 32 bits is 4294967295. That value sits at the unsigned 32-bit boundary, so it should not be used as an all-core preset or as a workaround for a machine with more processors. Leaving the setting absent avoids legacy CFG parsing issues and allows normal scheduling.
If Windows exposes fewer than 32 logical processors, the usable range is smaller. A 12-thread processor has IDs 0–11, for example, so bits 12–31 do not identify available processors. BIOS settings that disable simultaneous multithreading, Hyper-Threading or individual cores also change the usable range.
Which affinity mask should I use?
For most Prepar3D v4 systems, use no affinity mask at all unless repeatable testing has identified a specific processor-contention problem.
An affinity mask cannot create CPU capacity or spread Prepar3D's main thread across several cores. It only removes scheduling choices. If the main thread, graphics card, scenery loading or an add-on is the actual bottleneck, a mask may do nothing or make frame times worse. Work through our Prepar3D performance and bottleneck checks before restricting processors.
- Leave it unset when performance is acceptable, no processor contention has been measured, or the CPU has a hybrid or multi-chip design.
- Test a restricted mask only when Prepar3D is demonstrably competing with another CPU-heavy process and there is a deliberate allocation plan.
- Reject copied “magic” values. A mask belongs to a particular logical-processor layout, not to Prepar3D generally.
Prepar3D AffinityMask, Windows processor affinity and Windows 11
These three mechanisms are related, but they do not have the same scope or behaviour.
| Mechanism | What it controls | Key limitation |
|---|---|---|
[JOBSCHEDULER] AffinityMask | Prepar3D's internal job-scheduler allocation and persists in the CFG | It is not a guaranteed placement rule for every add-on thread or separate external program. |
Task Manager's Set affinity | A Windows process-wide restriction for that running instance | It normally resets when Prepar3D exits and is broader than the CFG job-scheduler setting. |
| Windows 11 scheduler | Dynamically assigns work using processor topology, load, power policy and available hardware information | A static mask removes options from the scheduler; it does not describe core type, cache layout or workload priority. |
Windows 11 can use platform information such as Intel hybrid-core scheduling hints and AMD topology data. An affinity mask supplies only a list of allowed logical processor IDs. It cannot reliably select a particular P-core, E-core or X3D CCD merely because someone assumes that a range of processor numbers corresponds to that hardware.
The same caution applies to utilities that promise automatic core optimisation. Our explanation of multi-core booster applications and processor affinity covers why extra restrictions often reduce simulator performance.
What should I use for an i5-14600K, Ryzen 5 5600G or AMD 9950X3D?
Leave AffinityMask unset on all three processors unless controlled, repeatable testing identifies contention that the mask actually resolves.
| Processor | Stock topology and logical-processor count | Affinity guidance |
|---|---|---|
| Intel Core i5-14600K | 6 Hyper-Threaded P-cores plus 8 E-cores: 14 physical cores and 20 logical processors | The different core types make copied masks especially unreliable. An assumed numbering pattern can separate P-core siblings or leave Prepar3D on an unintended mix of P-cores and E-cores. Do not infer core type from processor numbers. |
| AMD Ryzen 5 5600G | 6 physical cores and 12 logical processors with SMT enabled | Its layout is simpler, but a mask copied from an 8-, 16- or 20-thread CPU is still wrong. IDs 0–11 are the stock usable range; 4095 is the mathematical all-thread mask, not a recommended tweak. |
| AMD Ryzen 9 9950X3D | 16 physical cores and 32 logical processors across two eight-core CCDs, with 3D V-Cache on one CCD | Do not assume IDs 0–15 identify one CCD and 16–31 the other. Firmware, SMT and Windows topology presentation can invalidate that assumption, while Windows and platform scheduling may already choose between the X3D and frequency-oriented CCDs. |
Those counts assume all cores and Hyper-Threading or SMT are enabled. Task Manager's actual processor list takes precedence over the specification if BIOS settings have changed. On the i5-14600K and Ryzen 9 9950X3D in particular, a mask calculated for another computer with the same CPU model can still be unsafe because the copied value says nothing about verified core type or CCD mapping.
How do I verify the actual logical-processor numbering?
Use Windows Task Manager to verify the processor IDs exposed to Prepar3D.exe before calculating a mask.
- Launch Prepar3D v4. Leave it at a stable menu or paused scenario.
- Open Task Manager. Select the Details tab, find
Prepar3D.exe, right-click it and openSet affinity. - Record the available CPU labels. If the list ends at CPU 19, Windows is exposing 20 logical processors numbered 0–19 to that process.
- Cancel the dialogue. Do not change the checkboxes while establishing the default baseline.
- View per-processor activity if needed. On Task Manager's CPU performance page, change the graph to logical processors. This helps reveal load distribution, but it does not prove which graph belongs to a P-core, E-core or X3D CCD.
Repeat this check after changing BIOS core, SMT or Hyper-Threading settings. If physical topology matters to a test, use verified topology information from the operating system and platform rather than treating adjacent CPU numbers as proof of shared cores or CCD membership.
How should I test an affinity mask?
Compare every candidate mask against a no-mask baseline using the same aircraft, location, weather, traffic, camera view and add-ons.
- Establish the baseline. Remove the
AffinityMaskline, restart Prepar3D and run the scenario more than once. - Change one setting. Add one carefully calculated mask and restart the simulator.
- Compare frame pacing as well as FPS. A brief peak frame rate is not evidence of an improvement; watch for sustained stutters, pauses and reduced responsiveness.
- Repeat the run. Keep background applications and scenario conditions as consistent as possible.
- Keep the mask only if the gain repeats. If the result is neutral, inconsistent or worse, return to no mask.
If stuttering is the original problem, use our Prepar3D v4 stutter troubleshooting sequence to rule out scenery, storage, traffic, add-on and graphics causes before blaming processor scheduling.
Why is the affinity mask ignored or ineffective?
An apparently ignored mask usually means the wrong CFG was edited, the value is invalid, or the performance limit has nothing to do with processor affinity.
- Confirm that the path contains
Prepar3D v4, not another Prepar3D version. - Remove duplicate
[JOBSCHEDULER]sections and duplicateAffinityMasklines. - Use an unsigned decimal value containing digits only. Do not enter binary, hexadecimal notation, commas or a negative number.
- Check that Windows has not added a hidden
.txtextension. - Do not make the whole CFG read-only merely to preserve the entry; that can stop unrelated settings from being saved.
- Restart Prepar3D after each edit.
- Remember that GPU saturation, main-thread saturation, scenery loading and faulty add-ons require different fixes.
What if the mask exceeds the usable range?
A mask that requires bit 32, exceeds the 32-bit decimal range or selects only unavailable processor IDs is not a valid Prepar3D v4 configuration.
AffinityMask=4294967296requires logical processor 32 and is outside the 32-bit mask.- On a stock 20-thread i5-14600K,
AffinityMask=1048576selects bit 20, but the available IDs stop at 19. - On a stock 12-thread Ryzen 5 5600G,
AffinityMask=4096selects bit 12, but the available IDs stop at 11. - A mixed value can contain both valid and unavailable bits. For example,
4097combines valid bit 0 with unavailable bit 12 on a stock 5600G, so it does not represent the intended processor set. AffinityMask=0selects nothing and must not be used.
Do not depend on an oversized value being clipped, wrapped or ignored in a particular way. Remove it, confirm the available IDs in Task Manager, recalculate from the bit table and retest from the default.
How do I undo an affinity mask?
Close Prepar3D, delete the AffinityMask line and restart the simulator; do not replace it with zero.
An otherwise empty [JOBSCHEDULER] section may also be removed. If other CFG edits were made at the same time, restore the backup rather than guessing which line caused the problem. A full CFG reset is the final option when Prepar3D continues to behave incorrectly after the affinity entry has been removed.