Is enabling "Hyperthreading" in BIOS a disadvantage with multiple cores?

1

I've got an Intel Core i7 920 in an Asus P6T, for which my OS reports having 8 cores. Core i7 is Quad, so presumably this is due to Hyperthreading being enabled in BIOS. I could imagine that Intel's HT might allow one core to max out when the other "half" is idle, but then wouldn't the OS have to first use the even/odd numbered cores?

My question is simple - given that most software can take advantage of only 1 core, is having 8 pseudo-cores, rather than only 4 real cores, actually hurting performance?

Please enlighten me, if you can.

BTW, it's running CentOS 5.3, if that matters.

NVRAM

Posted 2009-11-04T23:10:08.943

Reputation: 778

Incidentally, one advantage of allowing the hyper-threading is the flexibility in the number of cores provided to any virtual machines hosted on the system. – NVRAM – 2010-03-07T16:03:03.860

Answers

3

It shouldn't hurt. Linux's scheduler is aware of hyperthreading. Hyperthreading doesn't really cost anything if nothing is being run on the extra CPUs. With that said, it probably is not a large benefit unless you are running more than four CPU intensive threads at a time, but it should not hurt.

Captain Segfault

Posted 2009-11-04T23:10:08.943

Reputation: 1 224

I just rebooted, and disabled HT to see if I notice any difference. Honestly, though, I think most of my use is I/O limited. – NVRAM – 2009-11-05T17:42:38.803

1

The more cores the better.

Even though most pieces of software may not be multi core intelligent, the operating system is and if for example, you have sixteen processes, it will put two on each core that it sees.

The only time I would not use Hyperthreading is if I am 100% sure I will not benefit from it - During the P4 era, I managed several servers than had Hyperthreading and I decided to run benchmarking tools on them for the purpose they were being run, and there was just one that for some reason, (I forget it's task now) that simply outperformed by about 15% when it was turned off.

William Hilsum

Posted 2009-11-04T23:10:08.943

Reputation: 111 572

Hyper-threading requires not only that the operating system support multiple processors, but also that it be specifically optimized for HTT, and Intel recommends disabling HTT when using operating systems that have not been optimized for this chip feature. – Nav – 2011-03-19T07:43:25.810

But it doesn't add cores, there are still only 4. Is it not like adding rooms to a house by simply building interior walls? No CPU-hungry thread can expand to the size of the "room". So, to stretch the analogy, unless the scheduler can "move the walls" the thread is limited to 12.5% (vs 25%) of available hardware. – NVRAM – 2009-11-05T15:56:34.960

1Maybe I mis wrote the word cores - However, again, running benchmarks is the only way to really tell. Apart from one situation that I cannot remember, hyper threading always made the system much faster... You can't really put it down just to that analogy - if a program is designed to take on multiple cores (such as some encryption, compression or other), it will perform much faster as it "spreads out" where as if the application isnt aware, it is up to the OS to tell it what to use... – William Hilsum – 2009-11-05T16:04:14.587

Actually, the analogy is valid since I said "thread" rather than "process". But, from Segfault's post it seems that the Linux schedule can in fact "move the walls". – NVRAM – 2009-11-05T17:40:44.643

I didn't mean to say invalid - I just didn't understand it that well! but anyway, all I was trying to say is that I have done a hell of a lot of benchmarking (talking hours upon hours of work) and I found in nearly all cases, hyperthreading made the system faster some cases as much as 40%, however, when turned off, it was the same result every time with the exception of one task which I think was rendering (but can't honestly remember). – William Hilsum – 2009-11-05T21:54:50.183

Thanks, no offense intended. My only real experience w/HT was on a single-core P4 running WXP; I wasn't benchmarking, just doing normal development work (mostly in DevStudio). The machine would be maxed but the CPU usage meter wouldn't rise above ~60%; turning HT off made it seem faster [and that made me doubt it was I/O or RAM limited]. – NVRAM – 2009-11-06T03:59:54.273

0

you don't have 8 but 4 "pseudo cores", 4 physical + 4 virtual cores = 8 in total.

when you disable HT, you might as well get a Core i5, compare the benchmarks between i7 and i5 CPUs (both are quadcore Nehalems, with and without HT) and you know the answer to your question.

Molly7244

Posted 2009-11-04T23:10:08.943

Reputation: