Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id CFBC02E0052 for ; Tue, 22 Apr 2008 20:59:13 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 93055-03 for ; Tue, 22 Apr 2008 20:58:59 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by developer.postgresql.org (Postfix) with ESMTP id 5D2292E0044 for ; Tue, 22 Apr 2008 20:59:06 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JoSO2-0006U7-Pr for pgsql-performance@postgresql.org; Tue, 22 Apr 2008 23:58:58 +0000 Received: from 89-172-63-116.adsl.net.t-com.hr ([89.172.63.116]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Apr 2008 23:58:58 +0000 Received: from ivoras by 89-172-63-116.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Apr 2008 23:58:58 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org From: Ivan Voras Subject: Re: CPU bound at 99% Date: Wed, 23 Apr 2008 01:58:47 +0200 Lines: 14 Message-ID: References: <20080422153045.GB5961@starling-software.com> <20080422161637.GF5961@starling-software.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 89-172-63-116.adsl.net.t-com.hr User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) In-Reply-To: <20080422161637.GF5961@starling-software.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/335 X-Sequence-Number: 29828 Bryan Buecking wrote: > On Tue, Apr 22, 2008 at 10:55:19AM -0500, Erik Jones wrote: >> Are you referring to PHP's persistent connections? Do not use those. >> Here's a thread that details the issues with why not: >> http://archives.postgresql.org/pgsql-general/2007-08/msg00660.php . > > Thanks for that article, very informative and persuasive enough that > I've turned off persistent connections. Note that it's not always true - current recommended practice for PHP is to run it in FastCGI, in which case even though there are hundreds of Apache processes, there are only few PHP processes with their persistent database connections (and unused PHP FastCGI servers get killed off routinely) so you get almost "proper" pooling without the overhead.