When is it a good idea to disable atime and diratime?

I read that disabling atime and diratime can be useful for I / O performance, but I have never seen a good example of what would not be useful. When should I do this?

+4
source share
2 answers

If you need a reliable example of when you specify noatime in the parameters for the section, imagine a data section containing files for the database. This database is mostly read from (not written), and the queries are frequent and small in size. If you turned on atime, every read operation (fast) that hit the disk would actually turn into a write operation (slow), because atime had to be updated every time something was accessed.

This is especially noticeable when you use a potentially slow disk (think that EBS on Amazon has some performance issues).

So, anyway, when you expect a lot of reading from the file system, and you want to prevent latency due to disk I / O, disable atime :)

+5
source

atime - last access time. This means that it must be updated on disk every time a file is read, even if there is no other modification in the fileโ€™s data / metadata.

And since most programs read files, even if they donโ€™t write to them, itโ€™s always useful to disable these options for performance.

Unless, of course, you need it. Because, as you probably know, atime set by Posix, and there is some old software that relies on it.

0
source

Source: https://habr.com/ru/post/1390878/


All Articles