pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Instructions for FreeBSD ipc config showing age
3+ messages / 2 participants
[nested] [flat]

* Instructions for FreeBSD ipc config showing age
@ 2005-01-31 21:55  Mark Kirkwood <markir@coretech.co.nz>
  0 siblings, 1 reply; 3+ messages in thread

From: Mark Kirkwood @ 2005-01-31 21:55 UTC (permalink / raw)
  To: pgsql-docs

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

Attachments:

runtime.sgml.diff (text/plain, 3.6K) download --- runtime.sgml.orig Sat Jan 29 18:30:50 2005 +++ runtime.sgml Mon Jan 31 22:30:35 2005 @@ -4350,10 +4350,8 @@ <varlistentry> - <term><systemitem class="osname">FreeBSD</></term> <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,25 +4362,66 @@ 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 memory into RAM and prevent it from being paged out to swap. Use the <command>sysctl</> setting <literal>kern.ipc.shm_use_phys</>. + </para> + </listitem> + </varlistentry> + + + <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> + 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> </listitem> </varlistentry>
^ permalink raw reply [nested|flat] 3+ messages in thread

* Re: Instructions for FreeBSD ipc config showing age
@ 2005-01-31 22:34  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Mark Kirkwood <markir@coretech.co.nz>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2005-01-31 22:34 UTC (permalink / raw)
  To: Mark Kirkwood <markir@coretech.co.nz>; +Cc: pgsql-docs

Mark Kirkwood <markir@coretech.co.nz> writes:
> 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?

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".

Also, alphabetization would suggest putting the FreeBSD entry before the
other two, not after, so maybe that should be "see below".

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Instructions for FreeBSD ipc config showing age
@ 2005-02-01 01:29  Mark Kirkwood <markir@coretech.co.nz>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Mark Kirkwood @ 2005-02-01 01:29 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-docs

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

Attachments:

runtime.sgml.diff (text/plain, 3.3K) download --- 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
^ permalink raw reply [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-02-01 01:29 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-01-31 21:55 Instructions for FreeBSD ipc config showing age Mark Kirkwood <markir@coretech.co.nz>
2005-01-31 22:34 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-02-01 01:29   ` Mark Kirkwood <markir@coretech.co.nz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox