Thread: supporting 2000 simultaneous connections.

supporting 2000 simultaneous connections.

From
Shiva Sarna
Date:
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.

regards

Shiva


Here’s a new way to find what you're looking for - Yahoo! Answers

Re: supporting 2000 simultaneous connections.

From
Hannes Dorbath
Date:
On 28.02.2007 07:15, Shiva Sarna wrote:
> The client want us to support 2000 simultaneous users. My question is will there be any performance degradation if I
increasethe max_connections of pgsql to 2000.  

Consider using a connection pool..

--
Regards,
Hannes Dorbath

Re: supporting 2000 simultaneous connections.

From
Bill Moran
Date:
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.

Re: supporting 2000 simultaneous connections.

From
"Joshua D. Drake"
Date:
Hannes Dorbath wrote:
> On 28.02.2007 07:15, Shiva Sarna wrote:
>> 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.
>
> Consider using a connection pool..

But to answer the question, it entirely depends on your hardware. I
wouldn't try this with less than 16Gig of ram and 4-8 cores.

Joshua D. Drake

>


--

      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive  PostgreSQL solutions since 1997
             http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/


Re: supporting 2000 simultaneous connections.

From
"Joshua D. Drake"
Date:
Bill Moran wrote:
> 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.

*cough*, you are going to greatly decrease your ability to scale if you
are running anything less than 8.1.
>
> 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.

7.4 doesn't scale to what he wants, even on big hardware.

Sincerely,

Joshua D. Drake


--

      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive  PostgreSQL solutions since 1997
             http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/


Re: supporting 2000 simultaneous connections.

From
Bill Moran
Date:
In response to "Joshua D. Drake" <jd@commandprompt.com>:

> Bill Moran wrote:
> > 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.
>
> *cough*, you are going to greatly decrease your ability to scale if you
> are running anything less than 8.1.
> >
> > 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.
>
> 7.4 doesn't scale to what he wants, even on big hardware.

Oops ... didn't notice that.

--
Bill Moran
Collaborative Fusion Inc.

Re: supporting 2000 simultaneous connections.

From
Mariano Mara
Date:
Shiva Sarna escribió:
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.

regards

Shiva


Here’s a new way to find what you're looking for - Yahoo! Answers
You can test it. Use JMeter (http://jakarta.apache.org/jmeter/) and stress it to know where the limit is (according to your hardware, of course).


Re: supporting 2000 simultaneous connections.

From
Scott Marlowe
Date:
On Thu, 2007-03-01 at 18:09, Mariano Mara wrote:
> Shiva Sarna escribió:
> > 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 test it. Use JMeter (http://jakarta.apache.org/jmeter/) and
> stress it to know where the limit is (according to your hardware, of
> course).

I have to toss my hat in on jmeter as well.  It's not perfect, but it
gets the job done, and has a lot of programmability in it.

Re: supporting 2000 simultaneous connections.

From
Shiva Sarna
Date:
Hi,

Thanks for your reply and help.

The web application I am talking about is a Learning
Management System.

By simultaneous users I mean that all 2000 users
should be able to access the application and for
example say take a test.

We are using JNDI connection pooling.

I think we have to now think about upgrading the
hardware as well.

thanks for your time.

regards

Shiva






--- Bill Moran <wmoran@collaborativefusion.com> wrote:

> In response to "Joshua D. Drake"
> <jd@commandprompt.com>:
>
> > Bill Moran wrote:
> > > 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.
> >
> > *cough*, you are going to greatly decrease your
> ability to scale if you
> > are running anything less than 8.1.
> > >
> > > 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.
> >
> > 7.4 doesn't scale to what he wants, even on big
> hardware.
>
> Oops ... didn't notice that.
>
> --
> Bill Moran
> Collaborative Fusion Inc.
>




__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

Re: supporting 2000 simultaneous connections.

From
"Joris Dobbelsteen"
Date:
>-----Original Message-----
>From: pgsql-general-owner@postgresql.org
>[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Shiva Sarna
>Sent: vrijdag 2 maart 2007 6:03
>To: Bill Moran; Joshua D. Drake
>Cc: Shiva Sarna; pgsql-general@postgresql.org
>Subject: Re: [GENERAL] supporting 2000 simultaneous connections.
>
>Hi,
>
>Thanks for your reply and help.
>
>The web application I am talking about is a Learning
>Management System.
>
>By simultaneous users I mean that all 2000 users should be
>able to access the application and for example say take a test.

As Bill Moran already said:
"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."
This should also be true for your application too, especially since it's
a web application. You don't need a persistent connection per user, but
can rather share then between different users.

When taking tests I'm not that fast and reading, thinking and clicking
will take some seconds. Your system is well capable of storing my
answers quickly enough (and probably getting the question as well).

>We are using JNDI connection pooling.
>
>I think we have to now think about upgrading the hardware as well.

Test this first with you existing setup.
Remember, 2000 web clients is not the same as 2000 database connections!
Your question was if most likely interpreted whether postgres can
sustain 2000 connections to the database at once, rather than whether it
can handle 2000 web users.

- Joris

>thanks for your time.
>
>regards
>
>Shiva
>
>
>--- Bill Moran <wmoran@collaborativefusion.com> wrote:
>
>> In response to "Joshua D. Drake"
>> <jd@commandprompt.com>:
>>
>> > Bill Moran wrote:
>> > > 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.
>> >
>> > *cough*, you are going to greatly decrease your
>> ability to scale if you
>> > are running anything less than 8.1.
>> > >
>> > > 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.
>> >
>> > 7.4 doesn't scale to what he wants, even on big
>> hardware.
>>
>> Oops ... didn't notice that.
>>
>> --
>> Bill Moran
>> Collaborative Fusion Inc.