Linux noatime impact on file access time

Source: Internet
Author: User

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:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.