Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 5738E9FB664 for ; Fri, 27 Apr 2007 05:13:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 92155-08 for ; Fri, 27 Apr 2007 05:13:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from svr2.hagander.net (svr2.hagander.net [88.198.128.226]) by postgresql.org (Postfix) with ESMTP id C445F9FC0CD for ; Fri, 27 Apr 2007 05:13:51 -0300 (ADT) Received: by svr2.hagander.net (Postfix, from userid 1000) id D0D0DDCC8A8; Fri, 27 Apr 2007 10:13:50 +0200 (CEST) Date: Fri, 27 Apr 2007 10:13:50 +0200 From: Magnus Hagander To: Andres Retzlaff Cc: pgsql-performance@postgresql.org Subject: Re: Usage up to 50% CPU Message-ID: <20070427081350.GD12895@svr2.hagander.net> References: <20070427080653.GB12895@svr2.hagander.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/461 X-Sequence-Number: 24338 On Fri, Apr 27, 2007 at 08:10:48AM +0000, Andres Retzlaff wrote: > Hi Magnus, > > in this case each CPU goes up to 50%, giveing me 50% total usage. I was > specting as you say 1 query 100% cpu. > > Any ideas? No. 1 query will only use 100% of *one* CPU, which means 50% total usage. You need at least one query per CPU to reach full 100% of the whole system. (Actually, you can get slightly above 50% since the query will run on one CPU and the OS and autovacuum and bgwriter can run on the other. But it's marginally) //Magnus