Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Nov 2005 23:02:39 +0000
From:      dgmm <freebsd01@dgmm.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: enable smp / hyperthreading
Message-ID:  <200511172302.39460.freebsd01@dgmm.net>
In-Reply-To: <20051107185226.M70218@io.dk>
References:  <20051107185226.M70218@io.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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