From owner-freebsd-performance@FreeBSD.ORG Fri Jul 25 11:25:59 2003 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A835F37B401; Fri, 25 Jul 2003 11:25:59 -0700 (PDT) Received: from svaha.com (svaha.com [64.46.156.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id A95D143F3F; Fri, 25 Jul 2003 11:25:58 -0700 (PDT) (envelope-from meconlen@obfuscated.net) Received: from presa (24161248hfc18.tampabay.rr.com [24.161.248.18]) (AUTH: LOGIN meconlen) by svaha.com with esmtp; Fri, 25 Jul 2003 14:25:57 -0400 From: "Michael E. Conlen" To: "Christopher Weimann" Date: Fri, 25 Jul 2003 14:25:57 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <20030725162601.GA35378@smtp.k12us.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: freebsd-database@freebsd.org cc: freebsd-performance@freebsd.org Subject: RE: Tuning for PostGreSQL Database X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2003 18:26:00 -0000 Usually a database server will have better algorithms to cache information than the OS, as the OS handles the general case, and the server can handle the specific case. In this case, I'd look to the Postgress people to see if they know which is better, but there's also this tidbit found on the page under the first link "There is one way to decide what is best for you. Set a high value of this parameter and run the database for typical usage. Watch usage of shared memory using ipcs or similar tools. A recommended figure would be between 1.2 to 2 times peak shared memory usage. " Give it a run and see. -- Michael Conlen -----Original Message----- I was concerned about the disk cache because of this link http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html#shbuf which says... PostgreSQL counts a lot on the OS to cache data files and hence does not bother with duplicating its file caching effort. The shared buffers parameter assumes that OS is going to cache a lot of files and hence it is generally very low compared with system RAM. Even for a dataset in excess of 20GB, a setting of 128MB may be too much, if you have only 1GB RAM and an aggressive-at-caching OS like Linux. But now that I have looked a bit more I see that this link http://www.postgresql.org/docs/aw_pgsql_book/hw_performance/node6.html which says... Ideally, the POSTGRESQL shared buffer cache will be: * Large enough to hold most commonly-accessed tables * Small enough to avoid swap pagein activity So I have conflicting documentation. I have machine with 4Gig of ram. What is the maximum value of SHMMAX on FreeBSD?