Comments on Reducing Disk IO By Mounting Partitions With noatime

Reducing Disk IO By Mounting Partitions With noatime Linux has a special mount option for file systems called noatime. If this option is set for a file system in /etc/fstab, then reading accesses will no longer cause the atime information (last access time - don't mix this up with the last modified time - if a file is changed, the modification date will still be set) that is associated with a file to be updated (in reverse this means that if noatime is not set, each read access will also result in a write operation). Therefore, using noatime can lead to significant performance gains.

10 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Stefan Adelbert

Would "noatime" have any (positive) effect on mounted smbfs (Windows) shares? Or does this apply only to ext2/3 partitions?

By:

Hi there,

That sounds excellent, especially for people who dish out solutions on worn out hardware (for windows).

Simply putting a swap space on the another physical hard disk  does wonders especially if u have dual/multiple controllers (SCSI/SATA) etc..

I can safely say off the top of my head that performance gains are around 40% at times. (although this figure hasn´t been benchmarked thru standard benchmarkers)

I wonder if u have any experiences testing this in busy environment.

 -

Oz

 

 

By: Christopher Thomas

I know it sounds obvious, of course it does, not setting the atime of each file accessed or touched by a program sounds like a certain speedup for somethings.

 but the problem is, how much of an improvement is there?

 stats please! I'd like to see your reasoning about this further than "of course it would work" cause I am sure there are lots of things which "look" like they would improve performance but in real practice dont do any actual difference.

 Just look at STL containers like <vector> lots of people think that using them are slow, they say that "of course plain old arrays are faster!!!! they dont have all that STL  junk" yet actually, they dont realise that in reality, it's not faster at all and it's actually more bug prone and the same speed (if you have a good compiler).

 So! with that said: stats please! lets see your proof.

By: Krugger

The relatime option just updates times if access time is newer, it is similar to noatime and does not break some applications which need know last read time of a particular file (mutt for example).

By: Adam Ashenfelter

I'm guessing this will also result in better battery life on a laptop as well.

It would be nice if some kind of atime cache was implemented so file accesses wouldn't cause disk IO.  ATime infomation could then be written at long intervals, and at unmount time.

This kerneltrap.org conversation has a similar suggestion.

http://kerneltrap.org/node/14148

By: Wiggum

This is in fact an old discussion which is already covered extensively.

One good reference concerning notaime (back in the year 2000!) was:

http://en.tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/chap6sec73.html

In the more recent days (2007), there was also a discussion available through Kerneltrap:

http://kerneltrap.org/node/14148

In any case, one could consider using the relatime flag by default to optimse disk IO performance not breaking application functionality.

Wiggum.

By: thehand

Famous kernel developer Ingo Molnar said the following:

Atime updates are by far the biggest IO performance deficiency that Linux has today.  Getting rid of atime updates would give us more everyday Linux performance than all the pagecache speedups of the past 10 years, _combined_.

http://blogs.koolwal.net/2009/01/30/installing-linux-on-usb-part-4-noatime-and-relatime-mount-options/

And here's some of what the L man said about it:

http://lkml.org/lkml/2007/8/4/73

http://lkml.org/lkml/2007/8/10/200

Noatime is good, but remember that you will not be able to know when something was last accessed, so consider your needs carefully. Many people can do without atime, though you must be careful, as some things like backups, the popularity contest, and other things rely on it.

Be well informed!

By: Kumar Ullal

 some people say that this can causes some program to break:

Unfortunately, turning off atime unconditionally will occasionally break software. Some mail tools will compare modification and access times to determine whether there is unread mail or not. The tmpwatch utility and some backup tools also use atime and can misbehave if atime is not correct. For this reason, distributors tend not to make noatime the default on installed systems.

Also Debian’s popularity contest program (popcon) make use of last access time. So it might report bad data to Debian servers.

 Here is the link

http://linux.koolsolutions.com/2009/01/30/installing-linux-on-usb-part-4-noatime-and-relatime-mount-options/ 

 

By: Damon H

Excellent post. It worked perfectly. Thank you!

By: Person

lookup relatime ... you might want to use that instead of noatime...