PostgreSQL uses more memory on 6.1?

Claus Guttesen kometen at gmail.com
Tue May 23 23:34:52 PDT 2006


> > That did it!  Bumping kern.ipc.shmall to 65536 got me back up and running
> > with enough shared_memory to get my jobs done.
>
> Having not so long ago been caught by this myself, I think the
> relationship between shmmax and shmall is worth clarifying:
>
> $ sysctl -d kern.ipc.shmall
> kern.ipc.shmall: Maximum number of pages available for shared memory
> $ sysctl -d kern.ipc.shmmax
> kern.ipc.shmmax: Maximum shared memory segment size
>
> So to run 1 Postgres installation with 128Mb of shared memory:
>
> kern.ipc.shmall=32768
> kern.ipc.shmmax=134217728
>
> However suppose you want to run 2 Postgres installations, each using
> 128Mb of shared memory:
>
> kern.ipc.shmall=65536
> kern.ipc.shmmax=134217728
>
> i.e. maximum system wide shared memory is 65536*4096 = 256Mb, but the
> maximum size any single segment can be is 128Mb.

Thank you. I wasn't aware that one could alter sysctl's. I might dive
into that, makes kernel-maintenance a tiny bit easier.

regards
Claus


More information about the freebsd-stable mailing list