Have you ever asked yourself, what the difference between the mount option atime and relatime is?
In this short blog post, we tell you the main difference of these options and for what you should use relatime.
With the mount option relatime, the access time (atime) will not be written to the disc during every access. The access time (atime) will only change, if one of these two points occurs:
- the modified time (mtime) or change time status (ctime) of a file is newer than the last access time (atime).
- the access time (atime) is older than a defined interval (1 day by default on a RHEL system).
So the relatime mount option is a nice mix between the options atime and noatime and useful for applications, which need the access time (atime) of a file. With the relatime option, there will not be as much traffic on the disk, if a file is often accessed. For example on a webserver is the mount option relatime a good solution, because here are many read actions, but the atime will only updated once a day (with the 24 hours interval setting).
If you use a solid-state disk (SSD) and have no application which needs the access time, you should use the mount option noatime.
28 Comments