From owner-freebsd-performance@FreeBSD.ORG Tue Jul 22 03:29:47 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 164DD37B401 for ; Tue, 22 Jul 2003 03:29:47 -0700 (PDT) Received: from mailout06.sul.t-online.com (mailout06.sul.t-online.com [194.25.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E26E43F93 for ; Tue, 22 Jul 2003 03:29:45 -0700 (PDT) (envelope-from Alexander@Leidinger.net) Received: from fwd05.aul.t-online.de by mailout06.sul.t-online.com with smtp id 19euOu-000683-07; Tue, 22 Jul 2003 12:29:44 +0200 Received: from Andro-Beta.Leidinger.net (ZefmecZv8e9VReZGzDwXmfpRaMEnWjyBZTdULBJcAWviZ3FkcTpUk7@[217.229.208.90]) by fmrl05.sul.t-online.com with esmtp id 19euOf-1aPJ9k0; Tue, 22 Jul 2003 12:29:29 +0200 Received: from Magelan.Leidinger.net (Magelan [192.168.1.1]) h6MATS9P023996 for ; Tue, 22 Jul 2003 12:29:28 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magelan.Leidinger.net (netchild@localhost [127.0.0.1]) by Magelan.Leidinger.net (8.12.9/8.12.9) with SMTP id h6MATSo7000935 for ; Tue, 22 Jul 2003 12:29:28 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Tue, 22 Jul 2003 12:29:27 +0200 From: Alexander Leidinger To: freebsd-performance@freebsd.org Message-Id: <20030722122927.6ccfe953.Alexander@Leidinger.net> In-Reply-To: <20030721202400.GG55392@nasby.net> References: <20030721043501.F14379-100000@walter> <20030721192645.GB61464@perrin.int.nxad.com> <20030721194519.GE55392@nasby.net> <20030721201645.GD61464@perrin.int.nxad.com> <20030721202400.GG55392@nasby.net> X-Mailer: Sylpheed version 0.9.3claws (GTK+ 1.2.10; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Seen: false X-ID: ZefmecZv8e9VReZGzDwXmfpRaMEnWjyBZTdULBJcAWviZ3FkcTpUk7@t-dialin.net 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: Tue, 22 Jul 2003 10:29:47 -0000 On Mon, 21 Jul 2003 15:24:00 -0500 "Jim C. Nasby" wrote: > Of course the *real* issue is ensuring that no matter what, the WAL hits > the disk before the main table data does, so that you can do proper > recovery (though I'm not as clear on how this works with MVCC). If the > issue is only a matter of delayed writes across the board, I don't see > that it should really matter... it's just as if the plug got pulled a > little earlier. SoftUpdates affects metadata updates. Simplified explanation: if you don't use SU and delete more than one file in a directory, the changed directory information gets written to disk after every deleted file, with SU enabled it just writes the directory information after the last deleted file (actually SU doesn't know what the last file is, so it uses some heuristics, but for this example you can ignore this fact) to disk, every change in between will happen in memory only. The same applies to the metadata of files (access time, modification time, ...). So if you replace a file with SU enabled you may get either the old one or the new one, but no inconsistent state in between (this is possible without SU). Without SU the window of the race condition is smaller, but it's still there. I'm not aware of a statistical measurement of the difference, but I think the probability of "the plug gets pulled in the wrong moment" is the same (Murphy's law applied to this: the probability is "1" ;-) ). Bye, Alexander. -- The best things in life are free, but the expensive ones are still worth a look. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7