How to reduce Disk/partition IO (access time)
Posted by HostsVault | Posted in How-To's | Posted on 10-01-2009-05-2008
1
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.
Using noatime
In this example we will set noatime for the root file system “/”
and add noatime to the options of the / file system, e.g. like this:
none /dev/pts devpts gid=5,mode=620 0 0
/dev/sd0 /boot ext3 defaults 0 0
/dev/sd1 none swap sw 0 0
/dev/sd2 / ext3 defaults,noatime 0 0
You don't have to reboot the system for the changes to take effect (and that's the beauty of Linux), just issue this command to apply the changes:
To check its active:
You should see :
/dev/sd2 on / type ext3 (rw,noatime)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sd0 on /boot type ext3 (rw)
A Quick Note For OpenVZ VMs
OpenVZ containers (virtual machines) don't have an /etc/fstab file because the partitioning is controlled from the host system. To set noatime for a VM, you can run :
on the host system and restart the VM (replace veid with the ID of the container; for example, if the container has the ID 101, run
and restart the container:


Thank you for that. It is very imformative read.
I really like to read http://www.hostsvault.com!