7

According to the RHEL 6 documentation about the Relatime Drive Access Optimization:

The kernel used in Red Hat Enterprise Linux 6 supports another alternative — relatime. 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).

Emphasis mine -- this documentation suggests that the access time updating algorithm can be changed to use a different interval than 24 hours, but I have no idea how to actually accomplish this.

There apparently used to be a sysctl option named fs.relatime_interval as mentioned here, but I cannot find it in my Centos 6.5 kernel (2.6.32-431.)

Is it possible to make this value something arbitrary like 12 hours, 6 hours, etc?

  • Thanks @VolkerSiegel, but unfortunately I don't have a /proc/sys/fs/relatime_interval file like in the answer to that question. It doesn't show up if I do sysctl fs | grep relatime either. I suspect it either changed names or stopped being tunable between 2.6.27 and 2.6.32. – mutron Sep 11 '14 at 3:00
  • But you do have the file /proc/sys/fs/file-max for example? – Volker Siegel Sep 11 '14 at 3:21
  • Yes, I do in fact have a working proc fs mounted on /proc. – mutron Sep 12 '14 at 4:04
3

It's immutable in the mainline kernel function relatime_need_update() which checks against the hardcoded value of 24*60*60 (1 day), see the source at e.g.:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/inode.c#n1590

0

Supposedly it can be changed via boot argument.

Likely it can be changed via /proc or /sys but I am not able to find it right now. Answer that Volker linked to refers to a command that does not exist on my system either.

Filesystem mount option strictatime would ensure what you want, but at a quite cost in performance. Relatime semantics were introduced and became default for a reason, it was costly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.