Re: SHMMAX and shared_bufffers - Mailing list pgsql-general

From Scott Marlowe
Subject Re: SHMMAX and shared_bufffers
Date
Msg-id dcc563d10811111053q365cebd3w761a687f89f6beab@mail.gmail.com
Whole thread Raw
In response to Re: SHMMAX and shared_bufffers  (Sam Mason <sam@samason.me.uk>)
Responses Re: SHMMAX and shared_bufffers
List pgsql-general
On Tue, Nov 11, 2008 at 10:58 AM, Sam Mason <sam@samason.me.uk> wrote:
> 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).

free space map and temp buffers.  Not sure what else.  Note that there
could always be some other application using some small amount of
shared memory.  use ipcs to see it.  Run it as root to see other
user's / process's shared mem usage.

pgsql-general by date:

Previous
From: "Brent Wood"
Date:
Subject: Re: ordered pg_dump
Next
From: Alvaro Herrera
Date:
Subject: Re: SHMMAX and shared_bufffers