Received: from local.iboats.com (local.iboats.com [64.78.130.68]) by postgresql.org (8.11.3/8.11.1) with SMTP id f6BHoKa87238 for ; Wed, 11 Jul 2001 13:50:20 -0400 (EDT) (envelope-from steve@iboats.com) Received: (qmail 27327 invoked from network); 11 Jul 2001 11:50:21 -0600 Received: from weasel.local.iboats.com (HELO weasel) (64.78.130.80) by local.iboats.com with SMTP; 11 Jul 2001 11:50:21 -0600 Message-ID: <000f01c10a31$9d1419a0$50824e40@iboats.com> From: "Steve Wolfe" To: "Pgsql-General \(E-mail\)" References: <5146853DD571D411AC54000102070D611C7F10@MINGBGNTS02> <23761.994870319@sss.pgh.pa.us> Subject: Re: Performance tuning for linux, 1GB RAM, dual CPU? Date: Wed, 11 Jul 2001 11:47:44 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Archive-Number: 200107/399 X-Sequence-Number: 12371 > Christian Bucanac writes: > >> I am going to try 768M (98304) for buffers and 6144 (6144 * 32 = 192M) > >> for sort mem. This way with the DB server serving a max of 32 application > >> servers the kernel and other processes should still have the last 64Mb RAM. > > This is almost certainly a lousy idea. You do *not* want to chew up all > available memory for PG shared buffers; you should leave a good deal of > space for kernel-level disk buffers. I'll second that. The way that I tuned our installation was: 1. Make sure you have enough RAM that the data files are *always* in cache, and that all apps have enough RAM available for them. 2. Increase shared buffers until there was no performance increase, then double it. 3. Increase sort memory until there was no performance increase, then double it. 4. Turn off fsync(). 5. Make sure that #1 still applies. In our system (1.5 gigs), that ended up being 128 megs of shared buffers, and 64 megs for sorting. Some day, I'll probably increase the shared buffers more (just because I can), but currently, Linux doesn't seem to let me set SHMMAX over 128 megs. Some day I'll look into it. : ) steve