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)
手册页