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

From Jeff Janes
Subject Re: High SYS CPU - need advise
Date
Msg-id CAMkU=1yMz6Q5NASGg+trOy_r5yj27Qk2o46QjUvrKHw8k5G0KA@mail.gmail.com
Whole thread Raw
In response to Re: High SYS CPU - need advise  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
On Wed, Nov 21, 2012 at 9:05 AM, Vlad <marchenko@gmail.com> wrote:
> it's session mode and the pool size is 1200 (cause I need to grantee that in
> the worst case we have enough slots for all possible clients),

Wouldn't the clients prefer to wait 100ms to get a connnection if that
means their query finishes in 100ms,
rather than waiting 0ms to get a connection but have the query take
1000ms to finish?

> however even
> at the times preceding  high-cpu-sys-stall, the number postmasters are like
> 15-20. When stall happens, it starts to raise but that's the result of DB
> not answering in timely manner.

That is like the "beatings will continue until moral improves" joke.
The theory about why pgbouncer would be beneficial is that it prevents
hundreds of connections from clogging up the server.  By allowing
hundreds of connections to be made when the server gets into distress,
you are increasing that distress and making it harder to recover from
it.  That is the theory, anyway.

Cheers,

Jeff


pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: High SYS CPU - need advise
Next
From: Merlin Moncure
Date:
Subject: Re: High SYS CPU - need advise