Saturday, December 22, 2012

SSD optimisation part 4: atime and journaling


The reasoning for the noatime mount option being recommended for SSDs is that every time a file is accessed, the last accessed time is written to disk, hence turning it off will remove a lot of writes. Most distros use relatime by default, negating some of the writes though, so it is not an absolute must:

"Relatime maintains atime data, but not for each time that a file is accessed. With this option enabled, atime data is written to the disk only if the file has been modified since the atime data was last updated (mtime), or if the file was last accessed more than a certain length of time ago (by default, one day)."
- Redhat documentation

If you want to use it, add noatime to /etc/fstab:

Disable Journaling

"A journaling file system is a file system that keeps track of the changes that will be made in a journal (usually a circular log in a dedicated area of the file system) before committing them to the main file system. In the event of a system crash or power failure, such file systems are quicker to bring back online and less likely to become corrupted."

According to kernel developer and ext4 maintainer Ted Ts'o there is very little to be gained by disabling Journaling. On top of that there's also the risk of data loss. I would highly recommend you leave it on. I wont even write how to turn it off....

Risk of data loss.

A tiny bit of performance gain?

My recommendation
Keep it at the default setting (on).

This post was written for the Linux Mint forum. Please ask any questions there (: