From: Bill Moran <wmoran@collaborativefusion.com>
To: Jessica Richard <rjessil@yahoo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: how big shmmax is good for Postgres...
Date: Thu, 10 Jul 2008 07:19:19 -0400
Message-ID: <20080710071919.51b7e2a4.wmoran@collaborativefusion.com> (raw)
In-Reply-To: <639285.44246.qm@web56404.mail.re3.yahoo.com>
References: <639285.44246.qm@web56404.mail.re3.yahoo.com>
In response to Jessica Richard <rjessil@yahoo.com>:
> On a Linux system, if the total memory is 4G and the shmmax is set to 4G, I know it is bad, but how bad can it be? Just trying to understand the impact the "shmmax" parameter can have on Postgres and the entire system after Postgres comes up on this number.
It's not bad by definition. shmmax is a cap on the max that can be used.
Just because you set it to 4G doesn't mean any application is going to
use all of that. With PostgreSQL, the maximum amount of shared memory it
will allocate is governed by the shared_buffers setting in the
postgresql.conf.
It _is_ a good idea to set shmmax to a reasonable size to prevent
a misbehaving application from eating up all the memory on a system,
but I've yet to see PostgreSQL misbehave in this manner. Perhaps I'm
too trusting.
> What is the reasonable setting for shmmax on a 4G total machine?
If you mean what's a reasonable setting for shared_buffers, conventional
wisdom says to start with 25% of the available RAM and increase it or
decrease it if you discover your workload benefits from more or less.
By "available RAM" is meant the free RAM after all other applications
are running, which will be 4G if this machine only runs PostgreSQL, but
could be less if it runs other things like a web server.
--
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/
wmoran@collaborativefusion.com
Phone: 412-422-3463x4023
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-performance@postgresql.org
Cc: wmoran@collaborativefusion.com, rjessil@yahoo.com
Subject: Re: how big shmmax is good for Postgres...
In-Reply-To: <20080710071919.51b7e2a4.wmoran@collaborativefusion.com>
* 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