pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
To: pgsql-performance@postgresql.org
Subject: Re: The right SHMMAX and FILE_MAX
Date: Mon, 02 May 2011 21:06:28 +1200
Message-ID: <4DBE7414.2010902@catalyst.net.nz> (raw)
In-Reply-To: <BANLkTinCr_+Hs_zzHPb+tBdtuLFhrsfKdg@mail.gmail.com>
References: <BANLkTinCr_+Hs_zzHPb+tBdtuLFhrsfKdg@mail.gmail.com>

On 01/05/11 18:48, Phoenix Kiula wrote:
> Now, according to my reading in the PG manual and this list, a good
> recommended value for SHMMAX is
>
>     (shared_buffers * 8192)
>
> My postgresql.conf settings at the moment are:
>
>      max_connections = 300
>      shared_buffers = 300MB
>      effective_cache_size = 2000MB
>
> By this calculation, shared_b * 8192 will be:
>
>       2,457,600,000,000
>
> That's a humongous number. So either the principle for SHMMAX is
> amiss, or I am reading this wrongly?

You are confusing shared_buffers expressed as "number of pages" with 
shared_buffers expressed as "MB". The docs are assuming you are working 
with the former (and would appear to be assuming your pagesize is 8K - 
which is teh default but not required to be the case). If you are 
showing shared_buffers as "MB" then obviously you cane set SHMMAX using 
the value multiplied by (1024*1024), so in your case:

300 * (1024*1024) = 314572800


However note that there are things other than shared_buffers require 
shared memory, so you'll need more than this. Use Greg's script.

Cheers

Mark



view thread (8+ messages)  latest in thread

Message-ID: <4DBE7414.2010902@catalyst.net.nz>
Permalink:  ../4DBE7414.2010902@catalyst.net.nz/
Also on:    postgresql.org/message-id/4DBE7414.2010902@catalyst.net.nz

 · 

reply

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: mark.kirkwood@catalyst.net.nz
  Subject: Re: The right SHMMAX and FILE_MAX
  In-Reply-To: <4DBE7414.2010902@catalyst.net.nz>

* 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