From: | Greg Smith <greg(at)2ndquadrant(dot)com> |
---|---|
To: | Dmitri Girski <mitek17(at)gmail(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: pg_connect takes 3.0 seconds |
Date: | 2010-01-05 03:01:54 |
Message-ID: | 4B42ABA2.4010103@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)2ndQuadrant(dot)com www.2ndQuadrant.com
From | Date | Subject | |
---|---|---|---|
Next Message | Craig James | 2010-01-05 04:02:10 | Re: DB is slow until DB is reloaded |
Previous Message | Craig Ringer | 2010-01-05 02:14:00 | Re: forced sequential scan when condition has current_user |