Jump to content
Sign in to follow this  
Mejjo

P3D 5.3 Hotfix 2 released

Recommended Posts

Note that when inheriting affinity from a parent process we could see what might appear odd and that might be a reason certain AMs cannot be used. For example:

Let's say we are running our parent process with AM=85="01010101"...

The child process sees a CPU with only four cores "1111"=15 and so in this case we cannot use AffinityMasks that contain more than four cores in that child process.

 


Steve Waite: Engineer at codelegend.com

Share this post


Link to post
41 minutes ago, SteveW said:

If we want to be very accurate; a process started by a parent inherits the core affinity of the parent and inherits the permissions of the parent.

We can be even more accurate than that: it inherits the core affinity of the parent, unless it has set one by itself, using the relevant API calls.

Edited by virtuali

Share this post


Link to post
37 minutes ago, SteveW said:

Add-ons on the other hand can consume perhaps 20% of a core at times and we don't want that happening on the core with the screen view updating.

Referencing Add-ons started by P3D and not the user.

Would that go some way towards explaining my observation in an earlier post in this thread that Core 0 (HT=ON) activity saturated persistently at 100% while P3D was running and yet this was not the case while using an AffinityMask that placed P3D’s main thread on Core 2 of my i7-5960X instead of on Core 0?

Something along the lines of:

[JobScheduler]
AffinityMask=65535   (or 21844?)
P3DCoreAffinityMask=21844
MainThreadScheduler=0
RenderThreadScheduler=1
FrameWorkerThreadScheduler=2

Mike

Edited by Cruachan
  • Like 1

Share this post


Link to post
9 minutes ago, Cruachan said:

Would that go some way towards explaining my observation in an earlier post in this thread that Core 0 activity saturated persistently at 100% while P3D was running and yet this was not the case while using an AffinityMask that placed P3D’s main thread on Core 2 (HT=ON) instead of on Core 0?

Something along the lines of:

[JobScheduler]
AffinityMask=21844
P3DCoreAffinityMask=21844
MainThreadScheduler=0
RenderThreadScheduler=1
FrameWorkerThreadScheduler=2

Mike

When it was saturated persistently at 100%, did the fps suffer. There are some situations whereby the core looks like 100% but is not as it consumes performance counters but not core bandwidth. If fps is suffering then it seems you have something running there that consumes core bandwidth.

You could also do:

07,06,05,04,03,02,01,00=core number
11,11,11,11,01,01,01,11=AffinityMask=65367
11,11,11,11,01,01,01,11=P3DCoreAffinityMask=65367 OR
00,11,11,11,01,01,01,11=P3DCoreAffinityMask=16215
00,00,00,00,00,00,01,00=MainThreadScheduler=2
00,00,00,00,00,01,00,00=RenderThreadScheduler=3
00,00,00,00,01,00,00,00=FrameWorkerThreadScheduler=4
 

 

  • Like 1

Steve Waite: Engineer at codelegend.com

Share this post


Link to post
4 hours ago, SteveW said:

HT enabled systems load files quicker, run networking quicker, all that is highly threaded. Because the CPU does more work with HT enabled, it comes with more heat (heat = work done). Systems that want to be overclocked to the max so that the main task can run faster might experience excess heat so they run with HT disabled even though that limits the overall performance of the system. The file loading performance can be increased by15% simply by turning on HT, that might be better than increasing the clock speed by 5% to gain extra fps when the fps is capped.

Thanks for the info Steve.  My system is currently just doing testing as I finish the build of my cockpit so I will run some tests with HT on to see if I notice any temperature issues.  My chip is liquid cooled and by luck of the draw has always run on the lower end of temperatures.  It also runs on the lower end voltage wise to get to 5Ghz, which I know helps with temperatures as well.

  • Like 1

Building a full scale 737-800 Simulator running P3D v5.x 210 degree wrap around screenspacer.png

Jason Lohrenz (@lohrenz737) • Instagram photos and videos

Lohrenz 737 Simulator Project (lohrenzsimulator.com)

