Re: Query regarding PostGre database - Mailing list pgsql-general

From Craig Ringer
Subject Re: Query regarding PostGre database
Date
Msg-id 4E4CA5E4.5050302@ringerc.id.au
Whole thread Raw
In response to Query regarding PostGre database  ("Navin Chandra" <navin.pandit@ilfstechnologies.com>)
List pgsql-general
On 18/08/2011 11:52 AM, Navin Chandra wrote:
> Hi,
>
> I am an application developer, want to use ‘PostGre’ as backend. May I
> know what is the maximum possible number of concurrent users?
> Your acknowledgement will be highly appreciated.

You seem to have replied to yourself. Eh?

There's no such thing as "PostGre". You probably meant PostgreSQL or
just Postgres.

The maximum number of concurrent users depends on the hardware and the
database workload. It is impossible to answer without more information.

There is a difference between the maximum number of connections and the
maximum number of actively working queries. You can have lots of
connections, but much fewer actively running queries if you want the
system to perform well. As a rule of thumb, we usually say that the
number of connections that should be doing work is roughly

   (number of CPU cores) + (number of hard drives)

... but of course that's incredibly vague and depends a huge amount on
your workload and hardware specifics. For example, in some workloads the
hard drives don't matter at all, it's only the CPUs and amount of memory.

If you find that your PostgreSQL instance cannot handle enough
connections, you can add a connection pooler like PgPool-II, or use your
application server's connection pooler. Using fewer connections and a
pooler is usually faster than using lots of direct connections to
PostgreSQL anyway.

Perhaps you can explain a bit more about what you want to do so we can
help you in more detail?

--
Craig Ringer

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Query regarding PostGre database
Next
From: Lauri Kajan
Date:
Subject: Re: join between a table and function.