Jump to content

Is there ever a case where a "hyperthreading core" is better than a "true core"?

This is where I bump into the limits of my understanding of hyperthreading.

 

A classic analogy is that adding more cores is like adding more mouths for eating food. Adding hyperthreading is like adding more hands to help you get the food to the mouths.

 

Now, let's look at a 4-core machine in two scenarios:

* 4 true cores with no hyperthreading

* 3 true cores with 1 hyperthreaded core.

 

I know this doesn't exist on real CPUs but this is possible to create by setting up processor affinity, which is where the real-world application of this question comes in:

Is there ever a case where one could get better performance from an application by assigning it 3 true cores and one hyperthreaded "core" rather than assigning it 4 "true cores?"

 

If we go back to the food analogy, is there ever a case where it's better to have 3 mouths and 2 hands, rather than 4 mouths and one hand? When described this way, I can almost certainly say "yes" but I have a feeling this analogy breaks down somewhere, which is where the limits of my understanding come in.

 

is there ever a case where a hyperthreaded "core" is preferrable to assigning another true core to an operation?

CPU: i9 9900k @ 5GHz RAM: 128GB Corsair @ 2666MHz Motherboard: Asus Z390 Prime P Graphics Card: EVGA 2060 OS Drive: 1TB NVME Other drives:860 Evo 1TB, Crucial BX500 500GB x 2, Seagate 2TB 7200RPM

Link to comment
Share on other sites

Link to post
Share on other sites

I am going with no. hyperthreading is not the same as a core. 2 cores + HT is not the same as 4 cores.

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, vorticalbox said:

I am going with no. hyperthreading is not the same as a core. 2 cores + HT is not the same as 4 cores.

I agree that they're not the same thing. I feel like that's where the question gets tricky: Because they're not the same thing, that means they do different things.

 

Since they do different things, does that mean there could be a case where hyperthreading does a job better than a core?

CPU: i9 9900k @ 5GHz RAM: 128GB Corsair @ 2666MHz Motherboard: Asus Z390 Prime P Graphics Card: EVGA 2060 OS Drive: 1TB NVME Other drives:860 Evo 1TB, Crucial BX500 500GB x 2, Seagate 2TB 7200RPM

Link to comment
Share on other sites

Link to post
Share on other sites

I assume your "3 true core + 1 HT core" CPU will effectively be a 3.5 core CPU.

 

I think the only thing that HT does is to allow 1 physical core to do 2 tasks simultaneously

Computer: Maximus VIII Gene - i7 6700k @ 4.2 GHz cooled by a Deepcool Frostwin v2.0 - Sapphire R9 280X Dual-X - 4x4gb Corsair Vengeance LPX Black 3600 mHz - Samsung 950 Pro 512gb - Seagate Barracuda 1tb - Corsair RM750X - Phanteks Enthoo Evolv ATX Tempered Glass Grey with a 2m Enthoo Luxe RGB strip.

 

Peripherals: IKEA Bekant desk -  2x Dell 1080p IPS monitors - Corsair K70 RGB with Cherry MX Browns - Steelseries Sensei with a Steelseries QCK mousepad and a Sennheiser G4ME ZERO white

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, nerd866 said:

I agree that they're not the same thing. I feel like that's where the question gets tricky: Because they're not the same thing, that means they do different things.

 

Since they do different things, does that mean there could be a case where hyperthreading does a job better than a core?

A hyperthread performs only about 50-75% as good as an actual physical core. 

 

So no.

 

 •E5-2670 @2.7GHz • Intel DX79SI • EVGA 970 SSC• GSkill Sniper 8Gb ddr3 • Corsair Spec 02 • Corsair RM750 • HyperX 120Gb SSD • Hitachi 2Tb HDD •

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Sakkura said:

No. Because there's no such thing as a hyperthreaded core. There's just one physical core, which can address two threads. Neither of those threads is any more "real" than the other one.

That's a good way to describe it. 

 

If this is the case, that one CPU can address two threads, does that mean it doesn't matter in terms of CPU affinity whether I assign a process to CPU0 or CPU1 if they're both referring to the same physical core?

