From owner-freebsd-performance@FreeBSD.ORG Mon Jul 21 12:45:21 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 5ED3037B401 for ; Mon, 21 Jul 2003 12:45:21 -0700 (PDT) Received: from flake.decibel.org (flake.decibel.org [66.143.173.58]) by mx1.FreeBSD.org (Postfix) with SMTP id 14F0F43F93 for ; Mon, 21 Jul 2003 12:45:20 -0700 (PDT) (envelope-from decibel@decibel.org) Received: (qmail 78470 invoked by uid 1001); 21 Jul 2003 19:45:19 -0000 Date: Mon, 21 Jul 2003 14:45:19 -0500 From: "Jim C. Nasby" To: Sean Chittenden Message-ID: <20030721194519.GE55392@nasby.net> References: <20030721043501.F14379-100000@walter> <20030721192645.GB61464@perrin.int.nxad.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030721192645.GB61464@perrin.int.nxad.com> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.8-RELEASE i386 X-Distributed: Join the Effort! http://www.distributed.net cc: freebsd-database@freebsd.org cc: freebsd-performance@freebsd.org cc: Jason Stone 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: Mon, 21 Jul 2003 19:45:21 -0000 On Mon, Jul 21, 2003 at 12:26:45PM -0700, Sean Chittenden wrote: > > > Softupdates on, async off. Softupdates is just a better async. > > > > postgresql fsync's all its files before returning from a commit in > > order to ensure durability, right? Does softupdates interfere with > > the functioning of sync(2)/fsync(2)? > > It can, yes, but that's the risk of soft updates. From tuning(7): > > Softupdates drastically improves meta-data performance, mainly > file creation and deletion. We recommend enabling softupdates on > most file systems; however, there are two limitations to > softupdates that you should be aware of when determining whether > to use it on a file system. First, softupdates guarantees file > system consistency in the case of a crash but could very easily > be several seconds (even a minute!) behind on pending write to > the physical disk. If you crash you may lose more work than > otherwise. Secondly, softupdates delays the freeing of file > system blocks. If you have a file system (such as the root file > system) which is close to full, doing a major update of it, > e.g. ``make installworld'', can run it out of space and cause the > update to fail. For this reason, softupdates will not be enabled > on the root file system during a typical install. So are you saying that softupdates on whatever partition contains the database transaction logs is dangerous? Luckily, the metadata for these files is changed very infrequently (normally), so this shouldn't prove to be much of a performance impact. -- Jim C. Nasby, Database Consultant jim@nasby.net Member: Triangle Fraternity, Sports Car Club of America Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"