The “noatime” attribute
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 7etc/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 information associated with the file like we have explained above. 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. In our example bellow, we will set the noatime option to our “/chroot” file system.
Edit the fstab file (vi /etc/fstab) and add in the line that refer to “/chroot” file system the noatime option after the defaults option as show bellow:
E.I: /dev/sda7 /chroot ext2 defaults,noatime 1 2
You must Reboot your system for the change to take effect: [root@deep /]# reboot
Then test your results with the flowing command:
[root@deep]# cat /proc/mounts
/dev/root / ext2 rw 0 0
/proc /proc proc rw 0 0
/dev/sda1 /boot ext2 rw 0 0
/dev/sda8 /cache ext2 rw 0 0
/dev/sda7 /chroot ext2 rw.noatime 0 0
/dev/sda6 /home ext2 rw 0 0
/dev/sda11 /tmp ext2 rw 0 0
/dev/sda5 /usr ext2 rw 0 0
/dev/sda9 /var ext2 rw 0 0
none /dev/pts devpts rw 0 0
If you see something like: /dev/sda7 /chroot ext2 rw.noatime 0 0, congratulations!
The swap partition
Putting your swap partitions near the beginning of your drive may give you some acceptable improvement. The beginning of the drive is physically located on the outer portion of the cylinder, and the read/write head can cover much more ground per revolution. We typically see partitions placed at the end of the drive work 3MB/s slower using the hdparm -t command.