Re: High SYS CPU - need advise - Mailing list pgsql-general

From Vlad
Subject Re: High SYS CPU - need advise
Date
Msg-id CAKeSUqXV9gssaAi27uBVAYj1Ckhv7C8eBEW8vv-SDfWXUD+MTA@mail.gmail.com
Whole thread Raw
In response to Re: High SYS CPU - need advise  (John R Pierce <pierce@hogranch.com>)
Responses Re: High SYS CPU - need advise
List pgsql-general
John,

thanks for your feedback. While implementing connection pooling would make resources utilization more efficient, I don't think it's the root of my problem. Most of the connected clients are at IDLE. When I do 

select * from pg_stat_activity where current_query not like '%IDLE%';

I only see several active queries at any given time.


-- Vlad


On Wed, Nov 14, 2012 at 3:23 PM, John R Pierce <pierce@hogranch.com> wrote:
On 11/14/12 1:13 PM, Vlad wrote:
Postgresql 9.1.6.
Postgres usually has 400-500 connected clients, most of them are idle.
Database is over 1000 tables (across 5 namespaces), taking ~150Gb on disk.

thats a really high client connection count for a 8 core system.

I'd consider implementing a connection pool (like pgbouncer), and rewriting your client applications to connect, do a transaction, disconnect, so the actual number of postgres connections is much lower, say in the 16-48 range.

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: High SYS CPU - need advise
Next
From: Clemens Park
Date:
Subject: Re: Using window functions to get the unpaginated count for paginated queries