Disable Atime for a Faster Running Linux OS

Article by George Norman (Cybersecurity Editor)

on 05 Nov 2008

It seems that if you go ahead and disable atime and diratime you can improve the performance of your disk by about 40%, which is quite considerable if you think about it. The simple truth of the matter is that the number of programs that use this option is quite small so it makes sense to disable it and thus end up with a faster running Linux-based operating system.

Here is how atime works: for every instance that the operating system accesses a file, atime logs the time when that file was last accessed (writes this info onto the Linux ext3 partition). As you can imagine, all this writing takes its toll in terms of performance, which is a drag (no pun intended) considering that only mail-monitoring and defragmenting applications use atime to function properly.

Before we get into the step by step instructions of how to disable atime, let’s take a look at the advantages and disadvantages linked to this course of action. The advantages are that you will get a better performing hard drive and consequently a speedier OS. Another thing that I consider to be an advantage is the fact that the whole process is reversible – if you don’t like the outcome, you can always switch back. The only disadvantage is that some apps will not work properly – tmpwatch, mutt, or mail-notify to name some examples.

Here are the step by step instructions that you need to follow and disable atime:

1. Start a terminal.

2. Use the “su-” command and switch to root. The su- command will grant you super-user permissions. If that doesn’t work then try “sudo –I” (it varies from system to system).

3. Use “cp /etc/fstab /etc/fstab.old” to backup the fstab. For Ubuntu users the command is “cp /etc/fstab /etc/fstab.original”.

4. Proceed to opening /etc/fstab. You will first need to pick an editor, like gedit for example. You could also use nano or kate. To open your /etc/fstab in these editors you need to use the following commands: for gedit “gedit /etc/fstab”, for nano “nano /etc/fstab” and for kate “kate /etc/fstab”.

5. Identify the file systems that need optimizing and the partitions containing your / and /home file systems. You need to find the partition that has the main system on it, and most of the times it is identified with “ext3” as opposed to swap partitions that have “ntfs” or “swap”. Additional examples: /dev/hda3 or /dev/sda3.

6. Locate the fstab options section (it should be in the 4th section, which is to say at the end of the line, before the final two numbers) and insert “,noatime,nodiratime”. Do this for every partition that needs optimizing; insert the specified command after the already in place options of the partition.

7. Save fstab.

8. Reboot and enjoy.

If at any time you want to switch back, do so by using the fstab back-up.


Latest News


Sony's 'Attack of the Blockbusters Sale' Slashes Prices in Half for a Ton of PS4 Games

17 Aug 2017

How Samsung's New T5 Compares to the Old T3 Portable SSD (Infographic)

17 Aug 2017

See all