Setting Affinity Mask for P3D V5.3 new scheduler
- Rob Ainscough
- Posts: 3289
- Joined: Sat Jan 05, 2013 6:46 pm
- Location: Oregon USA
Setting Affinity Mask for P3D V5.3 new scheduler
No miracle FPS increases, but it will help provide more consistent frametime deltas:
https://youtu.be/Sm5wTkct68c
Cheers, Rob.
https://youtu.be/Sm5wTkct68c
Cheers, Rob.
Rob Ainscough
-
- Posts: 19
- Joined: Tue Nov 26, 2013 9:37 pm
Re: Setting Affinity Mask for P3D V5.3 new scheduler
Interesting but when i watch this vidéo, this is a return to the past, i played with process lasso 5/6 years ago, to help FSX or P3d running better, now in the 21st century I do not find it normal to have to tinker to have a fully functional game.
-
- Posts: 59
- Joined: Thu Apr 16, 2020 5:29 pm
Re: Setting Affinity Mask for P3D V5.3 new scheduler
Thanks for the video Rob! Very informative.
However, I've calculated an affinitymask of 65535 for my Ryzen 5 5600G CPU. I enter 65535 in the Prepar3D.cfg so the line reads "P3DCoreAffinityMask=65535". I save the cfg, start up P3D, then reopen CFG to discover the value has been reset to "P3DCoreAffinityMask=4095". Is there something I am doing wrong?
This is my entire [JobScheduler] entry, with calculated affinitymask:
[JobScheduler]
AffinityMask=4095
P3DCoreAffinityMask=65535
MainThreadScheduler=0
RenderThreadScheduler=2
FrameWorkerThreadScheduler=4
EDIT: When I use the calculator in easy mode and select Core Count 4 and HT enabled, I get a value of AffinityMask=252, so I enter that in cfg so the top reads:
[JobScheduler]
AffinityMask=4095
P3DCoreAffinityMask=252
Is this correct usage of it?
Sincerely,
Erik
However, I've calculated an affinitymask of 65535 for my Ryzen 5 5600G CPU. I enter 65535 in the Prepar3D.cfg so the line reads "P3DCoreAffinityMask=65535". I save the cfg, start up P3D, then reopen CFG to discover the value has been reset to "P3DCoreAffinityMask=4095". Is there something I am doing wrong?
This is my entire [JobScheduler] entry, with calculated affinitymask:
[JobScheduler]
AffinityMask=4095
P3DCoreAffinityMask=65535
MainThreadScheduler=0
RenderThreadScheduler=2
FrameWorkerThreadScheduler=4
EDIT: When I use the calculator in easy mode and select Core Count 4 and HT enabled, I get a value of AffinityMask=252, so I enter that in cfg so the top reads:
[JobScheduler]
AffinityMask=4095
P3DCoreAffinityMask=252
Is this correct usage of it?
Sincerely,
Erik
- Rob Ainscough
- Posts: 3289
- Joined: Sat Jan 05, 2013 6:46 pm
- Location: Oregon USA
Re: Setting Affinity Mask for P3D V5.3 new scheduler
Erik, you would never have an AffinityMask value that is lower than the P3DCoreAffinityMask value, that's impossible and probably why P3D reset your value.
The AMD Ryzen 5 5600G is a 6 core 12 thread processor so don't know what your reference is to 4 core and HT? AMD have something called SMT (equivalent to Intel's HT). If you have SMT enabled then your settings should look something like (leave the OS core free, P3D using 5 cores):
[JobScheduler]
AffinityMask=4095
P3DCoreAffinityMask=4092
MainThreadScheduler=0
RenderThreadScheduler=2
FrameWorkerThreadScheduler=4
Cheers, Rob.
The AMD Ryzen 5 5600G is a 6 core 12 thread processor so don't know what your reference is to 4 core and HT? AMD have something called SMT (equivalent to Intel's HT). If you have SMT enabled then your settings should look something like (leave the OS core free, P3D using 5 cores):
[JobScheduler]
AffinityMask=4095
P3DCoreAffinityMask=4092
MainThreadScheduler=0
RenderThreadScheduler=2
FrameWorkerThreadScheduler=4
Cheers, Rob.
Rob Ainscough
-
- Posts: 59
- Joined: Thu Apr 16, 2020 5:29 pm
Re: Setting Affinity Mask for P3D V5.3 new scheduler
Thanks for the clarification Rob!
I now have set the entries as you've replied. It's greatly appreciated :D
Sincerely, Erik
I now have set the entries as you've replied. It's greatly appreciated :D
Sincerely, Erik
Re: Setting Affinity Mask for P3D V5.3 new scheduler
Rob hello
I have a late loading scenery problem
I want to change AffinityMask (255) but renews itself every time (15)
i7 6770k oc 4.6 what should i enter
current value below
[JobScheduler]
AffinityMask=15
P3DCoreAffinityMask=15
MainThreadScheduler=0
RenderThreadScheduler=2
FrameWorkerThreadScheduler=3
I have a late loading scenery problem
I want to change AffinityMask (255) but renews itself every time (15)
i7 6770k oc 4.6 what should i enter
current value below
[JobScheduler]
AffinityMask=15
P3DCoreAffinityMask=15
MainThreadScheduler=0
RenderThreadScheduler=2
FrameWorkerThreadScheduler=3
- Rob Ainscough
- Posts: 3289
- Joined: Sat Jan 05, 2013 6:46 pm
- Location: Oregon USA
Re: Setting Affinity Mask for P3D V5.3 new scheduler
Hello Safa,
There is no 6770K processor by Intel? Did you mean 6700K? If you have HT enabled for 6700K (4 cores / 8 threads) then you might want to try:
[JobScheduler]
AffinityMask=255
P3DCoreAffinityMask=252
MainThreadScheduler=0
RenderThreadScheduler=1
FrameWorkerThreadScheduler=2
P3D will reset your values if the affinity mask you provide doesn't make sense for your process type. You need to find out what your CPU type is and if you have HT enabled. If it keeps resetting to 15, then that means you have HT disabled assuming your processor is really a 6700K. So for that CPU, I would recommend you enable HT so you can use the above settings.
Cheers, Rob.
There is no 6770K processor by Intel? Did you mean 6700K? If you have HT enabled for 6700K (4 cores / 8 threads) then you might want to try:
[JobScheduler]
AffinityMask=255
P3DCoreAffinityMask=252
MainThreadScheduler=0
RenderThreadScheduler=1
FrameWorkerThreadScheduler=2
P3D will reset your values if the affinity mask you provide doesn't make sense for your process type. You need to find out what your CPU type is and if you have HT enabled. If it keeps resetting to 15, then that means you have HT disabled assuming your processor is really a 6700K. So for that CPU, I would recommend you enable HT so you can use the above settings.
Cheers, Rob.
Rob Ainscough
Re: Setting Affinity Mask for P3D V5.3 new scheduler
You are absolutely right :) i activated it now
Do you think I should add the following values?
FIBER_FRAME_TIME_FRACTION=0.01
TEXTURE_BANDWIDTH_MULT=48
Do you think I should add the following values?
FIBER_FRAME_TIME_FRACTION=0.01
TEXTURE_BANDWIDTH_MULT=48
- Rob Ainscough
- Posts: 3289
- Joined: Sat Jan 05, 2013 6:46 pm
- Location: Oregon USA
Re: Setting Affinity Mask for P3D V5.3 new scheduler
No, set target FPS to unlimited, Vsync on, and cap monitor to 30Hz.
Cheers, Rob.
Cheers, Rob.
Rob Ainscough
Re: Setting Affinity Mask for P3D V5.3 new scheduler
I have AF set to 1-2-3 on my AMD R7-3700X with disabled HT and sim works bit better than with 0-2-4. Then I tested setup 2-4-6 and result is same as 1-2-3.
If You can, try to avoid of physical Core 0 usage. Then for HT enabled try 2-4-6 setup, without HT 1-2-3.
If You can, try to avoid of physical Core 0 usage. Then for HT enabled try 2-4-6 setup, without HT 1-2-3.
-
- Posts: 1
- Joined: Sun Jan 23, 2022 5:20 pm
Re: Setting Affinity Mask for P3D V5.3 new scheduler
I just happen to have an I7-6700K as well. With HT on I get the following:
[JobScheduler]
AffinityMask=255
P3DCoreAffinityMask=255
MainThreadScheduler=0
RenderThreadScheduler=2
FrameWorkerThreadScheduler=4
Should I change that to what was posted above?
[JobScheduler]
AffinityMask=255
P3DCoreAffinityMask=255
MainThreadScheduler=0
RenderThreadScheduler=2
FrameWorkerThreadScheduler=4
Should I change that to what was posted above?
Re: Setting Affinity Mask for P3D V5.3 new scheduler
With enabled HT try :
MainThreadScheduler=2
RenderThreadScheduler=4
FrameWorkerThreadScheduler=6
MainThreadScheduler=2
RenderThreadScheduler=4
FrameWorkerThreadScheduler=6
- Beau Hollis
- Lockheed Martin
- Posts: 2452
- Joined: Wed Oct 06, 2010 3:25 pm
Re: Setting Affinity Mask for P3D V5.3 new scheduler
If the values you manually enter into the cfg are changed at runtime, it is because our validation code changed them. The values in the cfg reflect the final values used by P3D. The OS starts P3D using all cores. The process mask must be a subset of the mask P3D is started with and the core mask must always be a subset of the process affinity mask.
If you remove the entries entirely, they will be written back out with whatever values P3D uses by default. You may want to do this if you change processors or hyperthreading settings. For example if you have a 4 core processor with HT on, the default mask would be 255, but with HT off it would be 15. If you run P3D first with HT off and then turn it on, P3D would respect the mask pf 15 in the cfg and would end up using only 4 logical cores. It would also end up only using 2 of your physical cores because 15 (1111) sets the first 4 bits in the mask. To emulate HT off in this case you would want a mask of 85 (1010101) which sets every other bit to use one logical core from each of your physical cores.
If you remove the entries entirely, they will be written back out with whatever values P3D uses by default. You may want to do this if you change processors or hyperthreading settings. For example if you have a 4 core processor with HT on, the default mask would be 255, but with HT off it would be 15. If you run P3D first with HT off and then turn it on, P3D would respect the mask pf 15 in the cfg and would end up using only 4 logical cores. It would also end up only using 2 of your physical cores because 15 (1111) sets the first 4 bits in the mask. To emulate HT off in this case you would want a mask of 85 (1010101) which sets every other bit to use one logical core from each of your physical cores.
Beau Hollis
Prepar3D Software Architect
Prepar3D Software Architect
Re: Setting Affinity Mask for P3D V5.3 new scheduler
Thanks for the information you provided.
My system oc 4.6 for about 5 years
I get blue screen error when HT ENABLE (when HT ENABLE i have no problem)
in previous versions I was getting good performance with a value of 255
but now that I'm limited [JobScheduler] it's pretty bad and slow
Do you think I can reach a solution with a different action?
i7 6770k oc 4.6
[JobScheduler]
AffinityMask=15
P3DCoreAffinityMask=15
MainThreadScheduler=0
RenderThreadScheduler=2
FrameWorkerThreadScheduler=3
My system oc 4.6 for about 5 years
I get blue screen error when HT ENABLE (when HT ENABLE i have no problem)
in previous versions I was getting good performance with a value of 255
but now that I'm limited [JobScheduler] it's pretty bad and slow
Do you think I can reach a solution with a different action?
i7 6770k oc 4.6
[JobScheduler]
AffinityMask=15
P3DCoreAffinityMask=15
MainThreadScheduler=0
RenderThreadScheduler=2
FrameWorkerThreadScheduler=3
Re: Setting Affinity Mask for P3D V5.3 new scheduler
Hi guys just set up my new affinity mask settings
[JobScheduler]
AffinityMask=65535
P3DCoreAffinityMask=326
MainThreadScheduler=0
RenderThreadScheduler=1
FrameWorkerThreadScheduler=4
Render thread 1 because 2 is my fastest core
Frameworker set to 4 because core 8 is the second fastest core?
Is this correct? HT on but not ticked on the calculator. AMD Ryzen 7 3800X for ref, v5.3 HF2
Any help would be amazing :)
[JobScheduler]
AffinityMask=65535
P3DCoreAffinityMask=326
MainThreadScheduler=0
RenderThreadScheduler=1
FrameWorkerThreadScheduler=4
Render thread 1 because 2 is my fastest core
Frameworker set to 4 because core 8 is the second fastest core?
Is this correct? HT on but not ticked on the calculator. AMD Ryzen 7 3800X for ref, v5.3 HF2
Any help would be amazing :)