Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jun 2013 14:33:31 -0700
From:      Jeremy Chadwick <jdc@koitsu.org>
To:        Steven Hartland <smh@freebsd.org>
Cc:        fs@freebsd.org
Subject:   Re: Changing the default for ZFS atime to off?
Message-ID:  <20130608213331.GB18201@icarus.home.lan>
In-Reply-To: <16FEF774EE8E4100AD2CAEC65276A49D@multiplay.co.uk>
References:  <16FEF774EE8E4100AD2CAEC65276A49D@multiplay.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 08, 2013 at 07:54:04PM +0100, Steven Hartland wrote:
> One of the first changes we make here when installing machines
> here to changing atime=off on all ZFS pool roots.
> 
> I know there are a few apps which can rely on atime updates
> such as qmail and possibly postfix, but those seem like special
> cases for which admins should enable atime instead of the other
> way round.
> 
> This is going to of particular interest for flash based storage
> which should avoid unnessacary writes to reduce wear, but it will
> also help improve performance in general.
> 
> So what do people think is it worth considering changing the
> default from atime=on to atime=off moving forward?
> 
> If so what about UFS, same change?

I **strongly** oppose this change, for one key reason: the classic
Berkeley UNIX mail spool format (known as "mbox"), which is still
predominantly used on most UNIX systems today.

Mail clients which read mbox files require a combination of atime and
mtime to determine if new mail has arrived within the mailbox.  If
mtime > atime, then there's new mail.  Not all mail clients support
alternate methods of detection (for example mutt has check_mbox_size,
which has had bugs/problems in the past (Google check_mbox_size),
and is fallible in other ways).

Further points:

- FreeBSD comes with sendmail (MTA/MDA), which supports only mbox
  natively
- FreeBSD comes with mail/Mail/mailx (client), which only supports
  only mbox natively
- FreeBSD comes with biff/comsat, as well as from(1), which supports
  only mbox natively

FACT: We have no idea how prevalent these programs/features are used
throughout people's systems.  Any responses on freebsd-fs@ will be the
minority -- anyone familiar with FreeBSD knows that only when you
change (break) something do people start crawling out of the woodwork
(the recent fxp(4) situation on 8.4-RELEASE is proof).

What this means is that "by default" we have to assume that people are
reliant upon this type of functionality, and that by disabling it by
default (on any filesystem type) we will cause a very serious problem.
(Imagine telling your boss "the reason I didn't respond to your Email
promptly is because the FreeBSD people disabled atime by default and
thus new mail detection in my mail client stopped working").

Please read my blog post, circa 2009, for further details:

http://koitsu.wordpress.com/2009/10/29/unix-mail-format-annoyances/

Note: switching to Maildir is not an option, as I explain in my blog
(ZFS does not generally perform well with thousands of small files
in a single directory, or if multiple mailboxes, thousands of files
per multiple directories), and none of the above utilities that come
with FreeBSD support anything but mbox.

TL;DR -- Do not disable atime by default, you will anger many people.
Yes, their existing filesystems will still have atime=on, but the
instant the administrator builds a new box or upgrades + builds a new
filesystem......

-- 
| Jeremy Chadwick                                   jdc@koitsu.org |
| UNIX Systems Administrator                http://jdc.koitsu.org/ |
| Making life hard for others since 1977.             PGP 4BD6C0CB |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130608213331.GB18201>