Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Sep 2006 14:43:24 +0200
From:      Ivan Voras <ivoras@fer.hr>
To:        freebsd-stable@freebsd.org
Subject:   Re: FreeBSD does not use all cpus on top show.
Message-ID:  <eebiq0$ea5$1@sea.gmane.org>
In-Reply-To: <4508DC51.4060300@gddsn.org.cn>
References:  <4508DC51.4060300@gddsn.org.cn>

next in thread | previous in thread | raw e-mail | index | archive | help
Huang wen hui wrote:
> hi,
> I have HP Server install FreeBSD 6.1R/amd64 with 2CPUs ,2 logical CPUs
> per core.
> On top show, It should show 4 cpus, but I never see 1 and 3 cpu on show.
> Does anything I miss?

This is a simplified version of things, but it will help you: CPUs 0 and 
2 are "real" CPUs, while 1 and 3 are additional hyperthreaded 
"counterparts" of those. Since hyperthreading is disabled in FreeBSD by 
default (because it generally doesn't help performance and has a sort-of 
security hole in the hardware itself), processes are never scheduled to 
run on CPUs 1 and 3.

You can either disable hyperthreading in BIOS, so you'll have only CPUs 
0 and 1, or enable hyperthreading in FreeBSD with 
machdep.hyperthreading_allowed=1 sysctl, which will enable you to use 
all 4 logical CPUs.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eebiq0$ea5$1>