Thread: max_connections

max_connections

From
"Modumudi, Sireesha"
Date:

Hi all,

 

I am using postgres 8.3.9 on SUSE 64 bit. By default max_connections is 100, but I want to know if this can be increased, if so, what should we take into consideration?

 

Thank you,

Sireesha

Re: max_connections

From
Scott Marlowe
Date:
On Wed, Sep 5, 2012 at 2:30 PM, Modumudi, Sireesha
<Sireesha.Modumudi@emc.com> wrote:
> Hi all,
>
> I am using postgres 8.3.9 on SUSE 64 bit. By default max_connections is 100,
> but I want to know if this can be increased, if so, what should we take into
> consideration?

If you're considering raising this then you should probably be looking
at some kind of pooler like pgbouncer or pgool.    That said I've run
servers that did things like sessions (small transactions and lots of
idle connects) to ~1000 before but make sure you've got enough memory
free as each backend will use about 6MB of memory.


Re: max_connections

From
"Kevin Grittner"
Date:
"Modumudi, Sireesha" <Sireesha.Modumudi@emc.com> wrote:

> I am using postgres 8.3.9 on SUSE 64 bit. By default
> max_connections is 100, but I want to know if this can be
> increased, if so, what should we take into consideration?

http://wiki.postgresql.org/wiki/Number_Of_Database_Connections

-Kevin


Re: max_connections

From
jam3
Date:
According to

http://www.postgresql.org/docs/8.3/static/kernel-resources.html

The maximum shared memory usage of a connection in bytes is

1800 + 270 * max_locks_per_transaction

max_locks_per_transaction default is 64

19080 Bytes

or .018 mb's per connection

or

1.819 mb at 100 default connections

With a Gig of Phsical Ram setting Shared Buffers to use 25% - 256 mb
dedicated to Postgres

default is using roughly 0.75% for connections

You can extrapolate this out taking into consideration all your specific
variables, total physical RAM, postgresql.conf settings etc but I wouldn;t
run off to use pgpool unless your in an extremly connection heavy
environment as it does add an additional layer within the client server
connection and is another component to config and admin.







--
View this message in context: http://postgresql.1045698.n5.nabble.com/max-connections-tp5722890p5722899.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: max_connections

From
"Albe Laurenz"
Date:
Sireesha Modumudi wrote:
> I am using postgres 8.3.9 on SUSE 64 bit. By default max_connections
is 100, but I want to know if
> this can be increased, if so, what should we take into consideration?

It can be increased, but you habe to restart the server for
the change to take effect.

It is not a good idea to increase the setting without thought.
There is a Wiki article about it:
http://wiki.postgresql.org/wiki/Number_Of_Database_Connections

If you need more than 100 connections, consider the use of a
connection pool.

Yours,
Laurenz Albe