Re: Question on hardware & server capacity

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Question on hardware & server capacity
Дата
Msg-id 3255.1041537454@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Question on hardware & server capacity  ("Steve Wolfe" <nw@codon.com>)
Список pgsql-performance
"Steve Wolfe" <nw@codon.com> writes:
> I logged some queries, and found that in an average second, the machine
> forks off 10 new backends, and responds to 50 selects and 3 updates.

So an average backend only processes ~ 5 queries before exiting?

>   My feelings are that the machine is being swamped by both the number of
> context switches and the I/O, most likely the memory bandwidth.

I think you're getting killed by the lack of connection pooling.
Launching a new backend is moderately expensive: there's not just the
OS-level fork overhead, but significant cost to fill the catalog caches
to useful levels, etc.

7.3 has reduced some of those startup costs a little, so if you're still
on 7.2 then an update might help.  But I'd strongly recommend getting
connection re-use in place before you go off and buy hardware.

            regards, tom lane

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

Предыдущее
От: Hilmar Lapp
Дата:
Сообщение: join over 12 tables takes 3 secs to plan
Следующее
От: Tom Lane
Дата:
Сообщение: Re: join over 12 tables takes 3 secs to plan