X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 438E58B9D0B for ; Mon, 31 Jan 2005 21:51:57 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 62280-09 for ; Mon, 31 Jan 2005 21:51:51 +0000 (GMT) Received: from mail.coretech.co.nz (coretech.co.nz [202.36.204.41]) by svr1.postgresql.org (Postfix) with ESMTP id 193C38B9D0A for ; Mon, 31 Jan 2005 21:51:52 +0000 (GMT) Received: (qmail 26499 invoked from network); 31 Jan 2005 21:51:48 -0000 Received: from 218-101-45-238.paradise.net.nz (HELO ?192.168.1.11?) (218.101.45.238) by 0 with SMTP; 31 Jan 2005 21:51:48 -0000 Message-ID: <41FEA967.8000906@coretech.co.nz> Date: Tue, 01 Feb 2005 10:55:51 +1300 From: Mark Kirkwood User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-docs@postgresql.org Subject: Instructions for FreeBSD ipc config showing age Content-Type: multipart/mixed; boundary="------------040508030501020701090901" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200501/73 X-Sequence-Number: 2832 This is a multi-part message in MIME format. --------------040508030501020701090901 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit A recent mailing on the -perf list highlighted that the docs concerning ipc configuration are a bit out for date for FreeBSD. The attached patch separates out FreeBSD from Open/NetBSD, and shows how to change settings via sysctl w/o a kernel rebuild. Any thoughts? BTW I suspect that both Open and NetBSD are in need of an update too, however I don't have any installations of such to experiment on. regards Mark --------------040508030501020701090901 Content-Type: text/plain; name="runtime.sgml.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="runtime.sgml.diff" --- runtime.sgml.orig Sat Jan 29 18:30:50 2005 +++ runtime.sgml Mon Jan 31 22:30:35 2005 @@ -4350,10 +4350,8 @@ - FreeBSD NetBSD OpenBSD - FreeBSDIPC configuration NetBSDIPC configuration OpenBSDIPC configuration @@ -4364,25 +4362,66 @@ the option SHMMAXPGS (in pages). The following shows an example of how to set the various parameters: -options SYSVSHM -options SHMMAXPGS=4096 -options SHMSEG=256 +option SYSVSHM +option SHMMAXPGS=4096 +option SHMSEG=256 -options SYSVSEM -options SEMMNI=256 -options SEMMNS=512 -options SEMMNU=256 -options SEMMAP=256 +option SYSVSEM +option SEMMNI=256 +option SEMMNS=512 +option SEMMNU=256 +option SEMMAP=256 - (On NetBSD and OpenBSD the key word is actually - option singular.) You might also want to configure your kernel to lock shared memory into RAM and prevent it from being paged out to swap. Use the sysctl setting kern.ipc.shm_use_phys. + + + + + + + FreeBSD + FreeBSDIPC configuration + + + The default settings are only suitable for small installations + (default SHMMAX is 32 MB). Changes can be made via + the sysctl or loader interfaces. + Firstly the ones that are settable using sysctl: + +$ systcl -w kern.ipc.shmall=32768 +$ systcl -w kern.ipc.shmmax=134217728 +$ systcl -w kern.ipc.semmap=256 + + These to be saved between reboots in /etc/sysctl.conf. + + + The remaining sempahore settings are read only as far as + sysctl is concerned, but can be changed before boot + using the loader prompt: + +(loader) set kern.ipc.semmni=256 +(loader) set kern.ipc.semmns=512 +(loader) set kern.ipc.semmnu=256 + + Similarly these can be saved between reboots in + /boot/loader.conf. + + + You might also want to configure your kernel to lock shared + memory into RAM and prevent it from being paged out to swap. + Use the sysctl setting + kern.ipc.shm_use_phys. + + + Versions before 4.0 will require a kernel rebuild, see the + NetBSD and OpenBSD instructions above, however the key word is + options (plural) in this case. --------------040508030501020701090901--