pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Maximilian Tyrtania <mty@fischerappelt.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: shared memory settings on MAC OS X
Date: Sun, 28 Oct 2007 19:15:27 +0100
Message-ID: <C34A904F.149E0%mty@fischerappelt.de> (raw)
In-Reply-To: <870.1193591652@sss.pgh.pa.us>

Hi,

>> I am trying to increase the amount of shared memory on my Mac OS 10.4
>> machine (i have 5 GB RAM installed), but without too much success.
> 
> Weird, those same exact settings work fine for me.  How up-to-date
> is your 10.4.x installation?

Ah, sorry, it's up to date, 10.4.10.

>  The relevant part of /etc/rc in mine is
> 
> 
> if [ -f /etc/sysctl-macosxserver.conf ]; then
>         awk '{ if (!index($1, "#") && index($1, "=")) print $1 }' <
> /etc/sysctl\
> -macosxserver.conf | while read
>         do
>                 sysctl -w ${REPLY}
>         done
> fi
> if [ -f /etc/sysctl.conf ]; then
>         awk '{ if (!index($1, "#") && index($1, "=")) print $1 }' <
> /etc/sysctl\
> .conf | while read
>         do
>                 sysctl -w ${REPLY}
>         done
> fi
> 
> sysctl -w kern.sysv.shmmax=4194304 kern.sysv.shmmin=1 kern.sysv.shmmni=32
> kern.\
> sysv.shmseg=8 kern.sysv.shmall=1024

Thanks for digging that out.

> So one obvious gotcha would be if you have a
> /etc/sysctl-macosxserver.conf file that sets 'em differently.

Good to know. Unfortunately I don't seem to have that file. Weird.

> The gotchas I know about in this area are:
> 
> * The OSX kernel seems to lock down the shmem settings as soon as all
> five have been correctly specified via sysctl.  This is why the sysctl
> done last in /etc/rc doesn't overwrite yours.

> * It's fairly draconian about what "correctly specified" is --- notably,
> at least some versions insist on shmmax being an exact multiple of the
> page size.  But the numbers you quoted look OK.

I tried other numbers as well. Tiger wouldn't change that shmmax value from
4194304. Not sure what's going on there.

Thanks again,

- Maximilian Tyrtania | mty@fischerappelt.de
  fischerAppelt Kommunikation GmbH
  Tucholskystr.18 | D-10117 Berlin | Germany
  Tel. ++49-30-726146-728
  http://www.fischerappelt.de

--





view thread (9+ messages)  latest in thread

Message-ID: <C34A904F.149E0%mty@fischerappelt.de>
Permalink:  ../C34A904F.149E0%25mty@fischerappelt.de/
Also on:    postgresql.org/message-id/C34A904F.149E0%mty@fischerappelt.de

 · 

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-admin@postgresql.org
  Cc: mty@fischerappelt.de, tgl@sss.pgh.pa.us
  Subject: Re: shared memory settings on MAC OS X
  In-Reply-To: <C34A904F.149E0%mty@fischerappelt.de>

* 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