Date: Tue, 22 Jul 2003 23:14:05 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Simon J Mudd <sjmudd@pobox.com> Cc: freebsd-performance@freebsd.org Subject: Re: Tuning for PostGreSQL Database Message-ID: <3F1E27AD.F7405D10@mindspring.com> References: <Pine.BSF.4.05.10307191344080.16986-100000@misery.sdf.com> <20030721192643.GD55392@nasby.net> <86znj6l9mm.fsf@unicorn.wl0.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F1E27AD.F7405D10>