Share this post


Link to post
1 hour ago, virtuali said:

We can be even more accurate than that: it inherits the core affinity of the parent, unless it has set one by itself, using the relevant API calls.

Yes.

Currently in my Prepar3D.cfg:

[JobScheduler]
AffinityMask=68719476735
P3DCoreAffinityMask=68719476735
MainThreadScheduler=0
RenderThreadScheduler=1
FrameWorkerThreadScheduler=2

If I start P3D v5.3 from this .BAT line:

C:\Windows\System32\cmd.exe /C start "Start P3D" /affinity F "C:\Program Files\Lockheed Martin\Prepar3D v5\Prepar3D.exe"
F being Hex = Decimal 15 = BIN 1111

Then I close P3D and look at the cfg it now reads;

[JobScheduler]
AffinityMask=15
P3DCoreAffinityMask=15
MainThreadScheduler=0
RenderThreadScheduler=1
FrameWorkerThreadScheduler=2
 

Any process started by P3D will only 'see' 1111 and can only use the affinity APIs to set up cores within 1111.

 

 


Steve Waite: Engineer at codelegend.com

Share this post


Link to post

After reading all this I'm thinking about enabling HT on my 10900K and giving it a try. Any suggestion for [JobScheduler] would be much appreciated. Thanks again for the HT OFF recommendations. 


Dan

i9-13900K / Asus Maximus Hero Z790 / RTX 4090 FE / G.Skill Trident Z5 RGB 32 GB DDR5-6400 CL32 / Artic Liquid Freezer II 360 / Samsung 980 PRO SSD 1TB PCIe NVMe M.2 / Samsung 980 PRO SSD 2TB PCIe NVMe M.2 / Samsung 970 EVO Plus SSD 2TB PCIe NVMe M.2 / EVGA 1000W G3, 80+ Gold / Phanteks Eclipse P600S ATX Mid Tower / Arctic P14 PWM Case Fans / LG C2 42 Inch Class 4K OLED TV/Monitor / Windows 11 Pro

Share this post


Link to post
1 hour ago, SteveW said:

When it was saturated persistently at 100%, did the fps suffer. There are some situations whereby the core looks like 100% but is not as it consumes performance counters but not core bandwidth. If fps is suffering then it seems you have something running there that consumes core bandwidth.

Hi Steve,

To be honest, it was only a relatively brief test session following an extended break from swimming. I was running an earlier untested driver set (472.12) which quickly produced the ‘Device Hung’ error (despite Ray’s helpful advice regarding the registry entries) and, following a restart, subsequently crashed my PC - PC rebooted spontaneously while P3D was running - at first I thought we had experienced a power cut, but this proved not to be the case.

My favoured test area is at ORBX’s Darrington Mun., WA. During the test the sim ran very smoothly with only one brief hesitation and frame rates were maintained at around 30 throughout. Core 0 was saturated throughout. 

Since then I have updated to the latest drivers (511.23) which seem solid enough following an extended period of testing (including 3DMark).

These are the JobScheduler entries I’ve used so far with V5.3 HF2:

[JobScheduler]

;AffinityMask=64853

;AffinityMask=21845

AffinityMask=65535

;P3DCoreAffinityMask=64853

;P3DCoreAffinityMask=21845

P3DCoreAffinityMask=21844

MainThreadScheduler=0

RenderThreadScheduler=1

FrameWorkerThreadScheduler=2

Probably makes little difference, but I was modifying my previous post around the time you posted.

Regards,

Mike

P.S. Sorry about the double spacing/enlarged font above - that’s what happens when you try to shortcut your effort by copying original text from a .cfg file, emailing said text and then copying/pasting into a forum post!

Edited by Cruachan

Share this post


Link to post
1 hour ago, SteveW said:

You could also do:

