Re: cpu bound postgresql setup.

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: cpu bound postgresql setup.
Дата
Msg-id 4C21E1F402000025000328F2@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: cpu bound postgresql setup.  (Rajesh Kumar Mallah <mallah.rajesh@gmail.com>)
Список pgsql-performance
Rajesh Kumar Mallah <mallah.rajesh@gmail.com> wrote:
> PasteBin for the vmstat output
> http://pastebin.com/mpHCW9gt
>
> On Wed, Jun 23, 2010 at 8:22 PM, Rajesh Kumar Mallah
> <mallah.rajesh@gmail.com> wrote:
>> Dear List ,
>>
>> I observe that my postgresql (ver 8.4.2) dedicated server has
>> turned cpu bound and there is a high load average in the server >
>> 50 usually.
>> The server has 2 Quad Core CPUs already and there are 6 or 8
>> drives in raid 10 , there is negligable i/o wait. There is 32GB
>> ram and no swapping.
>>
>> When i strace processes at random i see lot of lseek
>> (XXX,0,SEEK_END) calls which i feel were not that frequent
>> before. can any pointers be got for investigating the high cpu
>> usage by postgresql processes.

I'm not clear on what problem you are experiencing.  Using a lot of
your hardware's capacity isn't a problem in itself -- are you
getting poor response time?  Poor throughput?  Some other problem?
Is it continuous, or only when certain queries run?

One thing that is apparent is that you might want to use a
connection pool, or if you're already using one you might want to
configure it to reduce the maximum number of active queries.  With
eight cores and eight drives, your best throughput is going to be at
somewhere around 24 active connections, and you appear to be going
to at least twice that.

If you can provide a copy of your postgresql.conf settings (without
comments) and an EXPLAIN ANALYZE of a slow query, along with the
schema information for the tables used by the query, you'll probably
get useful advice on how to adjust your configuration, indexing, or
query code to improve performance.

-Kevin

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

Предыдущее
От: Rajesh Kumar Mallah
Дата:
Сообщение: Re: cpu bound postgresql setup.
Следующее
От: Anj Adu
Дата:
Сообщение: Re: slow index lookup