开机去掉atime参数

本文介绍了Linux系统中文件系统挂载选项noatime的作用及其配置方法。通过使用noatime选项,可以避免读取文件时更新访问时间,从而提高文件系统的性能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Linux has a special mount option for file systems callednoatime that can be added to each line that addresses one file system in the/etc/fstab file. If a file system has been mounted with this option, reading accesses to the file system will no longer result in an update to the atime information associated with the file like we have explained above. The importance of the noatime setting is that it eliminates the need by the system to make writes to the file system for files which are simply being read. Since writes can be somewhat expensive, this can result in measurable performance gains. Note that the write time information to a file will continue to be updated anytime the file is written to.


Linux对于文件系统有一个特殊的挂载选项noatime,可以添加到一个文件系统的/etc/fstab文件中的每一行中。如果文件系统已经有了这个选项,阅读的文件系统的访问将不再更新文件的atime相关信息。使用noatime设置的重要性是它消除了简单地被读出的文件的atime的更新。因为系统运行的时候要访问大量文件,如果能减少一些动作(如减少时间戳的记录次数等)将会显著提高磁盘 IO 的效率、提升文件系统的性能。


# vim /etc/fstab

UUID=b9991053-7d51-4f84-8760-b570fd499517 /                       ext4    defaults,noatime        1 1

保存即可,下次开机启动时就不会再启用atime了


       atime  Do not use noatime feature, then the inode access time is controlled by kernel defaults.
              See also the description for strictatime and reatime mount options.

       noatime
              Do  not update inode access times on this filesystem (e.g, for faster access on the news
              spool to speed up news servers).

注:RHEL6版本默认已经不再启用atime了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值