Web Hosting Talk







View Full Version : Freebsd 5.1 and Hyperthreading


andrewk
06-19-2004, 12:05 PM
Does anyone know if its a known issue that hyperthreading does NOT work on freebsd-5.1 ?

Well I have been noticing huge lag spikes while runnning my game hosting box under freebsd 5.1. Also the loads were just rediculous 3-5.00+

I just didnt understand what was going on... Until I looked at my redhat box where I have hyperthreading and under the C column in top it actually showed the 0 or 1 for what processor was doing the work. Well on freebsd 5.1 it was only showing 0's and the system idle never went below 50% so I knew something was up.

After tons of work I successfully got my box to 5.2.1 with a cvsup. Now under top and C column I can successfully see the 0 and 1 's for what processor is doing the work... also the load is VERY VERY LOWER!!!

Man thank god ... hate buying hyperthreading box and then dont get the technology to work.

Does anyone know if hyperthreading is broke on 5.1? I know I had this problem on more then one server. So Im guessing hyperthreading is not working right at least on some hardware for freebsd 5.1.

Post your thoughts or comments about this.

LP-Trel
06-19-2004, 12:08 PM
Okay understand this about the 5.x tree of FreeBSD. Each release is not exactly complete. You are tracking what amounts to a rebuild of FreeBSD. 5.3 is the actual "stable" of the 5.x tree and it isn't out yet. ;)

andrewk
06-19-2004, 12:17 PM
Well still I expect it to work correct... I am glad it is now working. I cannot run freebsd 4.9 because it does not work right with some games that we host.

And personally I have never had any problems with release before... This is about the first time I have run into anything funny like this. The reason that my providers installed freebsd 5.1 is because of ide controllers when installing 5.2.1. We were afraid to update to 5.2.1 because we were unaware if it would even boot up. But now that everything is working I am glad that I have done it.

bqinternet
06-19-2004, 10:25 PM
I actually prefer to disable hyperthreading in server settings. Sometimes the use of hyperthreading can actually hurt your performance.

Steven
06-19-2004, 10:26 PM
Originally posted by bqinternet
I actually prefer to disable hyperthreading in server settings. Sometimes the use of hyperthreading can actually hurt your performance.


Yes this is extremely common in linux. It adds to your io overhead slowing down your server.

dandanfirema
06-20-2004, 08:51 AM
I had a similar issue recently where I discovered that I could never get below 50% util on a hyperthreading box. There is a setting in 5.1 that disables the hyperthreaded processors from performing "user" tasks.

allera
06-20-2004, 09:15 AM
To enable hyperthreading for user processes:

sysctl machdep.hlt_logical_cpus=0

To make it permanent:

echo 'machdep.hlt_logical_cpus=0' >> /etc/sysctl.conf

I'm not sure if FreeBSD 5.1 requires this or not. Run

sysctl machdep.hlt_logical_cpus

and see what value you get. If 1, change it to 0. If 0 already, no need to do the above. If it doesn't exist, it has either enabled logical CPUs already by default or they changed the variable name.

The CPUs should come up instantly, no need for rebooting or doing anything else.