Re: 100 simultaneous connections, critical limit?

Поиск
Список
Период
Сортировка
От Evil Azrael
Тема Re: 100 simultaneous connections, critical limit?
Дата
Msg-id 1355543731.20040114193625@evilazrael.de
обсуждение исходный текст
Ответ на Re: 100 simultaneous connections, critical limit?  (Adam Alkins <postgresql@rasadam.com>)
Список 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 по дате отправления:

Предыдущее
От: Rajesh Kumar Mallah
Дата:
Сообщение: Re: COUNT & Pagination
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: 100 simultaneous connections, critical limit?