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: CPU bound a...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 13 Topic 4010 of 4424
Post > Topic >>

Re: CPU bound at 99%

by craig@[EMAIL PROTECTED] (Craig Ringer) Apr 23, 2008 at 12:36 AM

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 the number actual connections you'll 
> find that each connection can get it's work done faster and you'll see 
> that number drop significantly.

It's not an issue for me - I'm expecting *never* to top 100 concurrent 
connections, and many of those will be idle, with the usual load being 
closer to 30 connections. Big stuff ;-)

However, I'm curious about what an idle backend really costs.

On my system each backend has an RSS of about 3.8MB, and a psql process 
tends to be about 3.0MB. However, much of that will be shared library 
bindings etc. The real cost per psql instance and associated backend 
appears to be 1.5MB (measured with 10 connections using system free RAM 
change) . If I use a little Python program to generate 50 connections 
free system RAM drops by ~45MB and rises by the same amount when the 
Python process exists and the backends die, so the backends presumably 
use less than 1MB each of real unshared RAM.

Presumably the backends will grow if they perform some significant 
queries and are then left idle. I haven't checked that.

At 1MB of RAM per backend that's not a trivial cost, but it's far from 
earth shattering, especially allowing for the OS swapping out backends 
that're idle for extended periods.

So ... what else does an idle backend cost? Is it reducing the amount of 
shared memory available for use on complex queries? Are there some lists 
PostgreSQL must scan for queries that get more expensive to examine as 
the number of backends rise? Are there locking costs?

--
Craig Ringer

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




 13 Posts in Topic:
CPU bound at 99%
buecking@[EMAIL PROTECTED  2008-04-23 00:31:01 
Re: CPU bound at 99%
jd@[EMAIL PROTECTED] (&q  2008-04-22 08:41:09 
Re: CPU bound at 99%
buecking@[EMAIL PROTECTED  2008-04-23 00:56:46 
Re: CPU bound at 99%
erik@[EMAIL PROTECTED] (  2008-04-22 10:55:19 
Re: CPU bound at 99%
buecking@[EMAIL PROTECTED  2008-04-23 01:10:26 
Re: CPU bound at 99%
buecking@[EMAIL PROTECTED  2008-04-23 01:22:37 
Re: CPU bound at 99%
tgl@[EMAIL PROTECTED] (T  2008-04-22 12:25:36 
Re: CPU bound at 99%
buecking@[EMAIL PROTECTED  2008-04-23 01:16:43 
Re: CPU bound at 99%
ivoras@[EMAIL PROTECTED]   2008-04-23 01:58:47 
Re: CPU bound at 99%
craig@[EMAIL PROTECTED]   2008-04-23 00:36:35 
Re: CPU bound at 99%
haraldarminmassa@[EMAIL P  2008-04-22 18:15:38 
Re: CPU bound at 99%
scott.marlowe@[EMAIL PROT  2008-04-22 10:23:55 
Re: CPU bound at 99%
lists@[EMAIL PROTECTED]   2008-04-22 18:45:24 

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 Dec 1 8:20:12 CST 2008.