Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 7B6F898FC83 for ; Tue, 8 May 2012 05:34:58 -0300 (ADT) Received: from mout6.freenet.de ([2001:748:100:40::2:8]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SRfsl-000659-5X for pgsql-admin@postgresql.org; Tue, 08 May 2012 08:34:57 +0000 Received: from [195.4.92.140] (helo=mjail0.freenet.de) by mout6.freenet.de with esmtpa (ID jan.lentfer@freenet.de) (port 25) (Exim 4.76 #1) id 1SRfsW-0000fc-Ge for pgsql-admin@postgresql.org; Tue, 08 May 2012 10:34:40 +0200 Received: from localhost ([::1]:55526 helo=mjail0.freenet.de) by mjail0.freenet.de with esmtpa (ID jan.lentfer@freenet.de) (Exim 4.76 #1) id 1SRfsW-0000i6-Cm for pgsql-admin@postgresql.org; Tue, 08 May 2012 10:34:40 +0200 Received: from [195.4.92.21] (port=53949 helo=11.mx.freenet.de) by mjail0.freenet.de with esmtpa (ID jan.lentfer@freenet.de) (Exim 4.76 #1) id 1SRfpi-0007T4-Pv for pgsql-admin@postgresql.org; Tue, 08 May 2012 10:31:46 +0200 Received: from p579b7d88.dip.t-dialin.net ([87.155.125.136]:61220 helo=epia.lan.net) by 11.mx.freenet.de with esmtpa (ID jan.lentfer@freenet.de) (port 25) (Exim 4.76 #1) id 1SRfpi-0001k7-9u for pgsql-admin@postgresql.org; Tue, 08 May 2012 10:31:46 +0200 Received: from localhost (localhost [127.0.0.1]) by epia.lan.net (Postfix) with ESMTP id 6725029443235 for ; Tue, 8 May 2012 10:31:45 +0200 (CEST) X-Virus-Scanned: amavisd-new at lan.net Received: from epia.lan.net ([127.0.0.1]) by localhost (epia.lan.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lez+lx4JgWT3 for ; Tue, 8 May 2012 10:31:27 +0200 (CEST) Received: from neslonek.homeunix.org (localhost [127.0.0.1]) by epia.lan.net (Postfix) with ESMTP id 9A404294430AE for ; Tue, 8 May 2012 10:31:25 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 08 May 2012 10:31:25 +0200 From: Jan Lentfer To: Subject: Re: Advice/guideline on increasing =?UTF-8?Q?shared=5Fbuf?= =?UTF-8?Q?fers=20and=20kernel=20parameters?= In-Reply-To: <00da01cd2ce7$35d17780$a1746680$@com> References: <00da01cd2ce7$35d17780$a1746680$@com> Message-ID: X-Sender: Jan.Lentfer@web.de User-Agent: RoundCube Webmail/0.5.3 X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201205/35 X-Sequence-Number: 39524 Hi Gnanam, On Tue, 8 May 2012 12:22:58 +0530, Gnanakumar wrote: > Our Production server has got 35 GB physical RAM size. Since the > server > has lots of RAM, we want to really make use of it. We've already > configured > "max_connections" to 1000 and "shared_buffers" to 1536 MB, but when > we tried > to increase only "shared_buffers" to 3072MB (keeping > "max_connections" as it > is), PostgreSQL failed to start with the following error: > > EDTFATAL: could not create shared memory segment: Invalid argument > EDTDETAIL: Failed system call was shmget(key=5432001, > size=3307192320, 03600). > > Keeping max connection property to 1000, how do I "best" tune/set up > its > memory related parameters (including Linux Kernel parameters -- > SHMMAX and > SHMALL)? did you read http://www.postgresql.org/docs/8.2/static/kernel-resources.html ? If it is a dedicated DB server the rule of thumb usually is to use 25% RAM for shared buffers, but no more than 8GB unless proper benchmarking has shown a benefit using above 8GB. But I am not sure if 8GB of shared buffers is suitable for 8.2 at all. 8.2 is EOL btw. Also set effective cache size to 50% RAM. Depending on your work load you might tune work_mem, maintenance_work_mem etc. Also, do you really NEED 1000 concurrent sessions? IF you really do, it might be worse to look into a connection pooler. Here is a quite nice guide: http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server hth Jan -- professional: http://www.oscar-consult.de private: http://neslonek.homeunix.org/drupal/