From owner-freebsd-questions@FreeBSD.ORG Mon Feb 25 10:30:13 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E03E516A40A for ; Mon, 25 Feb 2008 10:30:13 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 32E3713C4D1; Mon, 25 Feb 2008 10:30:13 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <47C298B5.7040907@FreeBSD.org> Date: Mon, 25 Feb 2008 11:30:13 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Tigger References: <20080224110010.GA4447@edward.lilypie.com> <47C1590F.3020605@bsdforen.de> <20080224230744.50539c03@piglet> <47C18665.9050600@FreeBSD.org> <20080225210134.2d0e2908@piglet> In-Reply-To: <20080225210134.2d0e2908@piglet> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Dual core CPU's, but only 2 CPU's in-use? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2008 10:30:14 -0000 Tigger wrote: > On Sun, 24 Feb 2008 15:59:49 +0100 > Kris Kennaway wrote: > >> Tigger wrote: >>> On Sun, 24 Feb 2008 12:46:23 +0100 >>> Dominic Fandrey 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