Re: supporting 2000 simultaneous connections.

From: Bill Moran <wmoran(at)collaborativefusion(dot)com>
To: Shiva Sarna <shiva(dot)sarna(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: supporting 2000 simultaneous connections.
Date: 2007-03-01 16:22:16
Message-ID: 20070301112216.e662a970.wmoran@collaborativefusion.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In response to Shiva Sarna <shiva(dot)sarna(at)yahoo(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2007-03-01 16:24:53 Re: Can I getting a unique ID from a select
Previous Message Hannes Dorbath 2007-03-01 16:18:44 Re: supporting 2000 simultaneous connections.