From owner-freebsd-stable@FreeBSD.ORG Thu Sep 14 12:44:23 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D93716A403 for ; Thu, 14 Sep 2006 12:44:23 +0000 (UTC) (envelope-from freebsd-stable@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7F6443D45 for ; Thu, 14 Sep 2006 12:44:22 +0000 (GMT) (envelope-from freebsd-stable@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GNqZc-0005HZ-1I for freebsd-stable@freebsd.org; Thu, 14 Sep 2006 14:44:08 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Sep 2006 14:44:08 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Sep 2006 14:44:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-stable@freebsd.org From: Ivan Voras Date: Thu, 14 Sep 2006 14:43:24 +0200 Lines: 18 Message-ID: References: <4508DC51.4060300@gddsn.org.cn> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 1.5.0.4 (X11/20060625) In-Reply-To: <4508DC51.4060300@gddsn.org.cn> Sender: news Subject: Re: FreeBSD does not use all cpus on top show. X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Sep 2006 12:44:23 -0000 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.