Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 2BBCA6339D3 for ; Thu, 14 Jan 2010 01:47:28 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 70088-05 for ; Thu, 14 Jan 2010 05:47:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by mail.postgresql.org (Postfix) with ESMTP id 5B8F263297F for ; Thu, 14 Jan 2010 01:47:17 -0400 (AST) Received: from localhost (access [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 0BD281E044D; Thu, 14 Jan 2010 13:47:16 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (access.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Ysxo8tDP5bcb; Thu, 14 Jan 2010 13:47:14 +0800 (WST) Received: from [192.168.3.115] (unknown [192.168.3.115]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id 870FD1E0449; Thu, 14 Jan 2010 13:47:14 +0800 (WST) Message-ID: <4B4EAFE1.4050909@postnewspapers.com.au> Date: Thu, 14 Jan 2010 13:47:13 +0800 From: Craig Ringer User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Bob Dusek CC: Scott Marlowe , pgsql-performance@postgresql.org Subject: Re: performance config help References: <4B4B177B020000250002E194@gw.wicourts.gov> <4B4B3BF6020000250002E1B1@gw.wicourts.gov> <61039b861001111323g531a5d68q1f59171d926aefef@mail.gmail.com> <61039b861001121001p37dc7698i48651189edcee9d0@mail.gmail.com> <4B4D53BF.4020905@postnewspapers.com.au> <61039b861001131210j673f1200r16f60f26f5a22265@mail.gmail.com> <61039b861001131437j4a70ab8nd68ebf0733994854@mail.gmail.com> In-Reply-To: <61039b861001131437j4a70ab8nd68ebf0733994854@mail.gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.017 tagged_above=-10 required=5 tests=AWL=0.582, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/270 X-Sequence-Number: 37150 Bob Dusek wrote: >>> The problem with our "cheap" connection pool is that the persistent >>> connections don't seem to be available immediately after they're >>> released by the previous process. pg_close doesn't seem to help the >>> situation. We understand that pg_close doesn't really close a >>> persistent connection, but we were hoping that it would cleanly >>> release it for another client to use. Curious. >> Yeah, the persistent connects in php are kinda as dangerous as they >> are useful.. Have you tried using regular connects just to compare >> performance? On Linux they're not too bad, but on Windows (the pg >> server that is) it's pretty horrible performance-wise. > > Yes we have. Regular connections are pretty slow, even when our > application server is on the same box as the db server. > >>> We've also tried third-party connection pools and they don't seem to >>> be real fast. >> What have you tried? Would pgbouncer work for you? > > We've tried pgbouncer. It's pretty good. Oh, also look into mod_dbd . With the threaded MPM it can apparently provide excellent in-apache connection pooling. -- Craig Ringer