Speed up disk I/O with relatime option
Sep 21
Most distros are now using ext4, which is great. We know that ext4 performs better than ext3. Did you know that you can make your system perform even better with a thirty second file modification?
The “relatime” option controls how ext4 records last access time information for files. By default, ext4 will modify a timestamp on a file everytime it is accessed. This may not seem like a significant performance killer, but trust me, it is. Adding relatime stops this from occurring, boosting your performance.
Your /etc/fstab file will looking something like this:
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#
/dev/sda3 / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /boot ext3 defaults 0 2
# /home was on /dev/sda4 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /home ext4 defaults 0 2
# swap was on /dev/sda2 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx none swap sw 0 0
# ramdisk
tmpfs /tmp/ramdisk tmpfs rw,size=2G 0 0
We want to add the “relatime” option to your “/” partition. Also, your “/home” partition, if you have a separate “/home”. When done, your /etc/fstab will look more like this:
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#
/dev/sda3 / ext4 relatime,errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /boot ext3 defaults 0 2
# /home was on /dev/sda4 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /home ext4 relatime,defaults 0 2
# swap was on /dev/sda2 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx none swap sw 0 0
# ramdisk
tmpfs /tmp/ramdisk tmpfs rw,size=2G 0 0
Now, most would say to reboot your computer to have the change take effect. Not necessary. Simply run:
sudo mount -o remount /
sudo mount -o remount /home (if you have a separate /home)
Enjoy your speedier installation.

