Re: CPU bound at 99%

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CPU bound at 99%
Дата
Msg-id 22616.1208881536@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: CPU bound at 99%  (Bryan Buecking <buecking@gmail.com>)
Список pgsql-performance
Bryan Buecking <buecking@gmail.com> writes:
> On Tue, Apr 22, 2008 at 10:55:19AM -0500, Erik Jones wrote:
>> That is WAY too high.  Get a real pooler, such as pgpool, and drop
>> that down to 1000 and test from there.

> I agree, but the number of idle connections dont' seem to affect
> performace only memory usage.

I doubt that's true (and your CPU load suggests the contrary as well).
There are common operations that have to scan the whole PGPROC array,
which has one entry per open connection.  What's worse, some of them
require exclusive lock on the array.

8.3 has some improvements in this area that will probably let it scale
to more connections than previous releases, but in any case connection
pooling is a good thing.

> I'm trying to lessen the load of
> connection setup. But sounds like this tax is minimal?

Not really.  You're better off reusing a connection over a large number
of queries.

            regards, tom lane

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: CPU bound at 99%
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: CPU bound at 99%