Re: SHMMAX and shared_bufffers

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: SHMMAX and shared_bufffers
Date: 2008-11-11 17:58:27
Message-ID: 20081111175827.GH2459@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Nov 11, 2008 at 02:17:20PM -0300, Alvaro Herrera wrote:
> Thom Brown escribió:
> > I've noticed that if I set my SHMMAX to 256 * 1024 * 1024 (268435456)
> > and my shared_buffers value in postgresql.conf to 256MB the server
> > fails to start. I managed to find a tipping point: 249MB seems to be
> > too much and 248MB seems to be okay.
> >
> > Could someone explain what I'm missing here? I thought the
> > shared_buffers could be anything up to SHMMAX?
>
> shared_buffers is not the only factor to shared memory, so you need to
> provide some extra SHMMAX slop.

what is this "extra slop" needed for? I'd always ignored it before and
just made SHMMAX a bit bigger until PG stopped complaining and started.
But computers are supposed to be deterministic; what's taking up the
extra space? I expect this knowledge to be most useful to people like
Greg Smith who's making a config auto-tuner, it would be bad if it said
to set SHMMAX to xMB and it really needs to be set to (x+12)MB.

I've just found a table[1] in the docs that attempts to explain what's
going on, but I get 10.5MB of extra shared memory being used (default
config values, expect for shared_buffers going up to 256MB).

Sam

[1] http://www.postgresql.org/docs/current/static/kernel-resources.html#SHARED-MEMORY-PARAMETERS

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brent Wood 2008-11-11 18:01:39 Re: ordered pg_dump
Previous Message Brent Wood 2008-11-11 17:51:57 Re: how to best resync serial columns