HowTo Disable The "relatime" Method For File "atime" Updates

From MediaWiki
Revision as of 17:09, 4 August 2008 by Rwh (talk | contribs)
Jump to navigationJump to search

Overview

atime

'Atime' is the 'Access time' field of a file: When a process reads a file, its atime 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.