Skip site navigation (1) Skip section navigation (2)

Re: Instructions for Linux ipc config

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Mark Kirkwood <markir(at)coretech(dot)co(dot)nz>
Cc: pgsql-docs(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Instructions for Linux ipc config
Date: 2005-02-15 04:16:57
Message-ID: 200502150416.j1F4Gvd17858@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-docs
Your patch has been added to the PostgreSQL unapplied patches list at:

	http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------


Mark Kirkwood wrote:
> 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.
> > 
> 
> 

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

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-docs by date

Next:From: Bruce MomjianDate: 2005-02-15 04:36:12
Subject: Re: faq 4.20: pl/pgsql temporary tables create/drop
Previous:From: Michael FuhrDate: 2005-02-15 02:20:20
Subject: Bibliography updates for new editions?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group