Is it worth to tune Ext4 with noatime?

With previous versions of Ubuntu (using Ext3 filesystem) I used to tune it for better performance with noticeable results by setting the noatime parameter in /etc/fstab.

Is it still worth it to do that with the Ext4 filesystem, which is now default in Ubuntu? If so, does the procedure changed in some way?

An example of this tuning can be found here.


On Ubuntu 10.04, relatime is part of the default mount options, unless overridden in /etc/fstab. The previous few releases had relatime explicitly in /etc/fstab. relatime gives the same speed (and flash write cycle conservation) benefits as noatime, without causing trouble to old-fashioned mail notifiers.

The article you cite recommends data=writeback. Ubuntu defaults to data=ordered. Ubuntu's setting is slower in case of heavy disk load, but carries significantly less risk of data loss in case of a crash or power failure. So I would not recommend changing from the Ubuntu default.

Changing commit=5 to commit=100 increases the time window during which data will be lost in case of a crash, for little benefit in most circumstances.

Summary: leave the settings as they are, they were chosen for a reason.


ADDED: There are other things beyond mount options than can make a difference. Switching from ext3 to ext4 is itself often a visible improvement. Here are a few more tips for laptop users.

  • If you have a slow SSD, check out this thread at SU. The important tips are to use tmpfs for /tmp and for the browser cache (and perhaps history).

  • If you have a hard disk and you want it to stop spinning for extended lengths of time, then install noflushd, which allows the disk to spin down by delaying all writes until the RAM is full. (Of course, reads can cause the disk to spin up; you'll want to get into the habit of running cat /files/I/m/likely/to/need >/dev/null before the disk spins down.) In order for noflushd to be effective, turn off all swap and mount your filesystems with something like commit=3600.

    Using noflushd effectively means that your data can remain unwritten to disk for an extended length of time. This is a risk, to be weighed against the benefit of not having any noise or heat coming from the disk for a while. Don't use noflushd if you're not comfortable with that risk.


Yes, it still may make sense to use noatime as of Ubuntu 12.10

relatime is a default mount option. And relatime is much better than atime. The former requires a write for the first read after a write, the latter requires a write for every read. But with noatime each read is free of a write.

This basically means that the number of writes to a disk for relatime mount is close to double relative to a noatime mount other thing being equal. It is a serious concern for partitions on flash memory devices.

The detailed discussion by linux kernel community is at http://kerneltrap.org/node/14148