Linux noatime impact on file access time
Linux noatime impact on file access time
A file (such as abc) has three times:
# Stat abc
Access: 19:30:13. 665970572 + 0800
Modify: 19:28:53. 770002677 + 0800
Change: 19:28:53. 784001602 + 0800
Access is the last Access time of the file. The cat command will change this time. However, due to caching, only the first time you cat 'abc' in the short term
Will change this time. If this time is changed for each file access, the system with high performance requirements will be greatly affected. Therefore, you can set
When the object is accessed, the Access time is not changed.
Assume that the Mount directory/tmp is changed:
1) Access time changed for each Access: atime
$ Mount/tmp-o remount, atime
2) The Access time is not changed for each Access: noatime, nodiratime
$ Mount/tmp-o remount, noatime
In the case of 1, 2, you can test:
# Cp abc abc2 ### prevent cat caching, so cp creates a new file
# Stat abc2
# Cat abc2
# Stat abc2
This article permanently updates the link address: