From owner-freebsd-performance@FreeBSD.ORG Mon Jul 21 20:35:44 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 B58CC37B401 for ; Mon, 21 Jul 2003 20:35:44 -0700 (PDT) Received: from dfmm.org (walter.dfmm.org [209.151.233.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id D727643F3F for ; Mon, 21 Jul 2003 20:35:43 -0700 (PDT) (envelope-from jason@shalott.net) Received: (qmail 22353 invoked by uid 1000); 22 Jul 2003 03:35:43 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 22 Jul 2003 03:35:43 -0000 Date: Mon, 21 Jul 2003 20:35:43 -0700 (PDT) From: Jason Stone X-X-Sender: To: , In-Reply-To: <20030721192645.GB61464@perrin.int.nxad.com> Message-ID: <20030721202338.C14379-100000@walter> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 03:35:45 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > > > 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): Yes, I know - tuning(7) warns that writes may be delayed. But (data) writes are always delayed some, and fsync(2) doesn't say anything about a situation where fsync() would return success and the data would not actually be written out to disk. I feel like this is an extremely important point. If softupdates changes the semantics of sync(2)/fsync(2), then it absolutely has to be off for a postgresql server because postgresql counts on fsync in order to make its durability guarantees. Additionally, the manpages for sync/fsync should be updated, as I'm sure there are lots of other consumers of those calls, and, "these calls cause your dirty buffers to be flushed to disk... except if there's a global filesystem flag set, in which case they do absolutely nothing," is a pretty big omission, especially since softupdates is the default these days. -Jason -------------------------------------------------------------------------- Freud himself was a bit of a cold fish, and one cannot avoid the suspicion that he was insufficiently fondled when he was an infant. -- Ashley Montagu -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) Comment: See https://private.idealab.com/public/jason/jason.gpg iD8DBQE/HLEPswXMWWtptckRArsqAKC17wHyGmPKM5PJDbBFZxqZCWmtQQCfWZ5v bKgHPa0QH7afT49aBZ7q8SA= =WhuE -----END PGP SIGNATURE-----