Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 977836332ED for ; Fri, 9 Jul 2010 11:23:39 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 12674-06 for ; Fri, 9 Jul 2010 14:23:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 6EC92632EDD for ; Fri, 9 Jul 2010 11:23:28 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Fri, 09 Jul 2010 09:23:24 -0500 Message-Id: <4C36EA8602000025000332EB@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Fri, 09 Jul 2010 09:23:18 -0500 From: "Kevin Grittner" To: , Subject: Re: Postgresql shared_buffer and SHMMAX configuration References: <01e201cb1f5a$2e3f01f0$8abd05d0$@com> In-Reply-To: <01e201cb1f5a$2e3f01f0$8abd05d0$@com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/24 X-Sequence-Number: 35043 "Gnanakumar" wrote: > max_connection > From - 500 > To - 500 > > PGPOOL configuration > --------------------- > num_init_children > From - 150 > To - 420 > child_max_connections > From - 20 > To - 30 > We have more than 300 Users accessing our server concurrently so > we need around 300 concurrent connections. Not to the database itself, you don't; and it's probably killing performance for you to try to do that. You should use your connection pooler to funnel that many client-side connections down to a much smaller number of database connections. Your pgpool configuration doesn't seem to be doing that. > Recently we upgraded our production server RAM from 7.5GB to 15GB > Kernal.SHMMAX > From - 2147483648 > To - 19818063053 > 1) Is my tuning of PostgreSQL parameters to 15 GB RAM > configuration correct? No. For starters, you should not be configuring a shared memory maximum of over 18GB for your 15GB machine. More like (assuming your "given" settings): (250 kB) + (2304 MB * 1.025) + (14.2 kB * 500) = 2.48384348 * 10^9 bytes plus whatever shared memory you need for other processes and a little "slush". I might just go to something in the 4GB range, unless I know something else needs a lot. > 2) Will the above configuration improve the performance of the > database overall? I would expect these changes in the pgpool and PostgreSQL settings to actually make things worse, although the extra caching from the additional RAM may counteract that to some degree. Before I could venture a suggestion on what good settings might be, I would need to know more about the database server hardware. How many CPU cores? How many disks in what arrangement? -Kevin