此内容没有您所选择的语言版本。

2.5. File System Determinism Tips


The order in which journal changes arrive are sometimes not in the order that they are actually written to disk. The kernel I/O system has the option of reordering the journal changes, usually to try and make best use of available storage space. Journal activity can introduce latency through re-ordering journal changes and committing data and metadata. Often, journaling file systems can do things in such a way that they slow the system down.
The default filesystem used by Red Hat Enterprise Linux 7 is a journaling file system called xfs. A much earlier file system called ext2 does not use journaling. Unless your organization specifically requires journaling, consider using ext2. In many of our best benchmark results, we utilize the ext2 file system and consider it one of the top initial tuning recommendations.
Journaling file systems like xfs record the time a file was last accessed (atime). If using ext2 is not a suitable solution for your system, consider disabling atime under xfs instead. Disabling atime increases performance and decreases power usage by limiting the number of writes to the filesystem journal.

Procedure 2.7. Disabling atime

  1. Open the /etc/fstab file using your chosen text editor and locate the entry for the root mount point.
    /dev/mapper/rhel-root       /       xfs    defaults…
    
    Copy to Clipboard Toggle word wrap
  2. Edit the options sections to include the terms noatime and nodiratime. noatime prevents access timestamps being updated when a file is read and nodiratime will stop directory inode access times being updated.
    /dev/mapper/rhel-root       /       xfs    noatime,nodiratime…
    
    Copy to Clipboard Toggle word wrap

    Important

    Some applications rely on atime being updated. Therefore, this option is reasonable only on system where such applications are not used.
    Alternatively, you can use the relatime mount option, which ensures that the access time is only updated if the previous access time is older than the current modify time.
Related Manual Pages

For more information, or for further reading, the following man pages are related to the information given in this section.

  • mkfs.ext2(8)
  • mkfs.xfs(8)
  • mount(8) - for information on atime, nodiratime and noatime
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat