Re: 100 simultaneous connections, critical limit? - Mailing list pgsql-performance

From Evil Azrael
Subject Re: 100 simultaneous connections, critical limit?
Date
Msg-id 1355543731.20040114193625@evilazrael.de
Whole thread Raw
In response to Re: 100 simultaneous connections, critical limit?  (Adam Alkins <postgresql@rasadam.com>)
List pgsql-performance
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


pgsql-performance by date:

Previous
From: Rajesh Kumar Mallah
Date:
Subject: Re: COUNT & Pagination
Next
From: "scott.marlowe"
Date:
Subject: Re: 100 simultaneous connections, critical limit?