Disabling File Access Time

Whenever Linux reads a file, it changes the last access timeknown as the atime. This is also true for your web server: If you are getting hit by 50 requests a second, your hard disk will be updating the atime 50 times a second. Do you really need to know the last time a file was accessed? If not, you can disable atime setting for a directory by typing this:

chattr R +A /path/to/directory

The chattr command changes file system attributes, of which "don't update atime" is one. To set that attribute, use +a and specify r so that it is recursively set. /path/to/directory gets changed, and so do all the files and subdirectories it contains.

4 PREV

NEXT

Was this article helpful?

0 0

Post a comment