Re: pg_connect takes 3.0 seconds - Mailing list pgsql-performance

From Greg Smith
Subject Re: pg_connect takes 3.0 seconds
Date
Msg-id 4B42ABA2.4010103@2ndquadrant.com
Whole thread Raw
In response to pg_connect takes 3.0 seconds  (Dmitri Girski <mitek17@gmail.com>)
Responses Re: pg_connect takes 3.0 seconds
List 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 by date:

Previous
From: Craig Ringer
Date:
Subject: Re: forced sequential scan when condition has current_user
Next
From: Craig James
Date:
Subject: Re: DB is slow until DB is reloaded