2.14. 修改现有 TuneD 配置文件
此流程根据现有的 TuneD 配置文件创建修改后的子配置文件。
先决条件
-
TuneD
服务正在运行。详情请参阅安装和启用 TuneD。
步骤
在
/etc/tuned/
目录中,创建一个名为您要创建的配置文件的新目录:# mkdir /etc/tuned/modified-profile
在新目录中,创建一个名为
tuned.conf
的文件,并按如下所示设置[main]
部分:[main] include=parent-profile
使用您要修改的配置文件的名称替换 parent-profile。
包括您的配置文件修改。
例 2.18. 在 throughput-performance 配置文件中降低 swappiness
要使用
throughput-performance
配置文件的设置,并将vm.swappiness
的值改为 5,而不是默认的 10,请使用:[main] include=throughput-performance [sysctl] vm.swappiness=5
要激活配置文件,请使用:
# tuned-adm profile modified-profile
验证 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)
手册页