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 > cpu0 (BSP): APIC ID: 0 > cpu1 (AP): APIC ID: 1 > > 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=2' 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 comment further on the following but here goes anyway. From my point of view, using SMP with a single HT processor is a waste of time unless you routinely run multiple programmes which require an approximately equal amount of CPU time or you need to keep about half of your CPU time free for other programs. For example, encoding video with mplayer on a P4 with SMP enabled only used one virtual CPU. It encodes approx. twice as fast with SMP switched off (and HT switched off in BIOS) There does appear to be some lost CPU cycles due to HT switching too. Note that I've not done any serious testing or looked deeply into this subject. This is simply my limited experience. -- Dave
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511172302.39460.freebsd01>
