RHEL 10 tuned 性能配置档:推荐、切换与回退
tuned 不是“一个参数”,而是一组 sysctl、CPU 调度、IO 调度、设备与内核参数的集合。它按 profile 应用,按机器类型推荐;本页在 RHEL 10.2 虚拟机上跑一遍推荐、切换、回退,并解释一个常见的假故障。
在 PVE 390 rhel10-lab(RHEL 10.2 x86_64)上实际执行:
sudo dnf -y install tunedsudo systemctl enable --now tunedtuned-adm activetuned-adm recommendtuned-adm list | headtuned-adm profile throughput-performancetuned-adm activesudo tuned-adm profile virtual-guestsudo tuned-adm verifyE3 记录:plans/content-expansion/evidence/rhel/rhel-tuned-profiles/run.json(12 步,含每步输出 sha256 与退出码)。
先给结论:profile 是一组设置
Section titled “先给结论:profile 是一组设置”tuned-adm recommend按硬件/虚拟化环境给建议,不是“性能最好”;- 切换 profile 会改 sysctl、调度器、电源/设备设置,可能影响延迟与功耗;
active显示当前档,/etc/tuned/active_profile记录持久值;verify检查“当前系统设置是否与 profile 预设一致”,环境差异会导致失败。
$ tuned-adm activeCurrent active profile: virtual-guest
$ tuned-adm recommendvirtual-guest虚拟机里推荐 virtual-guest 是预期行为;物理机/数据库/NFV 场景应重新 recommend,不要照搬。
sudo tuned-adm profile throughput-performancetuned-adm active# Current active profile: throughput-performance
sudo tuned-adm profile virtual-guesttuned-adm active# Current active profile: virtual-guestcat /etc/tuned/active_profile# virtual-guesttuned-adm list 里常见档位:
| Profile | 适用 |
|---|---|
balanced | 通用 |
throughput-performance | 吞吐优先 |
latency-performance | 延迟优先 |
network-latency / network-throughput | 网络专项 |
virtual-guest / virtual-host | 虚拟化 |
powersave | 省电 |
profile_info:切换前先看它改什么
Section titled “profile_info:切换前先看它改什么”tuned-adm profile_info throughput-performance输出包含 profile 名称、摘要与描述。切换前至少确认:是否改 CPU governor、是否关停节能、是否影响 NUMA/IRQ;不要在生产高峰盲切。
verify 失败不等于没生效
Section titled “verify 失败不等于没生效”$ sudo tuned-adm verifyVerification failed, current system settings differ from the preset profile.You can mostly fix this by restarting the TuneD daemon...本次实测 active 仍是 virtual-guest,但 verify 失败:云镜像/虚拟化环境里有些设置(如 bootloader、设备参数)无法完全匹配预设。处理顺序:
systemctl restart tuned后再 verify;- 看
/var/log/tuned/tuned.log的具体差异; - 仍失败就按环境接受,不要为了“verify 通过”强改启动参数。
- 先
recommend,再决定 profile; - 切换前
profile_info看改动范围; - 记录切换前后的
active与/etc/tuned/active_profile; - 有回退档(如 virtual-guest/balanced);
-
verify失败先 restart/看日志,不直接判“没生效”; - 生产变更走窗口与快照。
未实测与边界
Section titled “未实测与边界”- 未测试物理机/数据库/NFV 的推荐差异;
- 未测试
tuned-adm profile对延迟/吞吐的实际基准影响; - 未测试自定义 profile 与
[variables]继承; - 未测试
tuned-adm off与开机默认档的交互。
- RHEL 10 采用评估 — 内核与 systemd 版本
- RHEL 内核与模块管理 — 内核参数
- 官方:Monitoring and managing system performance