From owner-freebsd-performance@FreeBSD.ORG Tue Jul 22 23:15:14 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 9483337B401 for ; Tue, 22 Jul 2003 23:15:14 -0700 (PDT) Received: from bluejay.mail.pas.earthlink.net (bluejay.mail.pas.earthlink.net [207.217.120.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5618F43F93 for ; Tue, 22 Jul 2003 23:15:13 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfkao.dialup.mindspring.com ([165.247.209.88] helo=mindspring.com) by bluejay.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19fCu7-0001Jp-00; Tue, 22 Jul 2003 23:15:12 -0700 Message-ID: <3F1E27AD.F7405D10@mindspring.com> Date: Tue, 22 Jul 2003 23:14:05 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Simon J Mudd References: <20030721192643.GD55392@nasby.net> <86znj6l9mm.fsf@unicorn.wl0.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a472385ceb6388863a831eab35a3a09d88350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c 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: Wed, 23 Jul 2003 06:15:14 -0000 Simon J Mudd wrote: > Someone else mentioned Qmail. I use Postfix and I know the author > relies on fsync semantics before confirming the acceptance of email. > I'm sure Qmail (and sendmail, ...) does the same. They should do - > the RFC requires this (that mail can't be lost once it is accepted for > delivery). It's OK t fsync() the data file before sending back the "250 OK"; RFC 821 (and now 2821) require this behavior: the data much be committed to stable storage before the "250 OK" response is sent (unless you are HotMail, of course ;^)). The problem with qmail is that it assumes that it needs to sync the directory because it thinks the underlying FS implemention violates the POSIX standard with regard to "SHALL be updated" instead of "SHALL be marked for update" semantics on directory metadata. So qmail does an extra fsync() on something that doesn't need to be fsync()'ed. This makes qmail unnecessarily slow, in order to make it safe for people to run nominally POSIX code on non-POSIX compliant systems. For POSIX systems, qmail should turn this behaviour off. Unfortunately, there are a number of systems which define POSIX manifest constants, thus lying about whether or not they are really POSIX compliant systems. -- Terry