Re: The black art of postgresql.conf tweaking

Поиск
Список
Период
Сортировка
От Jeff
Тема Re: The black art of postgresql.conf tweaking
Дата
Msg-id 85562EA8-E616-11D8-A77F-000393D1F76E@torgo.978.org
обсуждение исходный текст
Ответ на The black art of postgresql.conf tweaking  (Paul Serby <paul.serby@clockltd.com>)
Список 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 по дате отправления:

Предыдущее
От: Paul Serby
Дата:
Сообщение: The black art of postgresql.conf tweaking
Следующее
От: Michal Taborsky
Дата:
Сообщение: Re: The black art of postgresql.conf tweaking