Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Performance > Re: connections...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 5 Topic 4007 of 4296
Post > Topic >>

Re: connections slowing everything down?

by mmoncure@[EMAIL PROTECTED] ("Merlin Moncure") Apr 22, 2008 at 08:46 PM

On Mon, Apr 21, 2008 at 5:50 AM, Adrian Moisey
<adrian@[EMAIL PROTECTED]
> wrote:
> Hi
>
>  # ps -ef | grep idle | wc -l
>  87
>  # ps -ef | grep SELECT | wc -l
>  5
>
>
>  I have 2 web servers which connect to PGPool which connects to our
postgres
> db.  I have noticed that idle connections seem to take up CPU and RAM
> (according to top).  Could this in any way cause things to slow down?

Something is not quite with your assumptions. On an unloaded server,
open a bunch of connections (like 500) from psql doing nothing, and
cpu load will stay at zero. IOW, an 'idle' connection does not consume
any measurable CPU resources once connected.  It does consume some ram
but that would presumably at least partly swap out eventually.  What's
probably going on here is your connections are not really idle.  Top
by default aggregates usage every three seconds and ps is more of a
snapshot.  During the top a single connection might accept and dispose
0, 1, 50, 100, or 1000 queries depending on various factors.  Your
sampling methods are simply not accurate enough.

With statement level logging on (with pid on the log line),  you can
break out and measure query activity by connection.

merlin

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




 5 Posts in Topic:
connections slowing everything down?
adrian@[EMAIL PROTECTED]   2008-04-21 11:50:31 
Re: connections slowing everything down?
erik@[EMAIL PROTECTED] (  2008-04-21 09:04:28 
Re: connections slowing everything down?
adrian@[EMAIL PROTECTED]   2008-04-21 16:15:42 
Re: connections slowing everything down?
erik@[EMAIL PROTECTED] (  2008-04-21 09:46:17 
Re: connections slowing everything down?
mmoncure@[EMAIL PROTECTED  2008-04-22 20:46:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Sep 8 2:59:44 CDT 2008.