mount的noatime选项


本着榨尽PC最后一点油水的思想,在看到mount能够有一个noatime选项能够提升文件系统性能时,我坚决果断就挽起袖子动起手来。app

noatime是Linux下文件系统的一个mount选项,表示在读文件时不去更改文件的access time属性了,而缺省时每次读文件,都要更新这个文件的last access time属性,至关于附加了额外的写操做,想一想对性能应该有不小的影响啊。ide

动手前,天然先测一下当前的性能,我用hdparm -tT和postmark(这个能够用apt-get安装)分别测了一下, 
postmark 的结果是: 
PostMark v1.51 : 8/14/01
pm>run
Creating files…Done
Performing transactions……….Done
Deleting files…Done
Time:
        1 seconds total
        1 seconds of transactions (500 per second)post

Files:
        764 created (764 per second)
                Creation alone: 500 files (500 per second)
                Mixed with transactions: 264 files (264 per second)
        243 read (243 per second) 
        257 appended (257 per second)
        764 deleted (764 per second)
                Deletion alone: 528 files (528 per second)
                Mixed with transactions: 236 files (236 per second)性能

Data:
        1.36 megabytes read (1.36 megabytes per second)
        4.45 megabytes written (4.45 megabytes per second)spa

hdparm的结果是:
 Timing cached reads:   1170 MB in  2.00 seconds = 585.12 MB/sec
 Timing buffered disk reads:   84 MB in  3.00 seconds =  27.96 MB/secorm

改这个noatime却是很简单,在/etc/fstab中的文件系统的属性后加上noatime,再用 sudo mount -oremount / 就能够当即生效了(是的,不须要重启)。用mount命令验证,确实有了noatime的选项。rem

相关文章
相关标签/搜索