linux poison RSS
linux poison Email

Improving filesystem read performance using "noatime"

Linux records information about when files was last accessed. There is a cost associated with recording the last access time. The ext3 file system of Linux has an attribute that allows the super-user to mark individual filesystem to ignore recording of last access time. This may lead to significant performance improvements on often accessed frequently changing files such as the contents of the web server directory.

The only drawback is that none of the file's atime (access time) will be updated.

Linux has a special mount option for file systems called "noatime" that can be added to each line that addresses one file system in the /etc/fstab file. If a file system has been mounted with this option, reading accesses to the file system will no longer result in an update to the atime (access time) information associated with the file.

The importance of the noatime setting is that it eliminates the need by the system to make writes to the file system for files which are simply being read. Since writes can be somewhat expensive, this can result in measurable performance gains.

Note that the write time information to a file will continue to be updated anytime the file is written to.

Edit the fstab file vi /etc/fstab and add in the line that you are interested in adding the "noatime" option show below:

/dev/sda1          /var/www          ext3          defaults,noatime          1  2


1 comments:

Post a Comment

Related Posts with Thumbnails