Re: [HACKERS] Simmultanous Connections (fwd)

From: Don Baccus <dhogaza(at)pacifier(dot)com>
To: Mateus Cordeiro Inssa <mateus(at)ifnet(dot)com(dot)br>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Simmultanous Connections (fwd)
Date: 2000-01-11 15:21:43
Message-ID: 3.0.1.32.20000111072143.01023bd0@mail.pacifier.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 08:45 AM 1/11/00 -0200, Mateus Cordeiro Inssa wrote:

> As an example, I have systems with 2 or 3 hundred simultaneos
>connections and besides being short time connections it's impossible to
>have 200 or 300 backends running at the same time.

Again, the problem isn't persistent connections but rather an
lousy implementation of pooled persistent connections.

> In this case, I had to create a proxy to use few connections.

Another approach is to throttle the number of connections in the
persistent pool manager. This is how AOLserver deals with the
problem. You tell it the max number of connections to fire up
and only that many handles are doled out to threads, the rest
waiting for others to complete. There's another parameter which
places a ceiling on the number of threads allowed to wait for
a pool connection, which allows me to return a "too busy"
message to the user if I so choose. Of course, if a server
starts getting too many of these it's time to upgrade to
something faster, to dig into one's queries looking for
needless inefficiency, or maybe to remember that you forgot
to say "vacuum analyze" (who, me?)

Some folks like to roll their own. I'm lazy and picked a web
server that has already solved such problems for me.

- Don Baccus, Portland OR <dhogaza(at)pacifier(dot)com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-01-11 15:31:13 Re: [HACKERS] Potential vacuum bug?
Previous Message Tom Lane 2000-01-11 15:14:10 Re: [SQL] createdb -D xxxx not working