Search Postgresql Archives

Re: FreeBSD 7 needing to allocate lots of shared memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Shane,

All settings are as expected by both sysctl.conf and loader.conf

Shane Ambler wrote:
Christiaan Willemsen wrote:
Bill Moran wrote:
In response to Christiaan Willemsen <cwillemsen@xxxxxxxxxxxxx>:

 
#sysctl -a | grep shm
kern.ipc.shm_allow_removed: 0
kern.ipc.shm_use_phys: 1
kern.ipc.shmall: 68719476736
kern.ipc.shmseg: 128
kern.ipc.shmmni: 192
kern.ipc.shmmin: 1
kern.ipc.shmmax: 68719476736
   

Try bumping shmmni:
$ sysctl -d kern.ipc.shmmni
kern.ipc.shmmni: Number of shared memory identifiers

I have this set to 1000 on most of my systems.  Can't seem to find my
notes on it right now, but that may be your holdup.  The PG docs seem
to indicate that this number can be set very low, as PG only needs a
single identifier, but I must have had _some_ reason for raising it.

> Hello Bill,
>
> I have this one set to 512 in loader.conf
> other params in loader.conf:

Your sysctl output above shows kern.ipc.shmmni is set to 192

> kern.ipc.semmni=1024
> kern.ipc.semmns=1024
> kern.ipc.semmnu=512

Take a close look here.

Christiaan mentioned kern.ipc.shmmni the list above shows kern.ipc.semmni (you may only be listing others)

Double check that your settings are what you expect.

Also check /etc/sysctl.conf which may override some of the changeable options from loader.conf.

Settings in loader.conf are only required for read-only options (that need a reboot to take effect). Others are often changed in sysctl.conf

Check your running settings against what you expect.



Just a guess here - kern.ipc.shmall and kern.ipc.shmmax seem very high but not sure if this can lead to the issue.

> sysctl -d kern.ipc.shmmax
kern.ipc.shmmax: Maximum shared memory segment size

> sysctl -d kern.ipc.shmall
kern.ipc.shmall: Maximum number of pages available for shared memory

Looks like you have set this to equal your installed RAM but a page is a bit more than one byte. (is it 4K to a page?)



You haven't mentioned whether you are using the generic kernel or a custom built one (with what changes?)


For reference - I have an old P4 3Ghz with 1GB RAM (32bit)
FreeBSD 7 release with a custom kernel to turn on the new scheduler

I can set shared_buffers to 64MB (you mentioned trouble over 32MB)

fbsd# sysctl -a | grep shm
kern.ipc.shm_allow_removed: 0
kern.ipc.shm_use_phys: 1
kern.ipc.shmall: 32768
kern.ipc.shmseg: 128
kern.ipc.shmmni: 192
kern.ipc.shmmin: 1
kern.ipc.shmmax: 134217728

fbsd# sysctl -a | grep sem
kern.ipc.semaem: 16384
kern.ipc.semvmx: 32767
kern.ipc.semusz: 92
kern.ipc.semume: 10
kern.ipc.semopm: 100
kern.ipc.semmsl: 60
kern.ipc.semmnu: 30
kern.ipc.semmns: 60
kern.ipc.semmni: 10
kern.ipc.semmap: 256


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux