Thread: Adjusting Shared Memory with sysctl.conf not working?

Adjusting Shared Memory with sysctl.conf not working?

From
Doug Graham
Date:
I'm trying to install Postresql on my Mac Book Pro which has 4GB ram and runs OS X 10.5.6. Postgres won't install because it says I don't have more than 32MB of shared memory. So as they tell you in their readme I created a file /etc/sysctl.conf with these lines:

kern.sysv.shmmax=16777216
kern.sysv.shmall=16777216
kern.sysv.shmmin=1
kern.sysv.shmmni=4096
kern.sysv.shmseg=8

Reboot multiple times. Here's what shared memory I have running now:

DougMBP:~ duggram$ sysctl -a | grep shm
kern.exec: unknown type returned
kern.sysv.shmall: 16777216
kern.sysv.shmseg: 8
kern.sysv.shmmni: 4096
kern.sysv.shmmin: 1
kern.sysv.shmmax: 4194304

Which is more than Postgres says is required. Any suggestions on what I need to do to get Postgres to install?

Any advice appreciated, Doug

Re: Adjusting Shared Memory with sysctl.conf not working?

From
Tom Lane
Date:
Doug Graham <duggram@gmail.com> writes:
> Reboot multiple times. Here's what shared memory I have running now:

> DougMBP:~ duggram$ sysctl -a | grep shm
> kern.exec: unknown type returned
> kern.sysv.shmall: 16777216
> kern.sysv.shmseg: 8
> kern.sysv.shmmni: 4096
> kern.sysv.shmmin: 1
> kern.sysv.shmmax: 4194304

My MBP has

kern.sysv.shmall: 8192
kern.sysv.shmseg: 8
kern.sysv.shmmni: 32
kern.sysv.shmmin: 1
kern.sysv.shmmax: 33554432

I think you possibly have the meaning/units for shmall and shmmax
reversed.  shmall is in pages, shmmax is in bytes.  I wouldn't be
surprised if the shmall value you're trying to stuff in there is
overflowing to zero...

            regards, tom lane

Re: Adjusting Shared Memory with sysctl.conf not working?

From
Dennis Clark
Date:
Hi Doug,

I have a very similar configuration to yours, but I was able to install PostgreSQL successfully through dumb luck; that is, I simply ignored the advice about the shared memory just to see what would happen.  The installation apparently is smart enough to fix one's environment automatically now, and I received this nice message telling me to re-boot and re-run the installer. I did that and everything works just fine.  You may simply want to delete /etc/sysctl.conf and try again.

Good Luck,
Dennis Clark
 
On Fri, Mar 27, 2009 at 3:05 PM, Doug Graham <duggram@gmail.com> wrote:
I'm trying to install Postresql on my Mac Book Pro which has 4GB ram and runs OS X 10.5.6. Postgres won't install because it says I don't have more than 32MB of shared memory. So as they tell you in their readme I created a file /etc/sysctl.conf with these lines:

kern.sysv.shmmax=16777216
kern.sysv.shmall=16777216
kern.sysv.shmmin=1
kern.sysv.shmmni=4096
kern.sysv.shmseg=8

Reboot multiple times. Here's what shared memory I have running now:

DougMBP:~ duggram$ sysctl -a | grep shm
kern.exec: unknown type returned
kern.sysv.shmall: 16777216
kern.sysv.shmseg: 8
kern.sysv.shmmni: 4096
kern.sysv.shmmin: 1
kern.sysv.shmmax: 4194304

Which is more than Postgres says is required. Any suggestions on what I need to do to get Postgres to install?

Any advice appreciated, Doug



--
Dennis M. Clark
OSS Analyst
http://www.nexb.com
http://www.EasyEclipse.org

Re: Adjusting Shared Memory with sysctl.conf not working?

From
Doug Graham
Date:
Unfortunately I made the wrong choice.  Now I can't get around this shared memory issue.  Too bad I can't uninstall and start over.  Too bad also there isn't some kind of warning so I guy doesn't make the wrong choice.

Doug

On Fri, Mar 27, 2009 at 3:23 PM, Dennis Clark <dclark1330@gmail.com> wrote:
Hi Doug,

I have a very similar configuration to yours, but I was able to install PostgreSQL successfully through dumb luck; that is, I simply ignored the advice about the shared memory just to see what would happen.  The installation apparently is smart enough to fix one's environment automatically now, and I received this nice message telling me to re-boot and re-run the installer. I did that and everything works just fine.  You may simply want to delete /etc/sysctl.conf and try again.

Good Luck,
Dennis Clark

 
On Fri, Mar 27, 2009 at 3:05 PM, Doug Graham <duggram@gmail.com> wrote:
I'm trying to install Postresql on my Mac Book Pro which has 4GB ram and runs OS X 10.5.6. Postgres won't install because it says I don't have more than 32MB of shared memory. So as they tell you in their readme I created a file /etc/sysctl.conf with these lines:

kern.sysv.shmmax=16777216
kern.sysv.shmall=16777216
kern.sysv.shmmin=1
kern.sysv.shmmni=4096
kern.sysv.shmseg=8

Reboot multiple times. Here's what shared memory I have running now:

DougMBP:~ duggram$ sysctl -a | grep shm
kern.exec: unknown type returned
kern.sysv.shmall: 16777216
kern.sysv.shmseg: 8
kern.sysv.shmmni: 4096
kern.sysv.shmmin: 1
kern.sysv.shmmax: 4194304

Which is more than Postgres says is required. Any suggestions on what I need to do to get Postgres to install?

Any advice appreciated, Doug



--
Dennis M. Clark
OSS Analyst
http://www.nexb.com
http://www.EasyEclipse.org

Re: Adjusting Shared Memory with sysctl.conf not working?

From
Doug Graham
Date:
I've tried all kinds of values.  For sure I've tried the ones that Postgres says will work at least 6 times.  I wonder if this is a bug?

Doug

On Fri, Mar 27, 2009 at 3:22 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Doug Graham <duggram@gmail.com> writes:
> Reboot multiple times. Here's what shared memory I have running now:

> DougMBP:~ duggram$ sysctl -a | grep shm
> kern.exec: unknown type returned
> kern.sysv.shmall: 16777216
> kern.sysv.shmseg: 8
> kern.sysv.shmmni: 4096
> kern.sysv.shmmin: 1
> kern.sysv.shmmax: 4194304

My MBP has

kern.sysv.shmall: 8192
kern.sysv.shmseg: 8
kern.sysv.shmmni: 32
kern.sysv.shmmin: 1
kern.sysv.shmmax: 33554432

I think you possibly have the meaning/units for shmall and shmmax
reversed.  shmall is in pages, shmmax is in bytes.  I wouldn't be
surprised if the shmall value you're trying to stuff in there is
overflowing to zero...

                       regards, tom lane