CPU: i9 9900k @ 5GHz RAM: 128GB Corsair @ 2666MHz Motherboard: Asus Z390 Prime P Graphics Card: EVGA 2060 OS Drive: 1TB NVME Other drives:860 Evo 1TB, Crucial BX500 500GB x 2, Seagate 2TB 7200RPM

Link to comment
Share on other sites

Link to post
Share on other sites

Of course there is a case where a CPU without hyperthreading can destroy a CPU that has hyperthreading, even if it's within the same brand.

 

Spoiler

My Atom N2600 gets destroyed by the Pentium G3258. The Atom has 2C/4T and the Pentium has 2C/2T

 

Athlon X2 for only 27.31$   Best part lists at different price points   Windows 1.01 running natively on an Eee PC

My rig:

Spoiler

Celeronator (new main rig)

CPU: Intel Celeron (duh) N2840 2.16GHz Dual Core

RAM: 4GB DDR3 1333MHz

HDD: Seagate 500GB

GPU: Intel HD Graphics 3000 Series

Spoiler

Frankenhertz (ex main rig)

CPU: Intel Atom N2600 1.6GHz Dual Core

RAM: 1GB DDR3-800

HDD: HGST 320GB

GPU: Intel Graphics Media Accelerator (GMA) 3600

 

Link to comment
Share on other sites

Link to post
Share on other sites

As mentioned, Physical cores can be split in two and then HT happens. 

 

So with 3+1 just means that its 3 physical cores and one of those cores is behaving like two cores.

Connection200mbps / 12mbps 5Ghz wifi

My baby: CPU - i7-4790, MB - Z97-A, RAM - Corsair Veng. LP 16gb, GPU - MSI GTX 1060, PSU - CXM 600, Storage - Evo 840 120gb, MX100 256gb, WD Blue 1TB, Cooler - Hyper Evo 212, Case - Corsair Carbide 200R, Monitor - Benq  XL2430T 144Hz, Mouse - FinalMouse, Keyboard -K70 RGB, OS - Win 10, Audio - DT990 Pro, Phone - iPhone SE

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Sakkura said:

No. Because there's no such thing as a hyperthreaded core. There's just one physical core, which can address two threads. Neither of those threads is any more "real" than the other one.

If efficient use of available computational power is the goal the this is the place where HT can be "better."

 

But, for most users, that is a very unimportant metric.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Djole123 said:

Of course there is a case where a CPU without hyperthreading can destroy a CPU that has hyperthreading, even if it's within the same brand.

 

  Reveal hidden contents

My Atom N2600 gets destroyed by the Pentium G3258. The Atom has 2C/4T and the Pentium has 2C/2T

 

 

 
 

That is mostly due to differences  in architecture.   atom is 1.6 GHz vs 3.2 on the pent. The atom is 3.5 watts and the pent is 53 watts.

 

The Pentium is a much higher clock speed and much more power to work with.

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, Djole123 said:

Of course there is a case where a CPU without hyperthreading can destroy a CPU that has hyperthreading, even if it's within the same brand.

 

  Reveal hidden contents

My Atom N2600 gets destroyed by the Pentium G3258. The Atom has 2C/4T and the Pentium has 2C/2T

 

This is completely due to the atom being based on an old shit architecture, and being 1/2 of the clockspeed of the pentium. Saying hyperthreading doesn't help from that comparison is just completely biased.

 

http://cpu.userbenchmark.com/Compare/Intel-Atom-N2600-vs-Intel-Pentium-G3258/m704vs2434

 

 •E5-2670 @2.7GHz • Intel DX79SI • EVGA 970 SSC• GSkill Sniper 8Gb ddr3 • Corsair Spec 02 • Corsair RM750 • HyperX 120Gb SSD • Hitachi 2Tb HDD •

Link to comment
Share on other sites

Link to post
Share on other sites

I know how HT works and I can't even write a good argument lol

 

HT just allows 1 core to do 2 things at the same time.

Intel i7 12700K | Gigabyte Z690 Gaming X DDR4 | Pure Loop 240mm | G.Skill 3200MHz 32GB CL14 | CM V850 G2 | RTX 3070 Phoenix | Lian Li O11 Air mini

Samsung EVO 960 M.2 250GB | Samsung EVO 860 PRO 512GB | 4x Be Quiet! Silent Wings 140mm fans

