From owner-freebsd-stable@FreeBSD.ORG Wed May 24 06:34:52 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A346F16A422 for ; Wed, 24 May 2006 06:34:52 +0000 (UTC) (envelope-from kometen@gmail.com) Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2987243D46 for ; Wed, 24 May 2006 06:34:52 +0000 (GMT) (envelope-from kometen@gmail.com) Received: by wx-out-0102.google.com with SMTP id i31so1201393wxd for ; Tue, 23 May 2006 23:34:51 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EPGBLCIkPuoOD5ZaqqSGku+oHLv/lwATQW50RqZoaoR48FS1tETWzC1pgBI8ympzoAyoaHaj7MnpHt3DrIhijA1gqCNQ/STJHDlrFdISKAkT5hjPYL6Y7+nT8ZTX8MigzU/soeTqaVCdCDOqPhRmlJMIu3fHExxv+/rSMagSzNA= Received: by 10.70.21.18 with SMTP id 18mr7346085wxu; Tue, 23 May 2006 23:34:51 -0700 (PDT) Received: by 10.70.22.2 with HTTP; Tue, 23 May 2006 23:34:51 -0700 (PDT) Message-ID: Date: Wed, 24 May 2006 08:34:51 +0200 From: "Claus Guttesen" To: "Mark Kirkwood" In-Reply-To: <4473ADF7.4080101@paradise.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200605231531.18092.kirk@strauser.com> <200605231713.22363.jkim@FreeBSD.org> <200605231719.56164.jkim@FreeBSD.org> <200605231636.27463.kirk@strauser.com> <4473ADF7.4080101@paradise.net.nz> Cc: freebsd-stable@freebsd.org Subject: Re: PostgreSQL uses more memory on 6.1? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2006 06:34:52 -0000 > > That did it! Bumping kern.ipc.shmall to 65536 got me back up and runni= ng > > with enough shared_memory to get my jobs done. > > Having not so long ago been caught by this myself, I think the > relationship between shmmax and shmall is worth clarifying: > > $ sysctl -d kern.ipc.shmall > kern.ipc.shmall: Maximum number of pages available for shared memory > $ sysctl -d kern.ipc.shmmax > kern.ipc.shmmax: Maximum shared memory segment size > > So to run 1 Postgres installation with 128Mb of shared memory: > > kern.ipc.shmall=3D32768 > kern.ipc.shmmax=3D134217728 > > However suppose you want to run 2 Postgres installations, each using > 128Mb of shared memory: > > kern.ipc.shmall=3D65536 > kern.ipc.shmmax=3D134217728 > > i.e. maximum system wide shared memory is 65536*4096 =3D 256Mb, but the > maximum size any single segment can be is 128Mb. Thank you. I wasn't aware that one could alter sysctl's. I might dive into that, makes kernel-maintenance a tiny bit easier. regards Claus