To Hyperthread or not to Hyperthread

Any issues, problems or troubleshooting topics related to computer hardware and the Prepar3D client application
Post Reply
User avatar
JorgenSA
Posts: 6001
Joined: Sun Mar 11, 2018 7:17 am
Location: 5 NM ENE of EDXF

To Hyperthread or not to Hyperthread

Post by JorgenSA »

That is the question! Whether tis noble..... sorry, I got carried away with old Shakespeare.

But the question is, should Hyperthreading be enabled?

I have an Intel i7 7700K, normal clock is at 4.2 GHz and this one is overclocked to 4.66 GHz. Hyperthreading was on by default in my Z170-A's BIOS, giving an AffinityMask=84 in Prepar3D.cfg.

Now, for P3D v. 4.5, I have read that I should turn it off in the BIOS, giving AffinityMask=14.

What are the learned opinions of the members of this august forum?

Thanks -

Jorgen
System: i5-12600K@4.9 GHz, ASUS ROG STRIX Z690-I motherboard, 32 GB 4800 MHz DDR5 RAM, Gainward RTX 3060 w/ 12 GB DDR6 VRAM, Windows 10 Pro.

All views and opinions expressed here are entirely my own. I am not a Lockheed-Martin employee.
User avatar
downscc
Posts: 1623
Joined: Mon Dec 01, 2014 5:46 pm
Location: KCRP

Re: To Hyperthread or not to Hyperthread

Post by downscc »

The last good explanation I read from LM:

The default behavior is to use all cores. The only purpose of applying an affinity mask would be to disable one or more cores. We don't recommend this, but we recognize that it may be beneficial in some cases. For example, there could be an add-on that communicates with another application. There could also be other unrelated windows applications running, that users don't want to close when they run Prepar3D. Higher fidelity training devices often rely on additional applications to perform simulation work. In that case, the system might be configured to allocate specific cores to specific applications. This can be done via OS settings, but the AM setting in the cfg makes it a bit easier.

The other use case that is often mentioned is to disable the hyper-threaded core that shares a physical processor with the primary thread. Sometimes doing a full workload on the HT core can slow down the primary. This is really chip and workload specific. We updated our job scheduler in v2 or v3 such that it typically uses core 1 without overloading it. In our tests, even with HT on, using all cores was typically better than masking off core 1 after the scheduling changes were made. Since then, we have not recommended custom AM settings.

One last thing I should note is that add-on dlls are considered to be part of the Prepar3D process. The AM settings will be applied to those dlls as well. Add-on developers may be creating their own threads and assigning heavy work loads to them.

Beau Hollis P3D Software Architect
23 Apr 2018

I have a 8700K and I turn off HT (I get instant blurries with it on) and don't use an affinity mask. Bottom line is to use what works best for your system.
Dan Downs
KCRP
User avatar
JorgenSA
Posts: 6001
Joined: Sun Mar 11, 2018 7:17 am
Location: 5 NM ENE of EDXF

Re: To Hyperthread or not to Hyperthread

Post by JorgenSA »

+1 to this: Bottom line is to use what works best for your system.

That is what we all strive for, but our systems are so different.

For now, I have turned HT off, and set the AffinityMask to 14. I will test this some, and then try without AffinityMask.

Thanks for your reply -

Jorgen
System: i5-12600K@4.9 GHz, ASUS ROG STRIX Z690-I motherboard, 32 GB 4800 MHz DDR5 RAM, Gainward RTX 3060 w/ 12 GB DDR6 VRAM, Windows 10 Pro.

All views and opinions expressed here are entirely my own. I am not a Lockheed-Martin employee.
cirurgiao
Posts: 119
Joined: Sat Aug 10, 2013 11:17 pm

Re: To Hyperthread or not to Hyperthread

Post by cirurgiao »

Since I'm a newbie a "dumb" question:
How to use all cores? I have i7 4960X @ 3.60
Tks
Eduardo Passos
Win11 PRO 64bit / I9-10940X / 128GB DDR4 Corsair / GeForce RTX2080TI
User avatar
JorgenSA
Posts: 6001
Joined: Sun Mar 11, 2018 7:17 am
Location: 5 NM ENE of EDXF

Re: To Hyperthread or not to Hyperthread

Post by JorgenSA »

Friend,

There are no "dumb" questions.... except maybe those not asked.

Try googling "affinitymask calculator" and read what it says.

Jorgen
System: i5-12600K@4.9 GHz, ASUS ROG STRIX Z690-I motherboard, 32 GB 4800 MHz DDR5 RAM, Gainward RTX 3060 w/ 12 GB DDR6 VRAM, Windows 10 Pro.

All views and opinions expressed here are entirely my own. I am not a Lockheed-Martin employee.
User avatar
downscc
Posts: 1623
Joined: Mon Dec 01, 2014 5:46 pm
Location: KCRP

Re: To Hyperthread or not to Hyperthread

Post by downscc »

cirurgiao wrote: Thu May 23, 2019 2:28 pm Since I'm a newbie a "dumb" question:
How to use all cores? I have i7 4960X @ 3.60
Tks
You use all cores by not using an affinity mask. All cores used by default, the mask turns off access to cores by the application that the mask applies to.
Dan Downs
KCRP
Post Reply