07,06,05,04,03,02,01,00=core number
11,11,11,11,01,01,01,11=AffinityMask=65367
11,11,11,11,01,01,01,11=P3DCoreAffinityMask=65367 OR
00,11,11,11,01,01,01,11=P3DCoreAffinityMask=16215
00,00,00,00,00,00,01,00=MainThreadScheduler=2
00,00,00,00,00,01,00,00=RenderThreadScheduler=3
00,00,00,00,01,00,00,00=FrameWorkerThreadScheduler=4

Interesting!

Looks like the rules are changing! Are you now suggesting we try the effect of masking the first 2 LPs on Core 00 for P3D whereas before it was only LP0. It does seem logical as LP1 usually sees very little activity.

Mike

Edited by Cruachan
  • Like 1

Share this post


Link to post
2 minutes ago, Wise87 said:

After reading all this I'm thinking about enabling HT on my 10900K and giving it a try. Any suggestion for [JobScheduler] would be much appreciated. Thanks again for the HT OFF recommendations. 

You have 10 cores and with HT enabled that will be 20 Logical Processors (LPs). With HT enabled we basically enable one LP on each of the first three cores giving "01,01,01" on the right of the binary. On the left of the binary we can add all ones and give it a try.

The best thing to do is write out a logical processor map of that, remember that right-most digit belongs to core0/LP0 and separating pairs of HT LPs with commas:

HT Enabled 10 core
09,08,07,06,05,04,03,02,01,00=core number
11,11,11,11,11,11,11,01,01,01=AffinityMask=1048533
11,11,11,11,11,11,11,01,01,01=P3DCoreAffinityMask=1048533
00,00,00,00,00,00,00,00,00,01=MainThreadScheduler=0
00,00,00,00,00,00,00,00,01,00=RenderThreadScheduler=1
00,00,00,00,00,00,00,01,00,00=FrameWorkerThreadScheduler=2
 

I can highlight the string of ones and zeros (11,11,11,11,11,11,11,01,01,01) and copy/paste (CTRL+C/CTRL+V) right into the Windows calculator (Programmer mode) BIN (binary notation) field. Looking in the DEC (decimal) field I get 1,048,533.

That will give maximum performance for the 10 core, being 3 LPs "01,01,01" doing the time critical stuff and 14 LPs (11,11,11,11,11,11,11) gathering scenery. However, the large amount of LPs dedicated to scenery gathering can impact the overall system bandwidth, in general it should be OK but we can allocate less LPs in the P3DCoreAffinityMask e.g. 00,00,11,11,11,11,11,01,01,01=P3DCoreAffinityMask=65493. Each system needs testing to check that out. To go further use a batch file line (similar to that which I posted earlier using the HEX value from the Windows Calc) and start add-ons like AI Injector and Weather Injector to use any of the cores left of the "01,01,01" for example: use LPs with ones 11,11,11,11,11,11,11,00,00,00. We can also use other tools to set affinity on our addons when they start.

In task Manager we see core0/LP0 at the top left but in the binary notation it is on the right.

I hope that helps, come back if need be.

Regards

Steve

 

  • Like 1

Steve Waite: Engineer at codelegend.com

Share this post


Link to post
3 minutes ago, SteveW said:

I hope that helps, come back if need be.

Regards

Steve

 

Outstanding, I'll report back when I make the suggested changes. 

Thanks Steve

  • Like 1

Dan

i9-13900K / Asus Maximus Hero Z790 / RTX 4090 FE / G.Skill Trident Z5 RGB 32 GB DDR5-6400 CL32 / Artic Liquid Freezer II 360 / Samsung 980 PRO SSD 1TB PCIe NVMe M.2 / Samsung 980 PRO SSD 2TB PCIe NVMe M.2 / Samsung 970 EVO Plus SSD 2TB PCIe NVMe M.2 / EVGA 1000W G3, 80+ Gold / Phanteks Eclipse P600S ATX Mid Tower / Arctic P14 PWM Case Fans / LG C2 42 Inch Class 4K OLED TV/Monitor / Windows 11 Pro

Share this post


Link to post
3 minutes ago, Cruachan said:

Interesting!

