From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mel Llaguno <mllaguno@coverity.com>
Cc: Pavan Deolasee <pavan.deolasee@gmail.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax
Date: Thu, 07 Feb 2013 00:49:29 -0500
Message-ID: <27677.1360216169@sss.pgh.pa.us> (raw)
In-Reply-To: <E1FB7FBAE29E634FA58D6CC0D59F288B11EF73B5@CH1PRD0511MB442.namprd05.prod.outlook.com>
References: <E1FB7FBAE29E634FA58D6CC0D59F288B11EF7329@CH1PRD0511MB442.namprd05.prod.outlook.com>
<CABOikdMfZM3TGe_=8CMfFWkS1dcEafOuykNv3Ei1_1W9ugGCJQ@mail.gmail.com>
<E1FB7FBAE29E634FA58D6CC0D59F288B11EF73B5@CH1PRD0511MB442.namprd05.prod.outlook.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Mel Llaguno <mllaguno@coverity.com> writes:
> Thanks for your reply. I agree with your statement that you should set the configuration parameters first, but I would like to be able to calculate the SHMMAX value based on those parameters. This is particularly useful when suggesting postgresql.conf optimizations to our customers whose machine have a lot of RAM (64+GB). Having to guess this value is far from ideal; what I'd like is the formula used by postgresql that generates the shmget() value displayed in the pgctl.log.
There's some rather old information in Table 17-2 here:
http://www.postgresql.org/docs/9.2/static/kernel-resources.html#SYSVIPC
As Pavan says, the shared_buffers term is usually the only one worth
worrying about. The traditional advice is to not set that to more than
about a quarter of your physical RAM, which would mean that this script
you're using to set SHMMAX is leaving lots of headroom, which is
perfectly OK. (AFAIK there is no penalty to setting SHMMAX larger than
you need.)
There's more info worth looking at here:
https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server
regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, mllaguno@coverity.com, pavan.deolasee@gmail.com
Subject: Re: PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax
In-Reply-To: <27677.1360216169@sss.pgh.pa.us>
* 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