[转载]ext4的noatime

默认的方式下linux会把文件访问的时间atime做记录,这在绝大部分的场合都是没有必要的,如果遇到机器IO负载高或是CPU WAIT高的情况,可以尝试使用noatime和nodiratime

 
1、修改/etc/fstab,类似
LABEL=/                 /                       ext3    defaults        1 1
改成
LABEL=/                 /                       ext3    defaults,noatime,nodiratime        1 1
或者
LABEL=/                 /                       ext3    defaults,relatime        1 1 
2、remount分区
mount -o remount /
remount这个动作大可放心执行,顶多冒点汗。
 
 
如果不想改fstab,或者fstab中没有相关条目,直接用mount命令:
mount -o remount,noatime,nodiratime /dev/ram0 /mnt/eq
 
修改mount option可以用stat命令查看效果:
[root@localhost ~]# stat zjdx.txt
  File: `zjdx.txt'
  Size: 62108           Blocks: 136        IO Block: 4096   regular file
Device: 802h/2050d      Inode: 4883006     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2011-03-25 11:35:53.000000000 +0800
Modify: 2011-03-24 20:25:21.000000000 +0800
Change: 2011-03-24 20:25:21.000000000 +0800
 
原文:http://blog.sina.com.cn/s/blog_4b6636880100s037.html
 

转载于:https://www.cnblogs.com/jishilei/archive/2013/01/28/2879424.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这是一个针对 rk3288 平台的 Android 系统的 fstab 文件,它定义了系统中各个分区的挂载点、文件系统类型和挂载选项。文件名中的 forceencrypt.bootmode.emmc 暗示了该系统启用了强制加密功能,并且使用了 eMMC 存储设备。以下是该文件的内容: 复制 # Android fstab file for rk3288 emmc devices # # The filesystem that contains the filesystem checker binary (typically /system) cannot # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK # mount point fstype device [device2] [options] [flags] # boot, recovery, and cache are automatically set up with defaults /dev/block/platform/ff0f0000.dwmmc/by-name/system /system ext4 ro,barrier=1,discard wait /dev/block/platform/ff0f0000.dwmmc/by-name/userdata /data ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard,errors=panic wait,check,encryptable=footer # The following entry is optional, but can be used to specify an # alternate resource file to be used instead of the compiled-in # defaults: # /system/etc/recovery.fstab # A/B OTA support /dev/block/platform/ff0f0000.dwmmc/by-name/system_other /system ext4 ro,barrier=1,discard wait,slotselect /dev/block/platform/ff0f0000.dwmmc/by-name/userdata_other /data ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard,errors=panic wait,check,encryptable=footer,slotselect # /cache partition is optional, wipe cache if needed /dev/block/platform/ff0f0000.dwmmc/by-name/cache /cache ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check # /vendor partition is optional, mount if present /dev/block/platform/ff0f0000.dwmmc/by-name/vendor /vendor ext4 ro,barrier=1,noauto_da_alloc wait # /misc partition is optional, mount if present /dev/block/platform/ff0f0000.dwmmc/by-name/misc /misc emmc defaults defaults # /metadata partition is optional, mount if present /dev/block/platform/ff0f0000.dwmmc/by-name/metadata /metadata ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check
最新发布
06-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值