From owner-freebsd-current@FreeBSD.ORG Tue Sep 16 00:36:52 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDFA21065670 for ; Tue, 16 Sep 2008 00:36:52 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from cauchy.math.missouri.edu (cauchy.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id AF10F8FC25 for ; Tue, 16 Sep 2008 00:36:52 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from laptop3.gateway.2wire.net (cauchy.math.missouri.edu [128.206.184.213]) by cauchy.math.missouri.edu (8.14.2/8.14.2) with ESMTP id m8G0a345001130; Mon, 15 Sep 2008 19:36:04 -0500 (CDT) (envelope-from stephen@math.missouri.edu) Message-ID: <48CEFF9B.2080505@math.missouri.edu> Date: Mon, 15 Sep 2008 19:36:43 -0500 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.1.16) Gecko/20080909 SeaMonkey/1.1.11 MIME-Version: 1.0 To: cpghost References: <48CDBC78.4010409@math.missouri.edu> <20080915185446.GB69615@phenom.cordula.ws> In-Reply-To: <20080915185446.GB69615@phenom.cordula.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: Improved multiprocessor usage on amd64 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: Tue, 16 Sep 2008 00:36:53 -0000 cpghost wrote: > On Sun, Sep 14, 2008 at 08:38:00PM -0500, Stephen Montgomery-Smith wrote: >> I have a dual core amd64 on which I run a processor intensive numerical >> program. I had been frustrated because it seemed to run 3 or 4 times >> faster under Linux. But with a recent upgrade of FreeBSD-CURRENT, it >> now goes at about the same speed as Linux. >> >> The program takes about an hour. For the first minute, the program runs >> rather slowly, but then it is as if the operating system finds its way, >> and suddenly it speeds up. "top -H" suggests that for the first minute >> that one thread is going really slowly, and is perhaps being starved or >> something. >> >> My question is - why is this happening, and is this something I should >> expect? Are there certain switches or sysctls I can set to make it go >> fast from the get go? > > It looks like you're running powerd (see in /etc/rc.conf). It can take up > to a minute for the load average of the machine to exceed a certain > threshold where powerd would finally bump the cpu(s) to full speed. > > As for sysctls, check the speed with something like: > > # sysctl dev.cpu.0 Excellent idea! I should have thought of that myself. Unfortunately it didn't help much when I switched powerd off.