Re: cpu bound postgresql setup.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rajesh Kumar Mallah <mallah.rajesh@xxxxxxxxx> wrote:
> PasteBin for the vmstat output
> http://pastebin.com/mpHCW9gt
> 
> On Wed, Jun 23, 2010 at 8:22 PM, Rajesh Kumar Mallah
> <mallah.rajesh@xxxxxxxxx> 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

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux