Linux – Drawbacks of Mounting Filesystem with Noatime

filesystemslinuxunix

Having every file be updated just when accessing them sounds like a waste.

What's the catch with mounting a file system with the noatime option. What kind of applications/servers relies on the access time?

Best Answer

Consider relatime:

If you have a newish install (~2008), you can use the relatime mount option. This is a good compromise for atime I think. From the kerneltrap discussion about implementing this new option:

"relative atime only updates the atime if the previous atime is older than the mtime or ctime. Like noatime, but useful for applications like mutt that need to know when a file has been read since it was last modified."

This makes it so most of the applications that need atime will still work, but lessens the disk load -- so it is a compromise. This is the default with recent Ubuntu desktop distributions.

Regarding noatime and nodiratime:

If you are going noatime for files, I wonder if there is a reason not to use nodiratime in addition to noatime so you are not updating the access time on directories as well.

The other reason to keep atime enabled which wasn't mentioned is for auditing purposes. But since who accessed it is not kept and only when, it is probably not that useful for an audit trail.

All of these options can be found in 'man mount 8'.