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 580858BA298 for ; Tue, 15 Feb 2005 04:17:09 +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 35656-02 for ; Tue, 15 Feb 2005 04:17:03 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [64.139.89.126]) by svr1.postgresql.org (Postfix) with ESMTP id DF1608BA2B6 for ; Tue, 15 Feb 2005 04:17:02 +0000 (GMT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id j1F4Gvd17858; Mon, 14 Feb 2005 23:16:57 -0500 (EST) From: Bruce Momjian Message-Id: <200502150416.j1F4Gvd17858@candle.pha.pa.us> Subject: Re: Instructions for Linux ipc config In-Reply-To: <4203E428.10302@coretech.co.nz> To: Mark Kirkwood Date: Mon, 14 Feb 2005 23:16:57 -0500 (EST) Cc: pgsql-docs@postgresql.org, Tom Lane X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.202 tagged_above=0 required=5 tests=AWL, SEE_FOR_YOURSELF X-Spam-Level: X-Archive-Number: 200502/40 X-Sequence-Number: 2873 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 @@ > LinuxIPC configuration > > > - The default shared memory limit (both > - SHMMAX and SHMALL) is 32 > - MB in 2.2 kernels, but it can be changed in the > - proc 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 > + sysctl interface. For example, to allow 128 MB, > + and explicitly set the maximum total shared memory size to 2097152 > + pages (the default): > > -$ echo 134217728 >/proc/sys/kernel/shmall > -$ echo 134217728 >/proc/sys/kernel/shmmax > +$ systcl -w kernel.shmmax=134217728 > +$ systcl -w kernel.shmall=2097152 > > - You could put these commands into a script run at boot-time. > - > - > - > - Alternatively, you can use sysctl, if > - available, to control these parameters. Look for a file > - called /etc/sysctl.conf and add lines > - like the following to it: > - > -kernel.shmall = 134217728 > -kernel.shmmax = 134217728 > - > - This file is usually processed at boot time, but > - sysctl can also be called > - explicitly later. > + In addition these settings can be saved between reboots in > + /etc/sysctl.conf. > > > > - Other parameters are sufficiently sized for any application. If > - you want to see for yourself look in > - /usr/src/linux/include/asm-xxx/shmparam.h > - and /usr/src/linux/include/linux/sem.h. > + Older distributions may not have the sysctl program, > + but equivalent changes can be made by manipulating the > + /proc filesystem: > + > +$ echo 134217728 >/proc/sys/kernel/shmmax > +$ echo 2097152 >/proc/sys/kernel/shmall > + > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073