Re: Urgent: 10K or more connections

From: Sean Chittenden <sean(at)chittenden(dot)org>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Urgent: 10K or more connections
Date: 2003-07-19 05:58:41
Message-ID: 20030719055841.GB24507@perrin.int.nxad.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> > Some light weight multi-threaded proxy that relays active
> > connections to the backend and holds idle connections more
> > efficiently than PostgreSQL...
>
> What excuse is there for postgres connections being heavyweight to
> begin with? The only real resource they ought to represent is a
> single TCP connection. Servers that manage 10,000 TCP connections
> are a dime a dozen these days.
>
> Any database context that has to be stored for the connection, the
> state of binary/text or autocommit mode or whatever, will have to be
> maintained by any pooling interface anyways. And I think both of
> those examples are now much cleaner more or less stateless
> per-request flags anyways.
>
> Basically what I'm asking is, hypothetically, if postgres were
> implemented using threads instead of processes, are there any
> per-connection resources that really couldn't be completely disposed
> of when the connection was completely idle between (ie at the start
> of) transactions?
>
> Ideally if every per-connection resource could be completely
> disposed of whenever the connection was completely idle then you
> wouldn't need a whole extra layer for the communication to traverse
> and a whole extra layer of complexity for the protocol semantics to
> be maintained. A multithreaded server could easily handle 10k-40k
> mostly idle connections without any unusual resource needs.

PostgreSQL will never be single proc, multi-threaded, and I don't
think it should be for reliability's sake. See my above post,
however, as I think I may have a better way to handle "lots of
connections" without using threads. -sc

--
Sean Chittenden

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gianni Mariani 2003-07-19 08:54:59 Re: Urgent: 10K or more connections
Previous Message Sean Chittenden 2003-07-19 05:55:39 Re: Urgent: 10K or more connections

Browse pgsql-hackers by date

  From Date Subject
Next Message Gianni Mariani 2003-07-19 08:54:59 Re: Urgent: 10K or more connections
Previous Message Sean Chittenden 2003-07-19 05:55:39 Re: Urgent: 10K or more connections