From owner-freebsd-current@FreeBSD.ORG Sun Sep 18 19:49:17 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A65116A41F for ; Sun, 18 Sep 2005 19:49:17 +0000 (GMT) (envelope-from cperciva@freebsd.org) Received: from pd5mo1so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06E0F43D45 for ; Sun, 18 Sep 2005 19:49:16 +0000 (GMT) (envelope-from cperciva@freebsd.org) Received: from pd2mr4so.prod.shaw.ca (pd2mr4so-qfe3.prod.shaw.ca [10.0.141.107]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IN100LLN303GQ10@l-daemon> for freebsd-current@freebsd.org; Sun, 18 Sep 2005 13:48:03 -0600 (MDT) Received: from pn2ml2so.prod.shaw.ca ([10.0.121.146]) by pd2mr4so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IN100ARF303R370@pd2mr4so.prod.shaw.ca> for freebsd-current@freebsd.org; Sun, 18 Sep 2005 13:48:03 -0600 (MDT) Received: from [192.168.0.60] (S0106006067227a4a.vc.shawcable.net [24.87.209.6]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0IN100I0C2ZUKU@l-daemon> for freebsd-current@freebsd.org; Sun, 18 Sep 2005 13:48:03 -0600 (MDT) Date: Sun, 18 Sep 2005 12:47:54 -0700 From: Colin Percival In-reply-to: <000c01c5bc85$445b3ef0$6401a8c0@aw001> To: "Roger O. Svenning" Message-id: <432DC46A.1000904@freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en X-Enigmail-Version: 0.92.0.0 References: <000c01c5bc85$445b3ef0$6401a8c0@aw001> User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050724) Cc: freebsd-current@freebsd.org Subject: Re: A question about Intel HyperThreading X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2005 19:49:17 -0000 Roger O. Svenning wrote: > Due to a fatal hardware failure we replaced one of our AMD based > NeverWinter Nights game -servers with an Intel Pentium 4 one running > 6.0-beta4 > > Look at the top extract below and notice the 50% idle value. > No matter what, it sits at 50% idle all the time when the nwserver > process is running. > > Neither have I ever seen top reporting any process using the other > logical cpu, so basically it sits at 50% idle no matter how much load I > throw at it. Due to a widely-reported security problem, recent versions of FreeBSD disable hyperthreading unless you set the machdep.hyperthreading_allowed tunable in /boot/loader.conf. What you're seeing is a consequence of the mechanism which disables hyperthreading -- the "second thread" is present but is forced to remain idle. > The nwserver service is not multithreaded and I'm guessing it's using > only one of the logical cpus, but are there actually processing power > sitting idle here or is it just a top-weirdness? There is a logical cpu sitting idle, but (due to the way hyperthreading works) there isn't really any processing power sitting idle. > Needless to say I want the nwserver process to be able to use all > processing power available in the cpu. If you want to maximize system performance, you should take SMP out of your kernel configuration; it adds overhead without providing any benefit on a single-processor system. Colin Percival