[KLUG Members] re: SMP kernel for a single Xeon Processsor?

Mike Williams members@kalamazoolinux.org
Thu, 11 Mar 2004 13:46:10 -0500


>
> Subject:
> [KLUG Members] SMP kernel for a single Xeon Processsor?
> From:
> "Bob Kanaley" <rvk@agdia.com>
> Date:
> Wed, 10 Mar 2004 14:13:01 -0500
>
> To:
> <members@kalamazoolinux.org>
>
>
>Greeting all,
>
>Recently, I installed RH9 on a single Xeon processor HP DL140 1U server. I
>ended up with an SMP kernel. I know the multi-threading capabilities of the
>Xeon make the installer think I have multiple CPU's. But with only a single
>physical CPU, I don't know if having a SMP kernel is a good thing to help
>the CPU make use of threading or if it is just a bogus waste of IO-APIC
>IRQ's.
>
>I read that it really doesn’t hurt a single CPU box to run a SMP kernel, but
>there is some additional overhead when you do this.
>
>Since I don't have a clue how to run all those fancy benchmarking tests
>people like Adam run, I really don’t know if I should be running the SMP
>kernel on this box.
>
>Anyone have experience with this?
>
>  
>
First hand experience, no. Knowledge, yes. Before the days of 
hyperthreading, it did not hurt (much) to run an SMP kernel on a single 
processor machine. However, with hyperthreading on, you can get into 
inefficiencies if the kernel is SMP-aware, but not hyperthreading aware. 
Hyperthreading creates the illusion of 2 CPU's, but you can only run 2 
processes at the same time if they use different parts of the CPU: A 
memory copy with a floating point operation is fine, but you can't run 2 
integer math operations together. If you have a lot of the same 
operations, performance is going to go down because you'll get the 
overhead of SMP without the benefits. Your second integer operation will 
just stall until the first one is done.

Solution: either turn off hyperthreading (I think that's possible in the 
BIOS) or compile a kernel that explicitly supports it. Might be 
supported in late 2.4 kernels; I'm pretty sure it's available in 2.6.