Re: Scaling postgres

Поиск
Список
Период
Сортировка
От Nigel J. Andrews
Тема Re: Scaling postgres
Дата
Msg-id Pine.LNX.4.21.0204140024430.3278-100000@ponder.fairway2k.co.uk
обсуждение исходный текст
Ответ на Re: Scaling postgres  (Steve Lane <slane@fmpro.com>)
Список pgsql-general
On Sat, 13 Apr 2002, Steve Lane wrote:

> On 4/13/02 5:10 PM, "Neil Conway" <nconway@klamath.dyndns.org> wrote:
>
> > On Sat, 13 Apr 2002 17:00:19 -0500
> > "Steve Lane" <slane@fmpro.com> wrote:
> >> On the front end, as I understand it (I know this is not really
> >> Postgres-specific), with Apache and mod_php I need one process per
> >> concurrent user. Anyone care to speculate how many concurrent users I could
> >> get on a single box? I really don't know what's reasonable to expect.
> >
> > For the front-end, it totally depends on the hardware you're using,
> > the OS you're running this on, and the design/performance requirements
> > of your application. For example, a good caching layer could easily
> > improve performance by 100% or more.
>
> I'm less concerned with performance (at the moment) than concurrency. My
> worry is that (lacking a multithreaded web server, which Apache 2.0 appears
> to give me), I need to have 800-1200 processes, one per connection, running
> on the web server or servers. I don't know if that's feasible under any
> circumstances.

It's not something I've done but I don't see why not if the OS is configured
with appropiate limits on processes, open file descriptors etc.

>  [snip]
>
> >> On the back end, is there any direct relationship between the number of open
> >> client connections and the number of processes used?
> >
> > Yes, there is 1 postgres process per database connection. Whether
> > you create 1 database connection per client would depend on how you
> > design your application.
>
> Can you clarify that second sentence a bit? I wasn't aware I had much choice
> -- meaning that, since Apache 1.x + PHP is not multithreaded and does not do
> connection pooling, I think I'm stuck with one database connection per
> front-side client connection.

He means each frontend process opens one and only one connection to the
DB. Since it is possible for an application to open more than one connection
and the relationship is one to one for the number of connections to backend
processes (plus the postmaster, stats. etc) it is possible to have a one
application process to many backend processes arrangement.


--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants


В списке pgsql-general по дате отправления:

Предыдущее
От: "Nigel J. Andrews"
Дата:
Сообщение: Re: COPY performance
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Scaling postgres