Thread: Setting shmmax in /etc/rc on Mac OS X to install Postgres
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.
Thank you, Doug
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.
Thank you, Doug
The URL.
On Fri, Jul 3, 2009 at 7:47 AM, Doug Graham <duggram@gmail.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.
Thank you, Doug
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@gmail.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
Shane Ambler <pgsql@Sheeky.Biz> writes: > 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 have some recollection that OSX treats that as a 32bit number, which means you *can't* set it >= 4GB. Try 1GB or 2GB just to get it working. regards, tom lane
Shane and Tom, you guys nailed it. Although I did have another problem.
I went with Shane's 1610612736 recommendation. However, I suspected all was not well with my file. I had saved it with Edit. Found a vi guide, opened it with vi, cleaned out all the extra header garbage, chaned shhmax and save it. Shut the mac down and restarted. Postres started right up.
Now I have also uncovered another problem, how do you get rid of a sysctl.conf.swp file? Couldn't get that done in vi. But I can even see reference to it outside of vi. If you don't have time to tell me I'll research deleting a swp file when I get done setting up my postgres.
Thank you all,
Doug
I went with Shane's 1610612736 recommendation. However, I suspected all was not well with my file. I had saved it with Edit. Found a vi guide, opened it with vi, cleaned out all the extra header garbage, chaned shhmax and save it. Shut the mac down and restarted. Postres started right up.
Now I have also uncovered another problem, how do you get rid of a sysctl.conf.swp file? Couldn't get that done in vi. But I can even see reference to it outside of vi. If you don't have time to tell me I'll research deleting a swp file when I get done setting up my postgres.
Thank you all,
Doug
On Fri, Jul 3, 2009 at 2:40 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Shane Ambler <pgsql@Sheeky.Biz> writes:I have some recollection that OSX treats that as a 32bit number, which
> 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.
means you *can't* set it >= 4GB. Try 1GB or 2GB just to get it working.
regards, tom lane
Doug Graham wrote: > Shane and Tom, you guys nailed it. Although I did have another problem. > > I went with Shane's 1610612736 recommendation. However, I suspected all was > not well with my file. I had saved it with Edit. Found a vi guide, opened > it with vi, cleaned out all the extra header garbage, chaned shhmax and save > it. Shut the mac down and restarted. Postres started right up. Didn't think of non-plain text.. If you do use TextEdit again in the Format menu select Make Plain Text. This is only an issue when you create a new file - if you open an existing one it will retain the format previously saved. > Now I have also uncovered another problem, how do you get rid of a > sysctl.conf.swp file? Couldn't get that done in vi. But I can even see > reference to it outside of vi. If you don't have time to tell me I'll > research deleting a swp file when I get done setting up my postgres. Not certain but I believe that is the vi temporary file. Maybe the rtf codes messed it's cleanup. Or it had not exited cleanly. If your sure your not editing the file then delete it. -- Shane Ambler pgSQL (at) Sheeky (dot) Biz
Tom Lane wrote: > Shane Ambler <pgsql@Sheeky.Biz> writes: >> 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 have some recollection that OSX treats that as a 32bit number, which > means you *can't* set it >= 4GB. Try 1GB or 2GB just to get it working. > > regards, tom lane > Could be - not a fully 64 bit clean kernel yet? Maybe that will change with 10.6 - suppose to be a full 64 bit system, right? Although does it allow you to allocate 100% or more of physical ram to shared mem? -- Shane Ambler pgSQL (at) Sheeky (dot) Biz