Re: prepared statement functioning range

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: 高健 <luckyjackgao(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: prepared statement functioning range
Date: 2013-06-17 02:19:00
Message-ID: 20130617021900.GD23363@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* 高健 (luckyjackgao(at)gmail(dot)com) wrote:
> Is there any common calculation methods for deciding the max_connections
> value?

max_connections is a hard limit and so you'd want to have that higher
than the number of connections you actually expect to have. The general
recommendation is to have the same number of connections as you have
CPUs. If your system ends up being i/o bound, adding more requestors to
the queue waiting for I/O isn't likely to really help, unless you have
multiple I/O zones (eg; using tablespaces or similar). At that point,
it really gets to be pretty specific to your environment.

Note also that for batch reporting type of work can often be done using
a hot-standby slave, rather than the master, eliminating that I/O load
from the master system.

Thanks,

Stephen

In response to

Browse pgsql-general by date

  From Date Subject
Next Message 高健 2013-06-17 02:52:02 JDBC prepared statement is not treated as prepared statement
Previous Message 高健 2013-06-17 01:53:55 Re: prepared statement functioning range