跳转到内容
搜索 RHEL 文档

    浏览当前文档目录

    RHEL 10 tuned + PCP:profile 切换与 pmstat/pmval 观测

    tuned 负责“把系统调到某个性能/功耗档位”,PCP 负责“把当时的指标留下来”。只切 profile 不留基线,出了问题无法证明改动有效;只采指标不标 profile,数据也解释不了。

    在 PVE 390 rhel10-lab(RHEL 10.2)执行:

    Terminal window
    tuned-adm active
    tuned-adm recommend
    sudo tuned-adm profile throughput-performance
    tuned-adm active
    sudo tuned-adm profile virtual-guest
    sudo dnf -y install pcp pcp-system-tools
    sudo systemctl enable --now pmcd
    pminfo -f kernel.all.load
    pmval -t 2 -s 2 kernel.all.load
    pmstat -t 1 -s 3

    E3 记录:plans/content-expansion/evidence/rhel/rhel-tuned-pcp/run.json(5 步)。

    先给结论:tuned 管配置,PCP 管观测

    Section titled “先给结论:tuned 管配置,PCP 管观测”
    工具作用本机结果
    tuned-adm切换 profileactive/recommend 都是 virtual-guest
    pmcdPCP 采集守护进程active
    pminfo看指标定义/当前值kernel.all.load 有 1/5/15 三个实例
    pmval按间隔采样1 分钟 load 0.20 → 0.18
    pmstat类 vmstat 的滚动视图load/mem/swap/io/cpu
    $ tuned-adm active
    Current active profile: virtual-guest
    $ tuned-adm recommend
    virtual-guest
    Terminal window
    sudo tuned-adm profile throughput-performance
    tuned-adm active
    # Current active profile: throughput-performance
    sudo tuned-adm profile virtual-guest

    virtual-guest 是虚拟化客户机的常见推荐;切到 throughput-performance 会改 CPU governor/IO 调度等,测试完要切回。

    Terminal window
    sudo dnf -y install pcp pcp-system-tools
    sudo systemctl enable --now pmcd
    systemctl is-active pmcd
    # active

    pcp 是采集核心,pcp-system-tools 带 pmstat/pmatop 等前端。

    $ pminfo -f kernel.all.load
    kernel.all.load
    inst [1 or "1 minute"] value 0.2
    inst [5 or "5 minute"] value 0.08
    inst [15 or "15 minute"] value 0.03
    $ pmval -t 2 -s 2 kernel.all.load
    1 minute 5 minute 15 minute
    0.2000 8.000E-02 3.000E-02
    0.1800 8.000E-02 3.000E-02

    -t 是采样间隔,-s 是次数;适合快速确认指标名和量级。

    $ pmstat -t 1 -s 3
    loadavg memory swap io system cpu
    1 min swpd free buff cache pi po bi bo in cs us sy id
    0.18 0 527536 5308 3705m 0 0 0 23 245 251 0 0 100

    列和 vmstat 接近,但数据来自 PCP archive/实时 pmcd,后续可接 Grafana/pcp-webapp。

    • tuned-adm active/recommend 已记录;
    • profile 切换有回滚(切回原 profile);
    • pmcd active、开机自启;
    • pminfo 确认指标存在;
    • pmval/pmstat 采样窗口与负载已知;
    • 基线包含内核/硬件/业务信息。
    • 未测试 PCP archive 长期存储;
    • 未测试 Grafana/pcp-webapp;
    • 未测试 pmatop/pcp-atop;
    • 未测试 tuned 自定义 profile。