Difference between revisions of "HowTo Disable The "relatime" Method For File "atime" Updates"

From NST Wiki
Jump to navigationJump to search
('''atime''')
('''atime''')
Line 3: Line 3:
 
=='''atime'''==
 
=='''atime'''==
  
The "'''Access time'''" field of a file within a given file system is know as: "'''atime'''". When a process reads a file, the "'''atime'''" field is updated. Disabling atime updates, with the 'noatime' mount flag, is probably the most used performance tweak that Linux administrators use: An active server is continually reading files, generating lots of atime updates, which translate to metadata updates that the filesystem must write to disk. And writing those updates can seriously damage your performance. Believe it or not, a busy server like kernel.org (vsftpd + apache workload) cut their load average in half just by mounting their filesystems with 'noatime'.
+
The "'''Access time'''" field for a file within a given file system is know as: "'''atime'''". When a process reads a file, the "'''atime'''" field is updated. Disabling atime updates, with the 'noatime' mount flag, is probably the most used performance tweak that Linux administrators use: An active server is continually reading files, generating lots of atime updates, which translate to metadata updates that the filesystem must write to disk. And writing those updates can seriously damage your performance. Believe it or not, a busy server like kernel.org (vsftpd + apache workload) cut their load average in half just by mounting their filesystems with 'noatime'.
  
 
=='''relatime'''==
 
=='''relatime'''==
 
Relative atime ('relatime') only updates the atime if the previous atime is older than the mtime or ctime. It avoids a lot of metadata atime updates (but not all of them, obviously, there's 'noatime' for that). It's like noatime, but useful for applications like mutt that need to know when a file has been read since it was last modified.
 
Relative atime ('relatime') only updates the atime if the previous atime is older than the mtime or ctime. It avoids a lot of metadata atime updates (but not all of them, obviously, there's 'noatime' for that). It's like noatime, but useful for applications like mutt that need to know when a file has been read since it was last modified.

Revision as of 17:14, 4 August 2008

Overview

atime

The "Access time" field for a file within a given file system is know as: "atime". When a process reads a file, the "atime" field is updated. Disabling atime updates, with the 'noatime' mount flag, is probably the most used performance tweak that Linux administrators use: An active server is continually reading files, generating lots of atime updates, which translate to metadata updates that the filesystem must write to disk. And writing those updates can seriously damage your performance. Believe it or not, a busy server like kernel.org (vsftpd + apache workload) cut their load average in half just by mounting their filesystems with 'noatime'.

relatime

Relative atime ('relatime') only updates the atime if the previous atime is older than the mtime or ctime. It avoids a lot of metadata atime updates (but not all of them, obviously, there's 'noatime' for that). It's like noatime, but useful for applications like mutt that need to know when a file has been read since it was last modified.