zoukankan      html  css  js  c++  java
  • 开机去掉atime参数 枯木

    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了

  • 相关阅读:
    前言
    上传图片
    创建数据库
    HttpPostedFile类的使用方法
    C#中virtual和abstract的区别
    C#中new的用法,及与override的区别
    jQuery使用clone克隆元素
    JavaScript使用delete删除属性
    Docker的简单使用
    低版本SqlServer将查询结果转成JSON字符串
  • 原文地址:https://www.cnblogs.com/kumulinux/p/2808697.html
Copyright © 2011-2022 走看看