Re: 100 simultaneous connections, critical limit?

From: Evil Azrael <evilazrael(at)evilazrael(dot)de>
To:
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: 100 simultaneous connections, critical limit?
Date: 2004-01-14 18:36:25
Message-ID: 1355543731.20040114193625@evilazrael.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)evilazrael(dot)de

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message scott.marlowe 2004-01-14 21:35:52 Re: 100 simultaneous connections, critical limit?
Previous Message Rajesh Kumar Mallah 2004-01-14 18:13:30 Re: COUNT & Pagination