[CentOS] CentOS 6: Increase shared memory limits permanently

Yavor Nikolov nikolov.javor at gmail.com
Tue Oct 4 19:45:29 UTC 2011


Seems OK for PostgreSQL. You should also take into account the requirements
of the other applications on that server too (if any).
Actually it's 5 000 000 000 < 2097152 * 4096 == 8 589 934 592. Which is OK.

You can use ipcs monitor the allocated shared memory segments and their
actual size.

http://www.postgresql.org/docs/8.4/static/kernel-resources.html
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Oracle_Tuning_Guide/(This
is for Oracle but its memory tuning is quite similar and you may find
some useful information in this guide).

On Tue, Oct 4, 2011 at 21:56, Alexander Farber
<alexander.farber at gmail.com>wrote:

> Thanks, I've put (for my 16GB RAM / 64 bit machine)
> into /etc/sysctl.conf: kernel.shmmax = 5000000000
>
> And into postgresql.conf: shared_buffers = 4096MB
>
> I didn't change shmall from the default -
>
> # sysctl -A|grep shm
> kernel.shmmax = 5000000000
> kernel.shmall = 2097152
> kernel.shmmni = 4096
>
> because
>
> # getconf PAGE_SIZE
> 4096
>
> and 2097152 * 4096 < 5000000000, correct?
>
> Now PostgreSQL 8.4.x seems to run ok
>
> Regards
> Alex
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>



More information about the CentOS mailing list