From owner-freebsd-current@FreeBSD.ORG Mon Sep 15 18:54:44 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 2EB57106566B for ; Mon, 15 Sep 2008 18:54:44 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.freebsd.org (Postfix) with ESMTP id BB4738FC19 for ; Mon, 15 Sep 2008 18:54:43 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from phenom.cordula.ws (phenom [192.168.254.60]) by fw.farid-hajji.net (Postfix) with ESMTP id 193C8354FA; Mon, 15 Sep 2008 20:54:41 +0200 (CEST) Date: Mon, 15 Sep 2008 12:54:46 -0600 From: cpghost To: Stephen Montgomery-Smith Message-ID: <20080915185446.GB69615@phenom.cordula.ws> References: <48CDBC78.4010409@math.missouri.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48CDBC78.4010409@math.missouri.edu> User-Agent: Mutt/1.5.18 (2008-05-17) 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: Mon, 15 Sep 2008 18:54:44 -0000 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 > Thanks, Stephen Regards, -cpghost. -- Cordula's Web. http://www.cordula.ws/