Re: The black art of postgresql.conf tweaking - Mailing list pgsql-performance

From Jeff
Subject Re: The black art of postgresql.conf tweaking
Date
Msg-id 85562EA8-E616-11D8-A77F-000393D1F76E@torgo.978.org
Whole thread Raw
In response to The black art of postgresql.conf tweaking  (Paul Serby <paul.serby@clockltd.com>)
List pgsql-performance
On Aug 4, 2004, at 8:45 AM, Paul Serby wrote:
>
> Apache on the Web server can take up to 300 connections and PHP is
> using  pg_pconnect
>
> Postgres is set with the following.
>
> max_connections = 300
> shared_buffers = 38400
> sort_mem = 12000
>
> But Apache is still maxing out the non-super user connection limit.
>

Did you restart PG after making that change?
(you need to restart, reload won't change max_connections)

Also, you're sort_mem is likely too high (That is the amount of memory
that can be used PER SORT) and you s hould back down on shared_buffers.
(General consensus is don't go over 10k shared buffers)

Another thing you may want to try is using pgpool and regular
pg_connect - this way you only have a pool of say, 32 connections to
the DB that are shared among all apache instances.  This gets rid of
the need to have hundreds of idle postgres'  sitting around.
Connecting to pgpool is very fast. We use it in production here and it
works wonderfully.  And it is 100% transparent to your application.

--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/
http://www.stuarthamm.net/


pgsql-performance by date:

Previous
From: Paul Serby
Date:
Subject: The black art of postgresql.conf tweaking
Next
From: Michal Taborsky
Date:
Subject: Re: The black art of postgresql.conf tweaking