pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Kirkwood <markir@coretech.co.nz>
To: pgsql-docs@postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Instructions for Linux ipc config
Date: Sat, 05 Feb 2005 10:07:52 +1300
Message-ID: <4203E428.10302@coretech.co.nz> (raw)
In-Reply-To: <4202CD6B.3050203@coretech.co.nz>
References: <4202AE60.6000706@coretech.co.nz>
	<5980.1107472704@sss.pgh.pa.us>
	<4202CD6B.3050203@coretech.co.nz>

Attached are my first thoughts for the amended instructions.

Mark Kirkwood wrote:
>
> But to be on the safe side, it would make sense to do something similar
> to the BSD section, and comment about older distributions maybe needing
> to manipulate /proc/kernel/* directly.
> 

Attachments:

runtime.sgml.diff (text/plain, 2.7K) download --- runtime.sgml.orig Fri Feb 4 22:17:45 2005 +++ runtime.sgml Fri Feb 4 22:17:57 2005 @@ -4414,37 +4414,29 @@ <indexterm><primary>Linux</><secondary>IPC configuration</></> <listitem> <para> - The default shared memory limit (both - <varname>SHMMAX</varname> and <varname>SHMALL</varname>) is 32 - MB in 2.2 kernels, but it can be changed in the - <filename>proc</filename> file system (without reboot). For - example, to allow 128 MB: + The default settings are only suitable for small installations + (the default max segment size is 32 MB). However the remaining + defaults are quite generously sized, and usually do not require + changes. The max segment size can be changed via the + <command>sysctl</command> interface. For example, to allow 128 MB, + and explicitly set the maximum total shared memory size to 2097152 + pages (the default): <screen> -<prompt>$</prompt> <userinput>echo 134217728 &gt;/proc/sys/kernel/shmall</userinput> -<prompt>$</prompt> <userinput>echo 134217728 &gt;/proc/sys/kernel/shmmax</userinput> +<prompt>$</prompt> <userinput>systcl -w kernel.shmmax=134217728</userinput> +<prompt>$</prompt> <userinput>systcl -w kernel.shmall=2097152</userinput> </screen> - You could put these commands into a script run at boot-time. - </para> - - <para> - Alternatively, you can use <command>sysctl</command>, if - available, to control these parameters. Look for a file - called <filename>/etc/sysctl.conf</filename> and add lines - like the following to it: -<programlisting> -kernel.shmall = 134217728 -kernel.shmmax = 134217728 -</programlisting> - This file is usually processed at boot time, but - <command>sysctl</command> can also be called - explicitly later. + In addition these settings can be saved between reboots in + <filename>/etc/sysctl.conf. </para> <para> - Other parameters are sufficiently sized for any application. If - you want to see for yourself look in - <filename>/usr/src/linux/include/asm-<replaceable>xxx</>/shmparam.h</> - and <filename>/usr/src/linux/include/linux/sem.h</>. + Older distributions may not have the <command>sysctl</command> program, + but equivalent changes can be made by manipulating the + <filename>/proc</filename> filesystem: +<screen> +<prompt>$</prompt> <userinput>echo 134217728 &gt;/proc/sys/kernel/shmmax</userinput> +<prompt>$</prompt> <userinput>echo 2097152 &gt;/proc/sys/kernel/shmall</userinput> +</screen> </para> </listitem> </varlistentry>

view thread (6+ messages)  latest in thread

Message-ID: <4203E428.10302@coretech.co.nz>
Permalink:  ../4203E428.10302@coretech.co.nz/
Also on:    postgresql.org/message-id/4203E428.10302@coretech.co.nz

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: markir@coretech.co.nz, tgl@sss.pgh.pa.us
  Subject: Re: Instructions for Linux ipc config
  In-Reply-To: <4203E428.10302@coretech.co.nz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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