Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
4.2. tuned 和 tuned-adm
tuned 是一项配置文件调整机制,使 Red Hat Enterprise Linux 适应特定负载特性,例如 CPU 密集型任务要求,或存储/网络吞吐量的响应能力。
伴随它的工具 ktune 结合了 tuned-adm 工具,提供大量预先配置的调整分析,以便在大量具体使用案例中提高性能并降低能耗。编辑这些配置或者创建新配置可生成为系统定制的性能解决方案。
提供作为 tuned-adm 中一部分的虚拟化相关文件包括:
virtual-guest
- 基于
throughput-performance
文件,virtual-guest
同样会降低虚拟内存的 swappiness。在创建 Red Hat Enterprise Linux 7 客户虚拟机时,virtual-guest
文件将被自动选择。建议虚拟机使用该文件。本文件在 Red Hat Enterprise Linux 6.3 和之后可用,但在安装虚拟机时须手动选择。 virtual-host
- 基于
throughput-performance
文件,virtual-host
也会降低虚拟内存的 swappiness,并启用更积极的脏页(dirty page)回写。建议虚拟化主机使用本文件,包括 KVM 和 Red Hat Enterprise Virtualization 主机。
在 Red Hat Enterprise Linux 7 安装的默认情况下,将安装 tuned 软件包,并启用
tuned
服务。
要列出所有可用配置文件并识别目前激活的配置文件,请运行:
# tuned-adm list
Available profiles:
- balanced
- desktop
- latency-performance
- network-latency
- network-throughput
- powersave
- sap
- throughput-performance
- virtual-guest
- virtual-host
Current active profile: throughput-performance
也可创建自定义 tuned 文件对一组调整参数进行封装。创建自定义 tuned 文件的使用说明,请参考
tuned.conf
手册页。
要只显示当前激活的配置文件请运行:
tuned-adm active
要切换到某个可用的配置文件请运行:
tuned-adm profile profile_name
例如,切换到
virtual-host
文件,请运行:
tuned-adm profile virtual-host
重要
设置 Red Hat Enterprise Linux 7.1 中的 tuned 配置文件和以上命令后,需重启 tuned 服务,且系统必须被重启使其持续应用修改。更多信息请查看《Red Hat Enterprise Linux 7 性能调试指南》。
在某些情况下,更优的选择是禁用 tuned 并使用手动设定的参数。禁用一切调试请运行:
tuned-adm off
注意
有关 tuned、tuned-adm 和 ktune 的更多信息,请参照《Red Hat Enterprise Linux 7 电源管理指南 》,可由 https://access.redhat.com/documentation/en-US/ 获取。