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)
Список: pgsql-performance

Скрыть дерево обсуждения

100 simultaneous connections, critical limit?  (Jón Ragnarsson, )
 Re: 100 simultaneous connections, critical limit?  (Shridhar Daithankar, )
 Re: 100 simultaneous connections, critical limit?  (Christopher Browne, )
  Re: 100 simultaneous connections, critical limit?  (Jón Ragnarsson, )
  Re: 100 simultaneous connections, critical limit?  (Tom Lane, )
 Re: 100 simultaneous connections, critical limit?  ("Nick Barr", )
 Re: 100 simultaneous connections, critical limit?  ("scott.marlowe", )
  Re: 100 simultaneous connections, critical limit?  (Adam Alkins, )
   Re: 100 simultaneous connections, critical limit?  (Evil Azrael, )
   Re: 100 simultaneous connections, critical limit?  ("scott.marlowe", )
    Re: 100 simultaneous connections, critical limit?  (Thomas Swan, )
  Re: 100 simultaneous connections, critical limit?  (Christopher Kings-Lynne, )
 Re: 100 simultaneous connections, critical limit?  (Andrew McMillan, )

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:



В списке pgsql-performance по дате сообщения:

От: "scott.marlowe"
Дата:
Сообщение: Re: COUNT & Pagination
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: 100 simultaneous connections, critical limit?