From owner-freebsd-questions@FreeBSD.ORG Thu Nov 17 23:02:41 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE1FA16A41F for ; Thu, 17 Nov 2005 23:02:41 +0000 (GMT) (envelope-from freebsd01@dgmm.net) Received: from lon-mail-3.gradwell.net (lon-mail-3.gradwell.net [193.111.201.127]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FEB243D46 for ; Thu, 17 Nov 2005 23:02:40 +0000 (GMT) (envelope-from freebsd01@dgmm.net) Received: from 82-39-78-125.cable.ubr02.jarr.blueyonder.co.uk ([82.39.78.125] helo=webmaker@asgard.uk) by lon-mail-3.gradwell.net with esmtp (Gradwell gwh-smtpd 1.199) id 437d0c0f.3568.b66 for freebsd-questions@freebsd.org; Thu, 17 Nov 2005 23:02:39 +0000 (envelope-sender ) From: dgmm To: freebsd-questions@freebsd.org Date: Thu, 17 Nov 2005 23:02:39 +0000 User-Agent: KMail/1.7.2 References: <20051107185226.M70218@io.dk> In-Reply-To: <20051107185226.M70218@io.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200511172302.39460.freebsd01@dgmm.net> Subject: Re: enable smp / hyperthreading 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: Thu, 17 Nov 2005 23:02:41 -0000 On Monday 07 November 2005 18:53, jwl@io.dk wrote: > Hi > > I've just installed 6.0-RELASE and am trying to get SMP to work (I have af > Pentium 4 with HT). So I've compiled the kernel with 'options SMP' and > according to dmesg the two CPUs are found: > > FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs > =A0cpu0 (BSP): APIC ID: =A00 > =A0cpu1 (AP): APIC ID: =A01 > > But I'm not sure that both are enabled, because at this is at the end of > dmesg and I dont see the other CPU being enabled somewhere: > > SMP: AP CPU #1 Launched! > > According to 'sysctl -a' there are 2 CPUs, but only 1 active and SMP > doesnt seem to be disabled: > > kern.smp.cpus: 2 > kern.smp.disabled: 0 > kern.smp.active: 1 > > So I thought that it might help to but 'kern.smp.active=3D2' in > /boot/loader.conf, but after a reboot it is back to 1 again. > > What am I missing here? I'm sure people more knowledgeable than me will be able to confirm or comme= nt=20 further on the following but here goes anyway. =46rom my point of view, using SMP with a single HT processor is a waste of= time=20 unless you routinely run multiple programmes which require an approximately= =20 equal amount of CPU time or you need to keep about half of your CPU time fr= ee=20 for other programs. =46or example, encoding video with mplayer on a P4 with SMP enabled only us= ed=20 one virtual CPU. It encodes approx. twice as fast with SMP switched off (a= nd=20 HT switched off in BIOS) There does appear to be some lost CPU cycles due = to=20 HT switching too. Note that I've not done any serious testing or looked deeply into this=20 subject. This is simply my limited experience. =2D-=20 Dave