Re: supporting 2000 simultaneous connections. - Mailing list pgsql-general

From Bill Moran
Subject Re: supporting 2000 simultaneous connections.
Date
Msg-id 20070301112216.e662a970.wmoran@collaborativefusion.com
Whole thread Raw
In response to supporting 2000 simultaneous connections.  (Shiva Sarna <shiva.sarna@yahoo.com>)
Responses Re: supporting 2000 simultaneous connections.  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-general
In response to Shiva Sarna <shiva.sarna@yahoo.com>:

> Hi,
>
> I am working on a web application where the front end is struts framework
> and back end is PgSQL 7.4.
>
> The client want us to support 2000 simultaneous users. My question is will
> there be any performance degradation if I increase the max_connections of
> pgsql to 2000.
>
> Is there a limit to maximum number of simultaneous user supoorted by pgsql.
>
> thanks for your time and help.

You can support as many simultaneous users as your hardware can allow.  Each
connection requires a certain amount of RAM and CPU to maintain.  As long
as you have enough memory and CPU power, you'll be able to support that
many connections.

Performance _will_ degrade if all of those connections are busy at once, but
that's going to happen with any shared system.  The disk can only read from
one area at a time, and other system resources will be contended for as well.

You might want to take some time to investigate what "simultaneous
users" really means for your application.  For example, in a web
application, 2000 simultaneous users usually equates to less than 100
actual database connections, as web users spend most of their time
reading pages and very little time actually talking to the database.

You might also gain efficiencies by using something such as pgpool, but
that depends on the nature of your application.

In any event, I'm not aware of anything that would prevent you from having
2000 simultaneous connections, as long as you had beefy enough hardware to
handle it.

--
Bill Moran
Collaborative Fusion Inc.

pgsql-general by date:

Previous
From: Hannes Dorbath
Date:
Subject: Re: supporting 2000 simultaneous connections.
Next
From: Bill Moran
Date:
Subject: Re: Can I getting a unique ID from a select