Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Feb 2008 11:30:13 +0100
From:      Kris Kennaway <kris@FreeBSD.org>
To:        Tigger <tigger@lvlworld.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Dual core CPU's, but only 2 CPU's in-use?
Message-ID:  <47C298B5.7040907@FreeBSD.org>
In-Reply-To: <20080225210134.2d0e2908@piglet>
References:  <20080224110010.GA4447@edward.lilypie.com>	<47C1590F.3020605@bsdforen.de> <20080224230744.50539c03@piglet>	<47C18665.9050600@FreeBSD.org> <20080225210134.2d0e2908@piglet>

next in thread | previous in thread | raw e-mail | index | archive | help
Tigger wrote:
> On Sun, 24 Feb 2008 15:59:49 +0100
> Kris Kennaway <kris@FreeBSD.org> wrote:
> 
>> Tigger wrote:
>>> On Sun, 24 Feb 2008 12:46:23 +0100
>>> Dominic Fandrey <kamikaze@bsdforen.de> wrote:
>>>
>>>> Tigger wrote:
>>>>> Hello. I have a Xeon system with 2 CPU's installed (dual-cores).
>>>>> Under FreeBSD 6.2, a systat reported 4 CPUs in use and so did
>>>>> dmesg. 
>>>>>
>>>>> Under FreeBSD 6.3, dmesg is reporting the 4 CPUs, but systat is
>>>>> only reporting 2 CPUs (CPU 0 and CPU 2). 
>>>>>
>>>>> How do I enabled the second cores on the CPU's or are they really
>>>>> running but systat is not reporting the CPU load across the cores?
>>>> You can run 'top -S' to check how many idle processes exist. If
>>>> there are four, everything is fine.
>>>>
>>>
>>> Sadly, no luck. Only cpu0 and cpu2 are reported:
>>>
>>>   PID USERNAME  THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU
>>> COMMAND 11 root        1 171   52     0K     8K CPU2   2 143:43
>>> 92.38% idle: cpu2 13 root        1 171   52     0K     8K RUN    0
>>> 142:33 92.04% idle: cpu0
>> Are your CPUs really dual-core, or single core + hyperthreaded?
>>
>> Kris
>>
> 
> Thank you! Your email sent me off to do what I should have done first -
> some research. I assumed (wrongly) that 'Logical CPUs per core: 2'
> meant 'Dual Core', and when I saw the following:
> 
> FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
>  cpu0 (BSP): APIC ID:  0
>  cpu1 (AP): APIC ID:  1
>  cpu2 (AP): APIC ID:  6
>  cpu3 (AP): APIC ID:  7
> 
> I also thought 'Dual Core', however this is not the case. The CPU's
> are single core with Hyper Threading Tech.
> 
> But this research has also lead to some confusion. Its clear there are
> 2 CPU with 2 Logical cores each, but only 2 cores are in use - why?
> 
> Also, the 'man (4) smp' talks about (possible) performance issues with
> Hyper Threading enabled - does this mean I should set
> 'machdep.hlt_logical_cpus 1' (it is currently set to 0) - or because the
> Logical Cores are not being used I can forget about this?

hyperthreading is not enabled by default on 6.x.  See the security 
advisory for discussion and how to enable it.

Kris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47C298B5.7040907>