WD My Cloud 4TB

Link to comment
Share on other sites

Link to post
Share on other sites

A good case for study might be in distributed compute applications, where you don't necessarily care about how fast a single task is run, but you want as many total tasks run in a given time. Take an i7 or i3, and you can run them with or without HT. In my testing, the bonus throughput from HT varies from about 0% to 50%. That is, you could say at best a dual core without HT is roughly equivalent to 3 cores when HT is enabled. Worst case, there is no benefit at all or possibly some negative performance from extra overhead.

 

If anyone knows of any case where running HT will give more than 50% throughput compared to without HT, I'd be interested to hear about it.

Main system: i9-7980XE, Asus X299 TUF mark 2, Noctua D15, Corsair Vengeance Pro 3200 3x 16GB 2R, RTX 3070, NZXT E850, GameMax Abyss, Samsung 980 Pro 2TB, Acer Predator XB241YU 24" 1440p 144Hz G-Sync + HP LP2475w 24" 1200p 60Hz wide gamut
Gaming laptop: Lenovo Legion 5, 5800H, RTX 3070, Kingston DDR4 3200C22 2x16GB 2Rx8, Kingston Fury Renegade 1TB + Crucial P1 1TB SSD, 165 Hz IPS 1080p G-Sync Compatible

Link to comment
Share on other sites

Link to post
Share on other sites

A core with HT does not "transform" into 2 cores. People think a core with HT can do 2 things at the same time, but it is not really like that, the instructions are processed with less delay, thus making the core faster. But to process 2 instructions literaly at the same time, you need two cores.

 

Ps: im no expert, if I explained poorly, someone correct me please.

Ultra is stupid. ALWAYS.

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Taja said:

A core with HT does not "transform" into 2 cores. People think a core with HT can do 2 things at the same time, but it is not really like that, the instructions are processed with less delay, thus making the core faster. But to process 2 instructions literaly at the same time, you need two cores.

 

Ps: im no expert, if I explained poorly, someone correct me please.

It can do two things at once. But not always, it can do two instructions at same time. As long as the instructions do not require the same modules. For example, if I do a multiply and a mem read with diff registers they should occur at same time. 

 

So,  yes 4 physical cores are better than 3. But the 3 core with one core with hyperthreading is more power friendly.

 

Link to comment
Share on other sites

Link to post
Share on other sites

The benefits that can be gleaned from Hyperthreading are entirely dependent on the task at hand, and how well the task(s) is/are coded. By it's nature, Hyperthreading allows for utilization of resources that would otherwise go unused by duplicating select parts. Hyperthreading does not add raw compute as a result, but rather, allows the core to better utilize what it has. In addition, due to the components that are duplicated, latency in switching tasks is very minimal.

 

A 3 core Hyperthreaded processor has 3/4 the raw compute of an equally clocked, non hyperthreaded quad core. The former can address 6 tasks before it starts running into context switching penalties. The latter is more powerful, but isn't as likely to be fully utilized, and suffers from context switching penalties after just 4 tasks.

 

For all intents and purposes, the i5 is equally as powerful as the i7 in raw compute terms, though the lack of Hyperthreading makes utilization more difficult in the i5, thus lesser real-world performance is observed.

My eyes see the past…

My camera lens sees the present…

Link to comment
Share on other sites

Link to post
Share on other sites

2 physical cores, assuming they are of the same clock speed and architecture, will always perform better than a single hyper threaded core . 

 

A core is essentialy an assembly line for information. Try to visualize it as  a feeder dumps shit on a line, the line assembles it into useful parts, then a compiler puts out in order to send out. That's a physical core. 

 

A hyperthreaded core is the same but with two lines to organize the info, but the feeder can still only feed so much , and the compiler can only compile so much. Adding the extra line better utilizes and cuts back on down time in between organizing and compiling, but having an entire extra line and compiler can still do more work . 

 

Excuse my clunky visual aid. But there is only one feeder and one compiler per core whether HT or not.  they can only work so fast, essentially becoming a bottleneck in a HT core

1478693027735542806927.jpg

Edited by Juggern0ttt
Added visual aid
Link to comment
Share on other sites

Link to post
Share on other sites

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

×