only one logical CPU used in Xeon

Oliver Fromme olli at
Wed Mar 11 08:02:08 PDT 2009

Robert Heron wrote:
 > I have tried 6.2, 6.4 and 7.1 on two different servers. The first  
 > server of them (older) is Intel SE7501HG2 + 2 x Xeon 2.44GHz (2 cores  
 > in each Xeon)
 > The second one (newer) is Intel S5000VSA + 2 x Xeon 2.66GHz (4 cores  
 > in each Xeon)

I'm afraid that's wrong.

According to your dmesg output, the older machine has two
Xeon processors which support hyperthreading, so you have
a total of four logical CPUs (but only two physical).
These Xeons are *not* multi-core, they're single-core.

The newer machine has two Xeon processors with two cores
each (not four!), again with hyperthreading, so you have
a total of eight logical CPUs.

So everything is working as expected.

Here's how you can see the details in the demsg output:
The older machine:

 > Features = 0xbfebfbff <...,HTT,...>

The "HTT" bit in the features bitmask indicates that the
processor supports hyperthreading.

 >    Logical CPUs per core: 2

This also refers to hyperthreading:  You have two logical
(i.e. hyperthreaded) CPUs per core.

 > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs

That's the total number of logical CPUs:  You have two
processor packages, one core per package, and two HTT-
CPUs per core:  2 * 1 * 2 == 4.  But you only have two
physical cores (one per processor package).

Now the newer machine:

 > Features = 0xbfebfbff <...,HTT,...>

Again:  "HTT" == hyperthreading supported.

 >    Cores per package: 2

These are a multi-core processor:  There are two cores
per processor package.

 >    Logical CPUs per core: 2

And again hyperthreading:  Two logical CPUs per core.

 > FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs

So you get a total of eight logical CPUs, including
hyperthreading (2 * 2 * 2 == 8).  Note that there are
only four physical cores.

Whether hyperthreading will improve performance is
controversial.  Most people seem to believe that it
depends on your kind of application, but one thing is
sure:  hyperthreading will *not* double the performance,
not even nearly.  In most cases it's a matter of a few
percent only, probably barely noticeable.  And in some
cases hyperthreading will make things worse.

Best regards

Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:

"The scanf() function is a large and complex beast that often does
something almost but not quite entirely unlike what you desired."
        -- Chris Torek

More information about the freebsd-smp mailing list