Hyper Threading vs overclocking

4

2

What is the difference between these two, and under what circumstances would I want to implement them? Are there circumstances when I would only want 1 and not the other?

According to Wikipedia, hyperthreading is a proprietary Intel technology, whereas overclocking seems to apply to any CPU (Intel or other).

But still, they both seem like very similar ways of speeding up processing time on the same machine, and I wonder if they are synonyms or mutually-redundant.

pnongrata

Posted 2013-05-08T13:41:46.583

Reputation: 2 212

2

Hyperthreading is just Intel's brand name for Simultaneous Multithreading. Some IBM Power and MIPS family processors also implement it. http://en.wikipedia.org/wiki/Simultaneous_multithreading

– Dan is Fiddling by Firelight – 2013-05-08T19:24:36.173

Answers

8

Two completely separate approaches to increase performance.

Overclocking is the process of tweaking motherboard (or graphics cards) settings to have the 'clock' run faster than the vendor certified. Can increase performance for single or multiple threaded scenarios. Also has risk because excess heat can be generated which can damage circuitry.

Hyperthreading is a way to present one core to the OS as if it were two cores (see What is hyper-threading and how does it work??). This allows the OS to run two threads on a single core, somewhat simultaneously. In reality the hypervisor causes the core to switch between threads very rapidly. This can increase performance in some multi-threaded scenarios. Also there is no risk to this approach like there is with overclocking. but as noted an Intel only solution.

They are not mutually exclusive. You can overclock a hyperthreaded CPU.

Brad Patton

Posted 2013-05-08T13:41:46.583

Reputation: 9 939

This sounds a lot like multitasking, except done under the control of a hardware/firmware scheduler, rather than the software scheduler that almost every operating system written in the past 30 years has.  I guess the processor core duplicates some resources, like general registers and memory-management registers, to allow task switching to be faster than when done by a software scheduler.  Or am I missing something?

– Scott – 2013-05-08T18:56:56.650

You say, “there is no risk to this approach …”  I feel obligated to point out that Wikipedia says, “In May 2005 Colin Percival demonstrated that on the Pentium 4, a malicious thread can use a timing attack to monitor the memory access patterns of another thread with which it shares a cache, allowing the theft of cryptographic information.[ref]

– Scott – 2013-05-08T18:57:36.560

@Scott I said like there is with overclocking meaning the vendor has certified the chip to function with HT enabled. A failed chip should be covered under warranty unlike overclocking. – Brad Patton – 2013-05-08T19:08:02.117

Yeah, I was splitting hairs. – Scott – 2013-05-08T19:10:41.267

1Switching between threads is extremely expensive (need to restore entire register state, flush the entire pipeline, etc.) with respect to individual instructions, so I find your explanation hard to believe. My understanding of hyper-threading is that it's a clever way to allow a second thread to make use of a core's unused logical units (idle arithmetic units, etc). Does anyone know whose understanding is correct? – BlueRaja - Danny Pflughoeft – 2013-05-08T19:21:26.547

Intel processors are capable of dispatching multiple instructions at the same time and having them run concurrently, this is why hyperthreading is more useful and threads only block each other when they require the same resource: "As on Core™2 processors, the RS (reservation station) dispatches the uops to one of 6 dispatch ports where they are consumed by the execution units. This implies that on any cycle between 0 and 6 uops can be dispatched for execution. " software.intel.com/sites/products/collateral/hpc/vtune/performance_analysis_guide.pdf – Mokubai – 2013-05-08T20:35:22.277

Hyperthreading does not involve a hypervisor! In the x86 implementations, it is Simultaneous MultiThreading (Itanium using "hyperthreading" for SoEMT). This allows operations from both threads to begin execution in the same cycle (limited by issue ports). Also, overclocking can introduce a risk of transient glitches where incorrect results can be generated. – Paul A. Clayton – 2013-05-08T23:12:44.833

3

Hyperthreading (HT) is more threads. Overclocking is more processor speed.

Overclocking is more useful and practical for gaming applications as opposed to hyperthreading. HT is more useful for editing or rendering of say media files because it allows multiple pieces of software to run at the same processing speed instead of dividing.

Overclocking is better for games because it is one application running as opposed to multiple and can take advantage of the boosted performance of the processor.

Travis

Posted 2013-05-08T13:41:46.583

Reputation: 1 044

2The "is one application running" is completely wrong. Games are (generally) highly multithreaded, and keep in mind that thread != process. – Bakuriu – 2013-05-08T17:50:27.830

@Bakuriu except for graphics code, which is run on the GPU not the CPU, are still fairly lightly threaded. That's why mid range gaming system guides generally recommend buying a $200 quad core non-HT i5 processor instead of the $300 i7 with HT enabled. It's possible that the 8core CPU in the PS4 and XBox 720 (rumors only atm) might change the situation in a few years. – Dan is Fiddling by Firelight – 2013-05-08T19:49:43.807

@Bakuriu: Very few PC games are multi-threaded. Some games (notably, Source Engine) will use a second thread for rendering tasks, but even that is not common. – BlueRaja - Danny Pflughoeft – 2013-05-08T21:25:13.410

@BlueRaja I believe any multiplayer game will have at least a thread listening & communicating with the server/other players and a thread for user's interaction(+ eventually rendering tasks or running AI of opponents). Also the server for such games probably use one thread per client. – Bakuriu – 2013-05-08T21:41:57.207

Yes, I should have mentioned that. All networked software will have a listen-thread, but we usually ignore that because it spends so much of its time idle, you will see essentially zero performance improvement when it runs on a second core. – BlueRaja - Danny Pflughoeft – 2013-05-08T21:47:57.063