Reduce Disk Writes With noatime, nodiratime and relatime in Linux

noatime, nodiratime and relatime are disk mount options to disable access time information updates onto every file or directory the system access. By using these options, disk writing activity can be reduce significantly. This is useful for Solid State Drive (SSD) or to encourage Hard Disk Drive (HDD) to spin down and save power.
  • noatime - Disable access time update of files in HDD.
  • nodiratime - Disable access time update of directories in HDD
  • relatime - Update access time relative to modify or change time. Access time is only updated if the previous access time was earlier than the current modify or change time.
Example:
Open /etc/fstab for edit.
sudo gedit /etc/fstab
Append the options to one of the mounted drives.
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/sda / ext4 errors=remount-ro,noatime,nodiratime 0 0


Comments

  1. Why set nodiratime when its implied within the noatime setting?

    ReplyDelete
  2. Hi, i am not sure if nodiratime is implied in noatime. Could you point me to a resource that says that?

    Thanks.

    ReplyDelete
  3. "Does noatime imply nodiratime?" - http://lwn.net/Articles/245002/

    ReplyDelete

Post a Comment

Thank you for visiting Almost a Technocrat. Due to many spam comments, your comment will be moderated.

Popular posts from this blog