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 for a file within a given file system is know as: "'''atime'''". When a process reads a file, the "'''atime'''" field is updated with the current date/time for this access. <i>Disabling</i> "'''atime'''" updates using the "'''noatime'''" mount flag is probably one of the biggest performance tweak that a '''Linux''' administrator can make. An active '''Linux''' server is continually reading files which generates lots of atime updates. This translates to metadata updates to the file system and writes to disk which can lead to poor I/O performance.
+
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 with the current date/time for this access. <i>Disabling</i> "'''atime'''" updates using the "'''noatime'''" mount flag is probably one of the biggest performance tweak that a '''Linux''' administrator can make. An active '''Linux''' server is continually reading files which generates a significant number of "'''atime'''" updates. This translates to <i>numerous</i> metadata updates made to the file system by writes to the physical disk which can lead to poor I/O performance.
  
 
=='''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:33, 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 with the current date/time for this access. Disabling "atime" updates using the "noatime" mount flag is probably one of the biggest performance tweak that a Linux administrator can make. An active Linux server is continually reading files which generates a significant number of "atime" updates. This translates to numerous metadata updates made to the file system by writes to the physical disk which can lead to poor I/O performance.

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.