X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 49DE6D1DA7E for ; Wed, 14 Jan 2004 18:37:16 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 77860-06 for ; Wed, 14 Jan 2004 14:36:46 -0400 (AST) Received: from mailout11.sul.t-online.com (mailout11.sul.t-online.com [194.25.134.85]) by svr1.postgresql.org (Postfix) with ESMTP id 43B2BD1B49F for ; Wed, 14 Jan 2004 14:36:34 -0400 (AST) Received: from fwd08.aul.t-online.de by mailout11.sul.t-online.com with smtp id 1AgpsY-0004re-00; Wed, 14 Jan 2004 19:36:34 +0100 Received: from router.azrael.de (V8B4IUZH8emac6WPWWc93MsVzGfoIN9qAMgQC8aO7W+BS6fgYA-T4X@[80.141.255.138]) by fmrl08.sul.t-online.com with esmtp id 1AgpsP-2IqdCy0; Wed, 14 Jan 2004 19:36:25 +0100 Received: from azrael.azrael.de (azrael.azrael.de [192.168.202.18]) by router.azrael.de (8.11.4/8.11.4) with ESMTP id i0EIb0s11567 for ; Wed, 14 Jan 2004 19:37:00 +0100 Date: Wed, 14 Jan 2004 19:36:25 +0100 From: Evil Azrael X-Priority: 3 (Normal) Message-ID: <1355543731.20040114193625@evilazrael.de> Cc: pgsql-performance@postgresql.org Subject: Re: 100 simultaneous connections, critical limit? In-Reply-To: <40058606.10605@rasadam.com> References: <40058606.10605@rasadam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit X-Seen: false X-ID: V8B4IUZH8emac6WPWWc93MsVzGfoIN9qAMgQC8aO7W+BS6fgYA-T4X@t-dialin.net X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/146 X-Sequence-Number: 5321 Hi! AA> scott.marlowe wrote: >>A few tips from an old PHP/Apache/Postgresql developer. >> >>1: Avoid pg_pconnect unless you are certain you have load tested the >>system and it will behave properly. pg_pconnect often creates as many >>issues as it solves. >> >> My experience with persistant connections in PHP is quite similar to the one of Scott Marlowe. There are some nasty effects if something is not working. The most harmless results come probably from not closed transactions which will result in a warning as PHP seems to send always a BEGIN; ROLLBACK; for reusing a connection. AA> I share the above view. I've had little success with persistent AA> connections. The cost of pg_connect is minimal, pg_pconnect is not a AA> viable solution IMHO. Connections are rarely actually reused. Still I think itīs a good way to speed things up. Probably the connection time it takes in PHP is not so the gain, but the general saving of processor time. Spawning a new process on the backend can be a very expensive operation. And if it happens often, it sums up. Perhaps itīs only a memory for CPU time deal. My persistant connections get very evenly used, no matter if there are 2 or 10. The CPU usage for them is very equally distributed. Christoph Nelles -- Mit freundlichen Grüssen Evil Azrael mailto:evilazrael@evilazrael.de