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

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.