Overclock or Hyperthreading?

Any problems with your Installation or other install related questions, please post here

Moderators: Steve Waite, SysAdmin

Overclock or Hyperthreading?

Postby Steve Waite » Sun Jan 22, 2017 3:01 pm

Overclock or Hyperthreading?

Most of us understand the principle of doing work generates heat: The more work our CPU completes, the more heat is generated to complete the work.

Given that two equal threads running on one core together complete in a certain time. The CPU switches in and out each thread to time-slice them so that they appear to complete together. This is known as concurrency.

Hyperthreading is an advanced CPU architecture which splits the core into two (can be more) Logical Processors (LPs). The arrangement is such that in very simple terms the switching between those two threads is drastically shortened. The longer the threads continue to be computed the more time is saved between them.

So it can be said that generally speaking, two equal threads complete on a Hyperthreaded core (when each thread is on a separate Logical Processor) in less time than they would take running together on the same single threaded core.


A quick look at task manager shows a typical Windows 10 PC is running 2000+ threads. We can imagine how much time is saved switching threads concurrently when Hyperthreading is enabled.


Let's look at a very important detail: We know that with Hyperthreading ENABLED we have completed the work in LESS TIME than we would with Hyperthreading DISABLED.

* In doing so have we have generated the same or less heat in less time? *


1. If we increase the clock speed of the PC we decrease the amount of time those threads take to complete. The same work is completed in less time and so as usual the heat per unit time is greater. We need faster cooling.

2. If we enable Hyperthreading on the PC we decrease the amount of time those threads take to complete. The same work is completed in less time and so as usual the heat per unit time is greater. We need faster cooling.


So what’s the point of Hyperthreading?

Hyperthreading uses cycles of the CPU that are otherwise wasted doing nothing if HT is disabled or unavailable on the CPU model.

* This wasted CPU time generates heat whether HT is enabled or disabled *

We can now see that for a given increase in heat generated per unit time, the core completes more work with HT enabled than with disabled.


Since the FSX/P3D simulators ultimate Frame Rate (fps) is governed by CPU work done per unit time and the amount of objects displayed, a general mistake is made to turn HT off and increase the overclock. This happens in pursuit of higher frequencies for higher fps.

Instead we should moderate the overclock to come back down the heat curve, and apply HT. After all, HT is an expensive addition to the CPU, like a supercharger is to an internal combustion engine. As with the supercharge engine, with HT enabled we have a little more maintenance to worry about.


We must remember that a problem of some application types is that they will grab as many cores or LPs as they can find and that would effectively double the amount of work on the CPU. This is often mistaken; “HT enabled gets too hot” we hear, when in fact it is simply undesirable application behaviour we forgot to check.

These simulators based on FSX also behave in that way, they grab all the available cores and so we find the [JOBSCHEDULER] section in the configuration file which currently specifies an AffinityMask value. Affinity masks were originally used to control heat because they can dictate where the app ruins on a multi CPU server.

Games are not programmed for Hyperthreading explicitly, not just because we don’t all own HT core CPUs, but also because they don’t generally need worry whether HT is enabled or not. However some games and especially FSX based simulators have many background concurrent processes and can benefit from being allowed to use certain cores without doubling up those processes on cores with HT enabled. So we are offered the use of the Affinity Mask.

The equivalent of running the simulator on four cores is binary 1111 where a digit one (1) appears in all four LP (core) positions. Zeros represent Masked LPs and are unavailable to the application. We turn on HT and now logically we want 85=01,01,01,01 or 170=10,10,10,10 we can see two digits per core (two LPs per core) and only allowing one LP per core where we have unmasked those LPs with the digit one (1), the zeros represent off LPs to the app.

If we don’t have our settings correct with HT enabled we generate more heat unnecessarily that we don’t need. This is heat that can’t be generated on the non HT core simply because the app makes only half the work with half the core count (LPs).

The many processes of the Windows PC complete in less time with Hyperthreading enabled and also this uses spare cycles that otherwise are unused and create heat anyway. We should be able to arrange our CPU frequency to take advantage of HT. The PC will run faster and yet not get as hot as we would find with overclocking, mathematically speaking. If not we by definition have processes running that create undesirable work for no gain. In strict tests it has been be very easily concluded that the HT enabled CPU provides a smoother simulation and a very small fps improvement at the same time.


Conclusion: To obtain the best overall performance for foreground and background processes of the FSX/P3D simulator, we moderate the overclock to allow the successful use of Hyperthreading and apply an adequate Affinity Mask.


Remember the basic rules:

Enable HT, enable LPs until the sim stops loading any faster, keep to single LPs per core unless they are purely gathering data. With lesser cores available we can gang up two LPs per core, but this intensifies workload on the core and extra work done = extra heat made. So be sure to moderate the overclock setting to accommodate HT enabled. HT off is no competition with the proper Affinity Mask applied. Remember that simply using all the cores in your brand new 32 core CPU will oversaturate the bus using up all the memory bandwidth and slow down the sim, perhaps gradually throughout the flight getting worse. Vsync=on Unlimited and Monitor refresh of 60Hz gives ~60 fps holding back the sim. Locked fps keeps a look ahead and is more taxing on the system. Unlimited with VSync=Off runs faster than the monitor refresh if it can and all those frames are unused = excess heat. Therefore Unlimited set alone is simply a debugging mode or performance check. The Triple Buffer simply means the sim works out the places of moving objects more precisely, but not as well as the fixed fps setting.
software architect at codelegend.com
equipment: i9-9980Xe 64GB 2xRTX2080ti NVLink 2TB M.2 NVMe,
i9-9900X 64GB RTX2080ti 2TB M.2 NVMe, i7-3960X 32GB GTX680 4TB RAID10,
NAS @7TB RAID10 (16TB)
Steve Waite
 
Posts: 5055
Joined: Wed Jun 29, 2011 12:02 am

Return to Installation

Who is online

Users browsing this forum: No registered users and 3 guests

cron