Re: Setting shmmax in /etc/rc on Mac OS X to install Postgres

From: Shane Ambler <pgsql(at)Sheeky(dot)Biz>
To: Doug Graham <duggram(at)gmail(dot)com>
Cc: PostgreSQL Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Setting shmmax in /etc/rc on Mac OS X to install Postgres
Date: 2009-07-03 20:31:18
Message-ID: 4A4E6A96.4040300@Sheeky.Biz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Doug Graham wrote:
> The URL. <http://forums.macrumors.com/showthread.php?p=8006958#post8006958>
>
> On Fri, Jul 3, 2009 at 7:47 AM, Doug Graham <duggram(at)gmail(dot)com> wrote:
>
>> Would you please take a look at my problem thoroughly explained in this
>> post on the Macrumors forum? Any ideas on how to deal with this lack of
>> memory problem?
>>
>> I posted messages to numerous forums, to Mac and Postres support. BTW I've
>> been working on this problem, off and on, for 3 months now.
>>
>> Any advice appreciated.

I run 10.4.7 with 2GB RAM and use the following in /etc/sysctl.conf -

kern.sysv.shmmax=536870912
kern.sysv.shmall=131072
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8

which is half a GB for shared memory.

In an earlier discussion it was mentioned that shmall * 4096 should be
greater or equal to shmmax - your shmmax is 4 times that.
shmmax should also be a multiple of 4096.

Also of note - you are setting the shmmax to 4GB which is all of your
ram to shared memory. A bit extreme even if it was a postgres only
dedicated server.

I'd start with setting shmmax to 1610612736 and working from there,
1.5GB should be plenty to get started. Check that this setting sticks
with sysctl -a and then try postgrsql again.

--

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2009-07-03 20:40:16 Re: Setting shmmax in /etc/rc on Mac OS X to install Postgres
Previous Message Chris Browne 2009-07-03 16:38:43 Re: pg_locks concern