Re: [PERFORM] configure shmmax on MAC OS X

2004-04-13 Thread Joshua D. Drake
Hello,

I found that if you SHMALL value was less than your SHMMAX value,
the value wouldn't take.
J

Tom Lane wrote:

Qing Zhao <[EMAIL PROTECTED]> writes:

My suspision is that the change i made in /etc/rc does not take 
effect.Is there a way to check it?


sysctl has an option to show the values currently in effect.

I believe that /etc/rc is the correct place to set shmmax on OSX 10.3 or
later ... but we have seen prior reports of people having trouble
getting the setting to "take".  There may be some other constraint
involved.

sysctl -w kern.sysv.shmmax=4294967296 // byte


Hmm, does sysctl work for values that exceed the range of int?

There's no particularly good reason to try to set shmmax as high as you
are trying anyhow; you really don't need more than a couple hundred meg
in Postgres shared memory.  It's better to leave the kernel to manage
the bulk of your RAM.
			regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
---(end of broadcast)---
TIP 6: Have you searched our list archives?
  http://archives.postgresql.org


Re: [PERFORM] configure shmmax on MAC OS X

2004-04-13 Thread Tom Lane
Qing Zhao <[EMAIL PROTECTED]> writes:
> My suspision is that the change i made in /etc/rc does not take 
> effect.Is there a way to check it?

sysctl has an option to show the values currently in effect.

I believe that /etc/rc is the correct place to set shmmax on OSX 10.3 or
later ... but we have seen prior reports of people having trouble
getting the setting to "take".  There may be some other constraint
involved.

> sysctl -w kern.sysv.shmmax=4294967296 // byte

Hmm, does sysctl work for values that exceed the range of int?

There's no particularly good reason to try to set shmmax as high as you
are trying anyhow; you really don't need more than a couple hundred meg
in Postgres shared memory.  It's better to leave the kernel to manage
the bulk of your RAM.

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [PERFORM] configure shmmax on MAC OS X

2004-04-13 Thread Qing Zhao
Tom:

I used sysctl -A to see the kernel state, I got:
kern.sysv.shmmax: -1
It looks the value is too big!

Thanks!

Qing
On Apr 13, 2004, at 12:55 PM, Tom Lane wrote:
Qing Zhao <[EMAIL PROTECTED]> writes:
My suspision is that the change i made in /etc/rc does not take
effect.Is there a way to check it?
sysctl has an option to show the values currently in effect.

I believe that /etc/rc is the correct place to set shmmax on OSX 10.3 
or
later ... but we have seen prior reports of people having trouble
getting the setting to "take".  There may be some other constraint
involved.

sysctl -w kern.sysv.shmmax=4294967296 // byte
Hmm, does sysctl work for values that exceed the range of int?

There's no particularly good reason to try to set shmmax as high as you
are trying anyhow; you really don't need more than a couple hundred meg
in Postgres shared memory.  It's better to leave the kernel to manage
the bulk of your RAM.
			regards, tom lane



---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [PERFORM] configure shmmax on MAC OS X

2004-04-13 Thread Jeff Bohmer

On OS X, I've always made these changes in:

/System/Library/StartupItems/SystemTuning/SystemTuning

and manually checked it with sysctl after reboot.  Works for me.

100k buffers is probably overkill.  There can be a performance penalty with too many 
buffers.  See this lists' archives for more.  10k would probably be a better start.

- Jeff


>Hi, all,
>
>I have got a new MaC OS G5 with 8GB RAM. So i tried to increase
>the shmmax in Kernel so that I can take advantage of the RAM.
>
>I searched the web and read the manual for PG7.4 chapter 16.5.1.
>After that, I edited /etc/rc file:
>
>sysctl -w kern.sysv.shmmax=4294967296 // byte
>sysctl -w kern.sysv.shmmin=1
>sysctl -w kern.sysv.shmmni=32
>sysctl -w kern.sysv.shmseg=8
>sysctl -w kern.sysv.shmall=1048576 //4kpage
>
>for 4G shared RAM.
>
>Then I changed postgresql.conf:
>shared_buffer=10 //could be bigger?
>
>and restart the machine and postgres server. To my surprise, postgres server wouldn't
>start, saying that the requested shared memory exceeds kernel's shmmax.
>
>My suspision is that the change i made in /etc/rc does not take effect.Is there a way
>to check it?  Is there an
>up limit for how much RAM can be allocated for shared buffer in MAC OS X? Or
>is there something wrong with my calculation in numbers?
>
>Thanks a lot!
>
>Qing
>
>
>---(end of broadcast)---
>TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to [EMAIL PROTECTED] so that your
> message can get through to the mailing list cleanly


-- 

Jeff Bohmer
VisionLink, Inc.
_
303.402.0170
www.visionlink.org
_
People. Tools. Change. Community.

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly