跳转到内容
搜索 RHEL 文档

    浏览当前文档目录

    RHEL 10 tuned 性能配置档:推荐、切换与回退

    tuned 不是“一个参数”,而是一组 sysctl、CPU 调度、IO 调度、设备与内核参数的集合。它按 profile 应用,按机器类型推荐;本页在 RHEL 10.2 虚拟机上跑一遍推荐、切换、回退,并解释一个常见的假故障。

    在 PVE 390 rhel10-lab(RHEL 10.2 x86_64)上实际执行:

    Terminal window
    sudo dnf -y install tuned
    sudo systemctl enable --now tuned
    tuned-adm active
    tuned-adm recommend
    tuned-adm list | head
    tuned-adm profile throughput-performance
    tuned-adm active
    sudo tuned-adm profile virtual-guest
    sudo tuned-adm verify

    E3 记录:plans/content-expansion/evidence/rhel/rhel-tuned-profiles/run.json(12 步,含每步输出 sha256 与退出码)。

    • tuned-adm recommend 按硬件/虚拟化环境给建议,不是“性能最好”;
    • 切换 profile 会改 sysctl、调度器、电源/设备设置,可能影响延迟与功耗;
    • active 显示当前档,/etc/tuned/active_profile 记录持久值;
    • verify 检查“当前系统设置是否与 profile 预设一致”,环境差异会导致失败。
    $ tuned-adm active
    Current active profile: virtual-guest
    $ tuned-adm recommend
    virtual-guest

    虚拟机里推荐 virtual-guest 是预期行为;物理机/数据库/NFV 场景应重新 recommend,不要照搬。

    Terminal window
    sudo tuned-adm profile throughput-performance
    tuned-adm active
    # Current active profile: throughput-performance
    sudo tuned-adm profile virtual-guest
    tuned-adm active
    # Current active profile: virtual-guest
    cat /etc/tuned/active_profile
    # virtual-guest

    tuned-adm list 里常见档位:

    Profile适用
    balanced通用
    throughput-performance吞吐优先
    latency-performance延迟优先
    network-latency / network-throughput网络专项
    virtual-guest / virtual-host虚拟化
    powersave省电

    profile_info:切换前先看它改什么

    Section titled “profile_info:切换前先看它改什么”
    Terminal window
    tuned-adm profile_info throughput-performance

    输出包含 profile 名称、摘要与描述。切换前至少确认:是否改 CPU governor、是否关停节能、是否影响 NUMA/IRQ;不要在生产高峰盲切。

    $ sudo tuned-adm verify
    Verification failed, current system settings differ from the preset profile.
    You can mostly fix this by restarting the TuneD daemon...

    本次实测 active 仍是 virtual-guest,但 verify 失败:云镜像/虚拟化环境里有些设置(如 bootloader、设备参数)无法完全匹配预设。处理顺序:

    1. systemctl restart tuned 后再 verify;
    2. 看 /var/log/tuned/tuned.log 的具体差异;
    3. 仍失败就按环境接受,不要为了“verify 通过”强改启动参数。
    • 先 recommend,再决定 profile;
    • 切换前 profile_info 看改动范围;
    • 记录切换前后的 active 与 /etc/tuned/active_profile;
    • 有回退档(如 virtual-guest/balanced);
    • verify 失败先 restart/看日志,不直接判“没生效”;
    • 生产变更走窗口与快照。
    • 未测试物理机/数据库/NFV 的推荐差异;
    • 未测试 tuned-adm profile 对延迟/吞吐的实际基准影响;
    • 未测试自定义 profile 与 [variables] 继承;
    • 未测试 tuned-adm off 与开机默认档的交互。