From owner-freebsd-current@FreeBSD.ORG Tue Sep 16 09:06:18 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 BCD4C1065679 for ; Tue, 16 Sep 2008 09:06:18 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 36EC68FC1C for ; Tue, 16 Sep 2008 09:06:18 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id m8G968V8020866; Tue, 16 Sep 2008 11:06:08 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id m8G967H4020865; Tue, 16 Sep 2008 11:06:07 +0200 (CEST) (envelope-from olli) Date: Tue, 16 Sep 2008 11:06:07 +0200 (CEST) Message-Id: <200809160906.m8G967H4020865@lurza.secnetix.de> From: Oliver Fromme To: freebsd-current@FreeBSD.ORG, cpghost@cordula.ws, stephen@math.missouri.edu In-Reply-To: <20080915185446.GB69615@phenom.cordula.ws> X-Newsgroups: list.freebsd-current User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 16 Sep 2008 11:06:09 +0200 (CEST) Cc: Subject: Re: Improved multiprocessor usage on amd64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-current@FreeBSD.ORG, cpghost@cordula.ws, stephen@math.missouri.edu 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 09:06:18 -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. No. powerd(8) does not look at the load average at all, it looks at the CPU usage. It detects within 0.5 seconds (the default polling interval) when the CPU usage went up and starts adjusting the performance. It certainly doesn't take a minute. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "I invented Ctrl-Alt-Delete, but Bill Gates made it famous." -- David Bradley, original IBM PC design team