2.5. Filesystem determinism tips

Journal activity can introduce latency through ordering changes and committing data and metadata. Often, journaling filesystems can do things in such a way that they slow the system down.
The most common filesystem for use on Linux machines is the third extended filesystem, or ext3, which is a journaling filesystem. Its predecessor - ext2 - is a non-journaling filesystem that is almost completely compatible with ext3. Unless your organization specifically requires journaling, consider using ext2. In many of our best benchmark results, we utilize the ext2 filesystem and consider it one of the top initial tuning recommendations.
If using ext2 is not a suitable solution for your system, consider disabling atime under ext3 instead. There are very few real-world situations where atime is neccesary, however it is enabled by default in Red Hat Enterprise Linux for longstanding legacy reasons. By disabling atime journal activity is avoided where it is not neccesary. It can also help with reducing power consumption as the disk is not required to do as many needless writes, giving the disk more opportunities to enter a low-power state.

Disabling atime

  1. Open the /etc/fstab file using your chosen text editor and locate the entry for the root mount point.
    LABEL=/       /       ext3    defaults        1 1
    ...[output truncated]...
  2. Edit the options sections to include the terms noatime and nodiratime. noatime prevents access timestamps being updated when a file is read and nodiratime will stop directory inode access times being updated.
    LABEL=/       /       ext3    noatime,nodiratime        1 1
  3. The tmpwatch file on Red Hat Enterprise Linux is set by default to clean files in /tmp based on their atime. If this is the case on your system, then the instructions above will result in users' /tmp/* files being emptied every day. This can be resolved by starting tmpwatch with the --mtime option.
    --- /etc/cron.daily/tmpwatch.orig +++ /etc/cron.daily/tmpwatch @@ -3,6 +3,6 @@
    /usr/sbin/tmpwatch 720 /var/tmp
    	if [ -d "$d" ]; then
    - /usr/sbin/tmpwatch -f 720 "$d" + /usr/sbin/tmpwatch --mtime -f 720 "$d"
Related Manual Pages
For more information, or for further reading, the following man pages are related to the information given in this section.
  • bdflush(2)
  • mkfs.ext2(8)
  • mkfs.ext3(8)
  • mount(8) - for information on atime, nodiratime and noatime
  • chattr(1)