Linux and Pentium 4 HyperThreading

Aenslead

Golden Member
Sep 9, 2001
1,256
0
0
Hello, there.

Is HyperThreading useful for Linux enviroments? Is it also seen as a second processor? If so, does it offer performance advantages?

Thankyou.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Despite the, probably minimal, security issues it should be just fine. I think Linux has a bit more support for it than just seeing it as two processors, but I've never used it.
 

Aenslead

Golden Member
Sep 9, 2001
1,256
0
0
Its just that I've never seen any comments on it. Windows this, Windows that... and after all, HT was thought for WinXP, hence my question.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
HT is just as usefull in either OS, there's still resource contension and the potential security issues that n0c mentioned but overall it's usually helpful. I believe you need a 2.6 kernel for it to take proper considerations when scheduling processes on the HT sibling.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
HT is a bit overrated, but newer versions of Linux can handle it just as well or better then Windows XP.

You have to be sure to be using a *-smp kernel package, I beleive. Those are kernels with smp support...
 

hooflung

Golden Member
Dec 31, 2004
1,190
1
0
HT can be very iffy on some installs but seems to hate servers more. 2.4 and 2.6 linux have their issues with HT and some apps especially servers have issues with HT where they actually perform slower. User Beware!

Other than that... HT is generally ok on linux.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
HT only gives performance benefits if the 2 running processes aren't contending for resources and since the main CPU and it's sibling share a lot of resources there's not too many instances where the benefits are noticable, mainly just odd circumstances like running 1 fp heavy process and 1 int heavy because they won't contend for registers as much.
 

Aenslead

Golden Member
Sep 9, 2001
1,256
0
0
Originally posted by: hooflung
HT can be very iffy on some installs but seems to hate servers more. 2.4 and 2.6 linux have their issues with HT and some apps especially servers have issues with HT where they actually perform slower. User Beware!

Other than that... HT is generally ok on linux.

Ah! Dissapointing, but not unexpected. I feared such reply. I heard same rumors elsewhere, where it was recomended to disable HT on Linux machines... sad, sad...
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Originally posted by: Aenslead
Originally posted by: hooflung
HT can be very iffy on some installs but seems to hate servers more. 2.4 and 2.6 linux have their issues with HT and some apps especially servers have issues with HT where they actually perform slower. User Beware!

Other than that... HT is generally ok on linux.

Ah! Dissapointing, but not unexpected. I feared such reply. I heard same rumors elsewhere, where it was recomended to disable HT on Linux machines... sad, sad...

That's not an issue with Linux, just HT in general.
As Nothinman has said, in many cases you'll run into resource contention, this was especially true with older Xeons(they had an earlier HT implementation) and older versions of Linux.
The 2.4 kernel series didn't have native HT support, it just trated the logical CPU's as if they were two physical CPU's, just like Win2K does.
This is of course bad for a 2-way setup where it'll look like you have 4 CPU's.
If you have two running tasks the kernel may very well assign them to the first two logical CPU's, leaving one physical processor idle.

Anyway, if you're running a 2.6 based distro, just leave it on for every day desktop work, there are some cases where you'll wanna turn it off, but if you don't know about it, chances are you won't be running into them.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Just get rid of the Pentium 4 junk and buy a Opteron.

They are better anyways. :)


The issues with HT on Linux are issues with HT, not Linux. You have the same issues with Windows, but it's not like hardware rags are going to tell you much about it when Intel adverts pays the bills.