Return-Path: <pgsql-docs-owner+M2834@postgresql.org>
Delivered-To: markir@coretech.co.nz
Received: (qmail 5173 invoked from network); 1 Feb 2005 01:27:26 -0000
Received: from svr4.postgresql.org (66.98.251.159)
	by 0 with SMTP; 1 Feb 2005 01:27:26 -0000
Received: from postgresql.org (svr1.postgresql.org [200.46.204.71])
	by svr4.postgresql.org (Postfix) with ESMTP id 9CADE5AF423;
	Tue,  1 Feb 2005 01:27:25 +0000 (GMT)
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 314798B9B24
	for <pgsql-docs-postgresql.org@localhost.postgresql.org>;
	Tue,  1 Feb 2005 01:25:47 +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 82209-07
	for <pgsql-docs-postgresql.org@localhost.postgresql.org>;
	Tue,  1 Feb 2005 01:25:41 +0000 (GMT)
Received: from mail.coretech.co.nz (coretech.co.nz [202.36.204.41])
	by svr1.postgresql.org (Postfix) with ESMTP id 003788B9CA5
	for <pgsql-docs@postgresql.org>; Tue,  1 Feb 2005 01:25:43 +0000 (GMT)
Received: (qmail 5120 invoked from network); 1 Feb 2005 01:25:38 -0000
Received: from 218-101-45-238.paradise.net.nz (HELO ?192.168.1.11?)
	(218.101.45.238) by 0 with SMTP; 1 Feb 2005 01:25:38 -0000
Message-ID: <41FEDB83.1060601@coretech.co.nz>
Date: Tue, 01 Feb 2005 14:29:39 +1300
From: Mark Kirkwood <markir@coretech.co.nz>
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: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-docs@postgresql.org
Subject: Re: [DOCS] Instructions for FreeBSD ipc config showing age
References: <41FEA967.8000906@coretech.co.nz> <5043.1107210868@sss.pgh.pa.us>
In-Reply-To: <5043.1107210868@sss.pgh.pa.us>
Content-Type: multipart/mixed; boundary="------------060108080608010504080804"
X-Virus-Scanned: by amavisd-new at hub.org
X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=AWL
X-Spam-Level: 
X-Mailing-List: pgsql-docs
Precedence: bulk
Sender: pgsql-docs-owner@postgresql.org

This is a multi-part message in MIME format.
--------------060108080608010504080804
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Tom Lane wrote:
>
> 
> This seems a bit awkwardly phrased:
> 
> 
>>+       <para>
>>+        Versions before 4.0 will require a kernel rebuild, see the
>>+        <systemitem class="osname">NetBSD</> and <systemitem
>>+        class="osname">OpenBSD</> instructions above, however the key word is 
>>+        <literal>options</literal> (plural) in this case.
>>        </para>
> 
> 
> Perhaps
> 
> 	FreeBSD versions before 4.0 work like NetBSD and OpenBSD (see above),
> 	except that the configuration file uses the key word "options"
> 	instead of "option".
> 
Yeah - much nicer.
> Also, alphabetization would suggest putting the FreeBSD entry before the
> other two, not after, so maybe that should be "see below".
Thanks - had not considered that!

Amended patch attached.

regards

Mark


--------------060108080608010504080804
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	Tue Feb  1 14:25:53 2005
@@ -4351,9 +4351,51 @@
 
      <varlistentry>
       <term><systemitem class="osname">FreeBSD</></term>
+      <indexterm><primary>FreeBSD</><secondary>IPC configuration</></>
+      <listitem>
+       <para>
+        The default settings are only suitable for small installations 
+        (default <varname>SHMMAX</varname> is 32 MB). Changes can be made via
+        the <command>sysctl</command> or <command>loader</command> interfaces.
+        Firstly the ones that are settable using <command>sysctl</command>:
+<screen>
+<prompt>$</prompt> <userinput>systcl -w kern.ipc.shmall=32768</userinput>
+<prompt>$</prompt> <userinput>systcl -w kern.ipc.shmmax=134217728</userinput>
+<prompt>$</prompt> <userinput>systcl -w kern.ipc.semmap=256</userinput>
+</screen>
+        These to be saved between reboots in <filename>/etc/sysctl.conf.
+       </para>
+       <para>
+        The remaining sempahore settings are read only as far as 
+        <command>sysctl</command> is concerned, but can be changed before boot 
+        using the <command>loader</command> prompt:
+<screen>
+<prompt>(loader)</prompt> <userinput>set kern.ipc.semmni=256</userinput>
+<prompt>(loader)</prompt> <userinput>set kern.ipc.semmns=512</userinput>
+<prompt>(loader)</prompt> <userinput>set kern.ipc.semmnu=256</userinput>
+</screen>
+        Similarly these can be saved between reboots in 
+        <filename>/boot/loader.conf</filename>.
+       </para>
+       <para>
+        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 <command>sysctl</> setting
+        <literal>kern.ipc.shm_use_phys</>.
+       </para>
+       <para>
+        <systemitem class="osname">FreeBSD</> versions before 4.0 work like 
+        <systemitem class="osname">NetBSD</> and <systemitem class="osname">
+        OpenBSD</> (see below), except that the configuration file uses the 
+        key word "options" instead of "option".
+       </para>
+      </listitem>
+     </varlistentry>
+
+
+     <varlistentry>
       <term><systemitem class="osname">NetBSD</></term>
       <term><systemitem class="osname">OpenBSD</></term>
-      <indexterm><primary>FreeBSD</><secondary>IPC configuration</></>
       <indexterm><primary>NetBSD</><secondary>IPC configuration</></>
       <indexterm><primary>OpenBSD</><secondary>IPC configuration</></>
       <listitem>
@@ -4364,19 +4406,16 @@
         the option <varname>SHMMAXPGS</> (in pages). The following
         shows an example of how to set the various parameters:
 <programlisting>
-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
 </programlisting>
-        (On <systemitem class="osname">NetBSD</> and <systemitem
-        class="osname">OpenBSD</> the key word is actually
-        <literal>option</literal> singular.)
        </para>
        <para>
         You might also want to configure your kernel to lock shared


--------------060108080608010504080804
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

--------------060108080608010504080804--

