Re: High SYS CPU - need advise

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Vlad <marchenko(at)gmail(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: High SYS CPU - need advise
Date: 2012-11-21 17:18:46
Message-ID: CAMkU=1yMz6Q5NASGg+trOy_r5yj27Qk2o46QjUvrKHw8k5G0KA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Nov 21, 2012 at 9:05 AM, Vlad <marchenko(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vlad 2012-11-21 17:56:36 Re: High SYS CPU - need advise
Previous Message Merlin Moncure 2012-11-21 17:09:32 Re: High SYS CPU - need advise