Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Having every file be updated just when accessing them sounds like a waste.

What's the catch with mounting a file system with the noatime option. What kind of applications/servers relies on the access time?

share|improve this question

4 Answers 4

up vote 32 down vote accepted

Consider relatime:

If you have a newish install (~2008), you can use the relatime mount option. This is a good compromise for atime I think. From the kerneltrap discussion about implementing this new option:

"relative atime only updates the atime if the previous atime is older than the mtime or ctime. Like noatime, but useful for applications like mutt that need to know when a file has been read since it was last modified."

This makes it so most of the applications that need atime will still work, but lessens the disk load -- so it is a compromise. This is the default with recent Ubuntu desktop distributions.

Regarding noatime and nodiratime:

If you are going noatime for files, I wonder if there is a reason not to use nodiratime in addition to noatime so you are not updating the access time on directories as well.

The other reason to keep atime enabled which wasn't mentioned is for auditing purposes. But since who accessed it is not kept and only when, it is probably not that useful for an audit trail.

All of these options can be found in 'man mount 8'.

share|improve this answer
1  
+1 relatime has the advantages of noatime and none of the disadvantages. –  David Pashley Jul 29 '09 at 11:49
2  
Reading some more about this, it seems noatime also includes nodiratime (it didn't , many many years ago though) –  nos Jul 29 '09 at 23:59

There are very little there are some applications that rely on this for example Mutt cannot determine if the folder has received new mail since last visited.

Generally I and others think that mounting noatime is a good idea.

share|improve this answer
3  
Even then, it only applies to mbox stores. Some might say that you get what you deserve. –  Dan Carley Jul 29 '09 at 11:06
    
Don't use noatime; use relatime instead. See Kyle's answer. –  David Pashley Jul 29 '09 at 11:50
    
Note that relatime is a relatively new addition to the options. If you have an older kernel (i.e. if you still have any Debian/Sarge based machines running) you might not have it. –  David Spillett Jul 29 '09 at 12:43

There exist applications that will move files off to a secondary storage if they haven't been accessed for a certain time period. Obviously, they need the atime.

Other than that, I don't see much use for this (anymore), especially as file managers these days have a tendency to open files to generate previews, therefore modifiying the atime just while browsing a directory.

I always mount with noatime these days.

share|improve this answer

the main disadvantage that hasn't been mentioned yet is that if you have a tmpreaper process (i.e. a program that deletes files in /tmp that haven't been accessed for a while), it could delete tmp files that are still in use.

relatime is a better option than noatime. it only updates atime if the file has been modified since the last atime update. this has obvious benefits for mail clients. it still doesn't fix the tmpreaper issue (a file may be read from /tmp for ages without being written to).

overall, the disadvantages are minor (non-existant except for a few special cases), and the performance benefit is significant.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.