tytso at mit.edu
Thu Oct 27 04:29:06 UTC 2016
On Wed, Oct 26, 2016 at 11:46:50AM +0200, Paul Slootman wrote:
> Most filesystems on modern linux systems should be mounted with the
> relatime option.
This is the default...
> You can also use noatime as a mount option, but then be sure that no
> application uses the atimes of files; e.g. something like mutt use the
> atime and mtime to determine whether there is a mail file with unread
With the latest Linux kernels (4.0+), there is also the "lazytime"
mount option. This causes the kernel to avoid writing back inodes
that only have "dirty timestamps", until either (a) some other change
is made to the inode, (b) fsync(), syncfs(), or sync() is called, (c)
an undeleted inode is evicted from memory or the file system is
unounted, (d) 24 hours have gone by, or (e) in the case of ext4, if
some other change is made to an inode in the same inode table block as
an inode with a dirty timestamp (so we need to do the disk I/O
With lazytime, the timestamp is updated in memory, so stat(2) will
always return the correct timestamp, and in normal practice, the
timestamps will be (eventually) updated on disk. However if a
timestsamp gets updated multiple times --- for example, a database
file getting updated with O_DIRECT writes, instead of the mtime field
being written out every 30 seconds, we can defer the timestamp updates
and collapse them into a much smaller set of inode table block writes.
More information about the rsync