Re: SHMMAX and shared_bufffers

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Sam Mason" <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SHMMAX and shared_bufffers
Date: 2008-11-11 18:53:55
Message-ID: dcc563d10811111053q365cebd3w761a687f89f6beab@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Nov 11, 2008 at 10:58 AM, Sam Mason <sam(at)samason(dot)me(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Glen Beane 2008-11-11 19:03:32 Problem using COPY command to load data
Previous Message Brent Wood 2008-11-11 18:01:39 Re: ordered pg_dump