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

Is this really advisable? (Postgresql and kernel tweaks)



>From Postgresql 7.3's README.OpenBSD:
<snip>
The default sizes in the GENERIC kernel for SysV semaphores
are not really large enough for a database with more than a
handful of connections. A server running such a database should
have at least the following:

option          SEMMNI=256
option          SEMMNS=2048

To serve a large number of connections (>250), you may also need
to increase the maximum shared memory segment size, on the i386
try:

option          SHMMAXPGS=4096          # default on i386 is 2048 = 8Mb
                                        # other archs may vary

These numbers should be tweaked depending on system use. See
options(4) and release(8) manual pages and the FAQ at
http://www.openbsd.org/faq/faq5.html describe how to compile
a new custom kernel.

The ulimit settings can also be a problem.  The following can be
added for the postgresql user in the /etc/login.conf file:

        postgresql:\
                :maxproc-max=256:\
                :maxproc-cur=256:\
                :openfiles-cur=768:\
                :datasize-max=256M:\
                :datasize-cur=64M:\
                :stacksize-cur=4M:
</snip>

# man semmni
man: no entry for semmni in the manual.
# man semmns 
man: no entry for semmns in the manual.
# man shmaxpgs
man: no entry for shmaxpgs in the manual.
# man -k semmni      
semmni: nothing appropriate
# man -k semmns 
semmns: nothing appropriate
# man -k shmaxpgs
shmaxpgs: nothing appropriate
# 




I have seen the top of the mountain, 
and it is good.