2.14. 修改现有 TuneD 配置文件


此流程根据现有的 TuneD 配置文件创建修改后的子配置文件。

先决条件

步骤

  1. /etc/tuned/ 目录中,创建一个名为您要创建的配置文件的新目录:

    # mkdir /etc/tuned/modified-profile
  2. 在新目录中,创建一个名为 tuned.conf 的文件,并按如下所示设置 [main] 部分:

    [main]
    include=parent-profile

    使用您要修改的配置文件的名称替换 parent-profile

  3. 包括您的配置文件修改。

    例 2.18. 在 throughput-performance 配置文件中降低 swappiness

    要使用 throughput-performance 配置文件的设置,并将 vm.swappiness 的值改为 5,而不是默认的 10,请使用:

    [main]
    include=throughput-performance
    
    [sysctl]
    vm.swappiness=5
  4. 要激活配置文件,请使用:

    # tuned-adm profile modified-profile
  5. 验证 TuneD 配置文件是否活跃,并应用了系统设置:

    $ tuned-adm active
    
    Current active profile: my-profile
    $ tuned-adm verify
    
    Verification succeeded, current system settings match the preset profile.
    See tuned log file ('/var/log/tuned/tuned.log') for details.

其他资源

  • 您系统上的 tuned.conf (5) 手册页
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

© 2024 Red Hat, Inc.