Bug 231129

Summary: The ZFS installer sets atime=off by default
Product: Base System Reporter: Dennis Clarke <dclarke>
Component: binAssignee: freebsd-sysinstall (Nobody) <sysinstall>
Status: Closed Not A Bug    
Severity: Affects Many People CC: allanjude, des, swills
Priority: ---    
Version: 14.0-RELEASE   
Hardware: Any   
OS: Any   

Description Dennis Clarke 2018-09-03 22:12:48 UTC
After initial install and at first boot a quick look at the ZFS filesystems
will reveal that atime was erroneously set 'off'.  There can not be a valid
reason to disable one of the three UNIX file timestamps 'off'.  I would 
question the value of xattr=off also however that isn't as serious as atime.
Comment 1 Allan Jude freebsd_committer freebsd_triage 2018-09-04 03:26:13 UTC
There is infact a good reason to disable atime. ZFS is a CoW (Copy-on-Write) filesystem, so when the atime property is set to on, all snapshots will grow as the atime attribute of each object is modified. This causes what are supposed to be zero-cost snapshots to resume space, and causes read-only workloads to generate amplification as additional metadata must be read for it to be updated to be written out with a modified atime and the checksum of the entire tree of blocks to be updated.

The 'zfs auto' part of the installer sets atime on ZFS to disabled on purpose, for all datasets other than /var/mail.
Comment 2 Dennis Clarke 2018-09-04 17:24:29 UTC
(In reply to Allan Jude from comment #1)
That seems like a very weak argument to disable one of the three key timestamps in the UNIX world. Disk space is cheap and so is CPU whereas end to end data integrity is essential and precious.  I would argue that growing snapshots is exactly correct and they should grow and will grow precisely because that is what snapshots are supposed to do. The disable of "atime" argument may as well be followed by the disable of "ctime" if that were possible.
Comment 3 Dennis Clarke 2018-11-04 03:12:49 UTC
The zfs manpage could perhaps be updated to reflect that the installer
disables this feature by default. Currently we see : 

     atime=on | off
         Controls whether the access time for files is updated when they are
         read.  Turning this property off avoids producing write traffic when
         reading files and can result in significant performance gains, though
         it might confuse mailers and other similar utilities. The default
         value is on.

The default in 11.2 and 12.0beta2 and beta3 is to disable the UNIX atime
feature silently and thus the user will never know.  The manpage should 
reflect this information as the "default value is on" will lead anyone to
think there is a failure in their system after initial install.
Comment 4 Dennis Clarke 2024-01-12 18:10:42 UTC
So long as there is no warning and/or no information given to the user
then this is a bug. However, one may easily make the same argument that
compression may be turned off. The xattr and setuid may be disabled. The
checksum may also be disabled. All of that may be done by the installer
in a silent manner such that thus user is left to figure out what has
happened by themselves. 

                                 Not a bug?

I suggest it is a bug and the atime option exists with good reason.
Comment 5 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2024-01-12 18:18:11 UTC
No, it is not a bug.  It is a deliberate choice.  You may disagree with it, but that does not make it a bug.
Comment 6 Dennis Clarke 2024-01-12 18:56:05 UTC
So long as critical file system data is hidden from the user.... it is a bug.