Speeding up your server by disabling ATIME

Disable ATIME for Increased Performance

In Linux, atime is part of the mac times file system meta data. If you have a web-server or database server and are looking for extra performance, disabling the atime flag on your partition on a busy webserver can have some performance improvements.

What is ATIME?

In Linux, atime is an option on a partition that keeps track of when the file was last accessed. Don’t get this confused with last modified. This simply means when the file was last read. On a busy web-server and database server, this can happen 100s of times per second. This creates extra disk i/o overhead that is not necessary for most web servers.

Let’s get to it! Disable ATIME

This tutorial is for your root partition. If you have a /home partition, you might want to also perform the steps for it as well.

First, login to your Linux server as the root account. You’ll want to make a copy of your Grub configuration file:

root# cp /etc/fstab /etc/fstab.bak

Next, you’ll want to edit the fstab file with your favorite editor. I prefer nano:

root# nano /etc/fstab

Look for your root partition, and you’ll see it will have something that typically says “defaults” and maybe some other options like usrquota. Add a comma + noatime right after the defaults options like this;

/dev/mapper/centos-root /  xfs  defaults,usrquota,grpquota,noatime 0 0

Be sure to keep the two zeros at the end!

Save the file (Control-O, Control-X).

Now you can simply reboot and it’s fixed. If you don’t have the luxury of rebooting, you can instantly remount your root partition with the following command.

mount -o remount /

That’s it. You can easily check to see if it’s active with the “mount” command.

 mount | grep noatime

/dev/mapper/centos-root on / type xfs (rw,noatime,attr2,inode64,usrquota,grpquota)

Good luck!

If you are a Falcon Internet customer, create a support ticket and we’ll do this for you.