Re: [PERFORM] CPU bound at 99%

2008-04-22 Thread Ivan Voras
Bryan Buecking wrote: On Tue, Apr 22, 2008 at 10:55:19AM -0500, Erik Jones wrote: Are you referring to PHP's persistent connections? Do not use those. Here's a thread that details the issues with why not: http://archives.postgresql.org/pgsql-general/2007-08/msg00660.php . Thanks for tha

Re: [PERFORM] CPU bound at 99%

2008-04-22 Thread PFC
about 2300 connections in idle (ps auxwww | grep postgres | idle) [...] The server that connects to the db is an apache server using persistent connections. MaxClients is 2048 thus the high number of connections needed. Application was written in PHP using the Pear DB class.

Re: [PERFORM] CPU bound at 99%

2008-04-22 Thread Craig Ringer
Erik Jones wrote: max_connections = 2400 That is WAY too high. Get a real pooler, such as pgpool, and drop that down to 1000 and test from there. I see you mentioned 500 concurrent connections. Are each of those connections actually doing something? My guess that once you cut down on th

Re: [PERFORM] CPU bound at 99%

2008-04-22 Thread Tom Lane
Bryan Buecking <[EMAIL PROTECTED]> 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

Re: [PERFORM] CPU bound at 99%

2008-04-22 Thread Scott Marlowe
On Tue, Apr 22, 2008 at 10:10 AM, Bryan Buecking <[EMAIL PROTECTED]> wrote: > > I agree, but the number of idle connections dont' seem to affect > performace only memory usage. I'm trying to lessen the load of > connection setup. But sounds like this tax is minimal? Not entirely true. There ar

Re: [PERFORM] CPU bound at 99%

2008-04-22 Thread Bryan Buecking
On Tue, Apr 22, 2008 at 01:21:03PM -0300, Rodrigo Gonzalez wrote: > Are tables vacuumed often? How often is often. Right now db is vaccumed once a day. -- Bryan Buecking http://www.starling-software.com -- Sent via pgsql-performance mailing list (pgsql-performance@post

Re: [PERFORM] CPU bound at 99%

2008-04-22 Thread Rodrigo Gonzalez
Are tables vacuumed often? Bryan Buecking escribió: On Tue, Apr 22, 2008 at 10:55:19AM -0500, Erik Jones wrote: On Apr 22, 2008, at 10:31 AM, Bryan Buecking wrote: max_connections = 2400 That is WAY too high. Get a real pooler, such as pgpool, and drop that down to 1000 and

Re: [PERFORM] CPU bound at 99%

2008-04-22 Thread Bryan Buecking
On Tue, Apr 22, 2008 at 10:55:19AM -0500, Erik Jones wrote: > > Are you referring to PHP's persistent connections? Do not use those. > Here's a thread that details the issues with why not: > http://archives.postgresql.org/pgsql-general/2007-08/msg00660.php . Thanks for that article, very

Re: [PERFORM] CPU bound at 99%

2008-04-22 Thread Harald Armin Massa
Bryan, > > about 2300 connections in idle > > > (ps auxwww | grep postgres | idle) that is about 2300 processes being task scheduled by your kernel, each of them using > 1 MB of RAM and some other ressources, are you sure that this is what you want? Usual recommended design for a web applicati

Re: [PERFORM] CPU bound at 99%

2008-04-22 Thread Bryan Buecking
On Tue, Apr 22, 2008 at 10:55:19AM -0500, Erik Jones wrote: > On Apr 22, 2008, at 10:31 AM, Bryan Buecking wrote: > > >max_connections = 2400 > > 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 connecti

Re: [PERFORM] CPU bound at 99%

2008-04-22 Thread Bryan Buecking
On Tue, Apr 22, 2008 at 08:41:09AM -0700, Joshua D. Drake wrote: > On Wed, 23 Apr 2008 00:31:01 +0900 > Bryan Buecking <[EMAIL PROTECTED]> wrote: > > > at any given time there is about 5-6 postgres in startup > > (ps auxwww | grep postgres | grep startup | wc -l) > > > > about 2300 connections i

Re: [PERFORM] CPU bound at 99%

2008-04-22 Thread Erik Jones
On Apr 22, 2008, at 10:31 AM, Bryan Buecking wrote: Hi, I'm running into an performance problem where a Postgres db is running at 99% CPU (4 cores) with about 500 concurrent connection doing various queries from a web application. This problem started about a week ago, and has been steadily

Re: [PERFORM] CPU bound at 99%

2008-04-22 Thread Joshua D. Drake
On Wed, 23 Apr 2008 00:31:01 +0900 Bryan Buecking <[EMAIL PROTECTED]> wrote: > at any given time there is about 5-6 postgres in startup > (ps auxwww | grep postgres | grep startup | wc -l) > > about 2300 connections in idle > (ps auxwww | grep postgres | idle) > > and loads of "FATAL: sorry, t

[PERFORM] CPU bound at 99%

2008-04-22 Thread Bryan Buecking
Hi, I'm running into an performance problem where a Postgres db is running at 99% CPU (4 cores) with about 500 concurrent connection doing various queries from a web application. This problem started about a week ago, and has been steadily going downhill. I have been tweaking the config a bit, mai