Looks like the rules are changing! Are you now suggesting we try the effect of masking the first 2 LPs on Core 00 for P3D whereas before it was only LP0. It does seem logical as LP1 usually sees very little activity.

Mike

Yes, the thing about P3D v5.3 is that it introduces the means to position those three main tasks where we want to with Main, Render and FrameWorker. Remember at the moment these should be used in that order for best results:

00,11,11,11,01,01,01,11=P3DCoreAffinityMask=16215

00,00,00,00,00,00,01,00=MainThreadScheduler=2
00,00,00,00,00,01,00,00=RenderThreadScheduler=3
00,00,00,00,01,00,00,00=FrameWorkerThreadScheduler=4

  • Like 1

Steve Waite: Engineer at codelegend.com

Share this post


Link to post

Thanks Steve, I’ll certainly give 16215 a shot. Will need to keep an eye on the max temps reached by Core 0 assuming, that is, P3D makes use of LP1 in addition to ‘maxing’ out LP0. I am assuming that main thread activity will not be shared by the 2 LPs...or am I wrong about that?

EDIT: Actually I am wrong about that as, somewhat belatedly, I note that you have moved the three ThreadSchedulers:

00,00,00,00,00,00,01,00=MainThreadScheduler=2
00,00,00,00,00,01,00,00=RenderThreadScheduler=3
00,00,00,00,01,00,00,00=FrameWorkerThreadScheduler=4

I’m confused! So, what’s new?...lol. Could I ask you to run over again how you arrive at 2,3 and 4 for the three ThreadSchedulers in the above example, please.

Is it as simple as counting from Core 0=1, Core 2=2, Core 3=3 and Core 4=4 and the threads are placed on the Logical Processor of each of the three Cores as defined by the P3DCoreAffinityMask?

Just fired up Prepar3D and I note that the main thread is now running on LP2 and... surprise, surprise...while sitting on the rwy at 1S2, logical processor activity is holding at 80%. This looks promising!

Other activity is seen on LP4 (20%) and LP6 (10%).

LP0 (10%), LP8 (10%), LP14 (10%)

Regards,

Mike

Edited by Cruachan

Share this post


Link to post
6 hours ago, SteveW said:

The file loading performance can be increased by15% simply by turning on HT, that might be better than increasing the clock speed by 5% to gain extra fps when the fps is capped.

Steve, my CPU was clocked at 4.6Ghz prior to overclocking. Now running at 5.1 that represents a 10.7% increase.

If P3D takes longer to show the Scenario screen or before the sim is fully loaded that’s not really important to me because I’m working on my flight plan in PFPX on my laptop. Each to their own of course.


Ray (Cheshire, England).
System: P3D v5.3HF2, Intel i9-13900K, MSI 4090 GAMING X TRIO 24G, Crucial T700 4Tb M.2 SSD, Asus ROG Maximus Z790 Hero, 32Gb Corsair Vengeance DDR5 6000Mhz RAM, Win 11 Pro 64-bit, BenQ PD3200U 32” UHD monitor, Fulcrum One yoke.
Cheadle Hulme Weather

Share this post


Link to post
2 hours ago, SteveW said:

Yes, the thing about P3D v5.3 is that it introduces the means to position those three main tasks where we want to with Main, Render and FrameWorker. Remember at the moment these should be used in that order for best results:

00,11,11,11,01,01,01,11=P3DCoreAffinityMask=16215

00,00,00,00,00,00,01,00=MainThreadScheduler=2
00,00,00,00,00,01,00,00=RenderThreadScheduler=3
00,00,00,00,01,00,00,00=FrameWorkerThreadScheduler=4

Steve, May I inquire how Alder Lake on both Win 10 and Win 11 are impacted by this with the -P and -E cores and the scheduler in W11...  

Speaking as a 12700 owner 🙂

Just wondering how that changes the equation.  

Trying SO hard to follow all this. 

  • Like 2

Have a Wonderful Day

-Paul Solk

Boeing777_Banner_BetaTeam.jpg

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
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...