Re: pg_connect takes 3.0 seconds

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: pg_connect takes 3.0 seconds
Дата
Msg-id 4B42ABA2.4010103@2ndquadrant.com
обсуждение исходный текст
Ответ на pg_connect takes 3.0 seconds  (Dmitri Girski <mitek17@gmail.com>)
Ответы Re: pg_connect takes 3.0 seconds  (Dmitri Girski <mitek17@gmail.com>)
Список pgsql-performance
Dmitri Girski wrote:
I am running a PostgreSQL server 8.3.5 with a pretty much standard config.

The web application server which runs Apache 1.3/PHP2.9  has an intermittent problem:
pg_connect takes exactly 3.0 seconds. The usual connection time is 0.0045.
The long request happens at approximate rate 1:100.

First thing to check for intermittent multi-second delays is whether a checkpoint is happening at that time.  See http://wiki.postgresql.org/wiki/Logging_Checkpoints for an intro, you'd want to see if the checkpoints are around the same time as the delays each time.  The default configuration makes checkpoints happen all the time if there's any significant write traffic on your database.

-- 
Greg Smith    2ndQuadrant   Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com  www.2ndQuadrant.com

В списке pgsql-performance по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: forced sequential scan when condition has current_user
Следующее
От: Craig James
Дата:
Сообщение: Re: DB is slow until DB is reloaded