{"id":33,"date":"2021-01-12T08:55:31","date_gmt":"2021-01-12T08:55:31","guid":{"rendered":"https:\/\/veltzer.net:8890\/?p=33"},"modified":"2021-01-12T08:55:31","modified_gmt":"2021-01-12T08:55:31","slug":"using-noatime-on-a-running-linux-system","status":"publish","type":"post","link":"https:\/\/veltzer.net:8890\/using-noatime-on-a-running-linux-system\/","title":{"rendered":"Using \u201cnoatime\u201d on a running Linux system"},"content":{"rendered":"\n

When upgrading my Ubuntu system my \/etc\/fstab<\/code> got overwritten by the upgrade process. It seems that the new \/etc\/fstab<\/code> file did not keep my old preferences for file systems. I didn\u2019t notice this for some time but what I did notice was that my system was sluggish. After some time I recalled that I had previously used noatime<\/code> as a mount option for all of my hard drives which gave me some more speed and treated my hard drives with a softer touch.<\/p>\n\n\n\n

First lets explain what noatime<\/code> means. atime<\/code> or Access Time is an attribute stored by all well behaved UNIX file systems for each and every file. It is one of 3 dates stored: meta info modification time \u2013 ctime<\/code>, last modification time \u2013 mtime<\/code> and last acces time \u2013 atime<\/code>. Out of the 3 atime is the most controversial since it means that for every read from the disk there is a write operation. This is one of the worst defaults in your UNIX system.<\/p>\n\n\n\n

The solution is just to disable atime altogether. Warning \u2013 this may cause some weird applications that rely on atime to break. If you want your system to be as \u201cdefault\u201d as possible don\u2019t do what I suggest. If you want better performance and hard disk lifetime and on the other hand don\u2019t mind parting ways with one or two misfit applications then this trick is for you.<\/p>\n\n\n\n

How do you do it? Just edit \/etc\/fstab<\/code> and add noatime<\/code> at the 4\u2032th column where file system mount options are for any file system you want to avoid access time updating. Reboot your system. Run mount(1)<\/code> to see that all your file systems are mounted correctly. Enjoy.<\/p>\n\n\n\n

What applications break? Actually \u2013 I have yet to see an application break because of this change. I have been running with \u201cnoatime\u201d for 2 years now and all the applications seem to behave well. If you know of an application that breaks please let me know\u2026<\/p>\n","protected":false},"excerpt":{"rendered":"

When upgrading my Ubuntu system my \/etc\/fstab got overwritten by the upgrade process. It seems that the new \/etc\/fstab file did not keep my old preferences for file systems. I didn\u2019t notice this for some time but what I did notice was that my system was sluggish. After some time I recalled that I had … <\/p>\n