2.9. 修改现有 TuneD 配置集
您可以修改现有配置集的参数以符合您的自定义要求。可以根据现有的 TuneD 配置集创建修改后的子配置集。
先决条件
- TuneD 服务正在运行。详情请参阅 安装和启用 TuneD。
流程
在
/etc/tuned/profiles目录中,创建一个名为您要创建的配置集的新目录:# mkdir /etc/tuned/profiles/modified-profile在新目录中,创建一个名为
tuned.conf的文件,并将 [main] 部分设置为如下:[main] include=parent-profile使用您要修改的配置集的名称替换 parent-profile,例如:
throughput-performance包括您的配置文件修改。例如,要在
throughput-performance配置集中降低 swappiness,将vm.swappiness的值改为5,而不是默认的10,请使用:[main] include=throughput-performance [sysctl] vm.swappiness=5激活配置文件。
# tuned-adm profile modified-profile
验证
查看配置集处于活跃状态并应用:
$ tuned-adm active Current active profile: modified-profile $ tuned-adm verify Verification succeeded, current system settings match the preset profile. See tuned log file ('/var/log/tuned/tuned.log') for details.