From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Kirk Strauser <kirk(at)strauser(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Why would I want to use connection pooling middleware? |
Date: | 2009-01-15 16:13:16 |
Message-ID: | 20090115161316.GC6440@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane wrote:
> Kirk Strauser <kirk(at)strauser(dot)com> writes:
> > I have a PostgreSQL 8.3.5 server with max_connections = 400. At this
> > moment, I have 223 open connections, including 64 from a bunch of
> > webserver processes and about 100 from desktop machines running a
> > particular application. The rest are from various scheduled processes
> > and other assorted things. Now, I know there are projects like pgpool-
> > II that can serve to pool connections to the server. Why would I want
> > to do that, though?
>
> Idle backends eat resources that would be better spent elsewhere.
> (I'm assuming that the majority of those 223 backends aren't actually
> doing anything at any one instant.) As an example, any system catalog
> update has to be broadcast to all live backends, and they all have to
> dutifully search their catalog caches to flush stale entries. That costs
> the same whether the backend is being put to use or has been sitting
> idle for minutes.
Also, memory wasted in per-process memory is memory not used for caches.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Browne | 2009-01-15 16:17:21 | Re: Why would I want to use connection pooling middleware? |
Previous Message | Tom Lane | 2009-01-15 16:08:41 | Re: Why would I want to use connection pooling middleware? |