From: Jan Lentfer <Jan.Lentfer@web.de>
To: pgsql-admin@postgresql.org
Subject: Re: Advice/guideline on increasing shared_buffers and kernel parameters
Date: Tue, 08 May 2012 10:31:25 +0200
Message-ID: <e6961fb1a4223e08774949997e0bbca6@neslonek.homeunix.org> (raw)
In-Reply-To: <00da01cd2ce7$35d17780$a1746680$@com>
References: <00da01cd2ce7$35d17780$a1746680$@com>
Hi Gnanam,
On Tue, 8 May 2012 12:22:58 +0530, Gnanakumar wrote:
> Our Production server has got 35 GB physical RAM size. Since the
> server
> has lots of RAM, we want to really make use of it. We've already
> configured
> "max_connections" to 1000 and "shared_buffers" to 1536 MB, but when
> we tried
> to increase only "shared_buffers" to 3072MB (keeping
> "max_connections" as it
> is), PostgreSQL failed to start with the following error:
>
> EDTFATAL: could not create shared memory segment: Invalid argument
> EDTDETAIL: Failed system call was shmget(key=5432001,
> size=3307192320, 03600).
>
> Keeping max connection property to 1000, how do I "best" tune/set up
> its
> memory related parameters (including Linux Kernel parameters --
> SHMMAX and
> SHMALL)?
did you read
http://www.postgresql.org/docs/8.2/static/kernel-resources.html ?
If it is a dedicated DB server the rule of thumb usually is to use 25%
RAM for shared buffers, but no more than 8GB unless proper benchmarking
has shown a benefit using above 8GB. But I am not sure if 8GB of shared
buffers is suitable for 8.2 at all. 8.2 is EOL btw.
Also set effective cache size to 50% RAM.
Depending on your work load you might tune work_mem,
maintenance_work_mem etc.
Also, do you really NEED 1000 concurrent sessions? IF you really do, it
might be worse to look into a connection pooler.
Here is a quite nice guide:
http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server
hth
Jan
--
professional: http://www.oscar-consult.de
private: http://neslonek.homeunix.org/drupal/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: Jan.Lentfer@web.de
Subject: Re: Advice/guideline on increasing shared_buffers and kernel parameters
In-Reply-To: <e6961fb1a4223e08774949997e0bbca6@neslonek.homeunix.org>
References: <00da01cd2ce7$35d17780$a1746680$@com> <e6961fb1a4223e08774949997e0bbca6@neslonek.homeunix.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox