第 8 章 使用 PCP 对 XFS 的性能分析

XFS PMDA 作为 pcp 软件包的一部分提供,并在安装过程中默认启用。它用于在 Performance Co-Pilot (PCP) 中收集 XFS 文件系统的性能指标数据。

您可以使用 PCP 分析 XFS 文件系统的性能。

8.1. 手动安装 XFS PMDA

如果 pcp 配置输出中没有列出 XFS PMDA,请手动安装 PMDA 代理。

这个步骤描述了如何手动安装 PMDA 代理。

先决条件

步骤

  1. 进入 xfs 目录:

    # cd /var/lib/pcp/pmdas/xfs/
  2. 手动安装 XFS PMDA:

    xfs]# ./Install
    Updating the Performance Metrics Name Space (PMNS) ...
    Terminate PMDA if already installed ...
    Updating the PMCD control file, and notifying PMCD ...
    Check xfs metrics have appeared ... 387 metrics and 387 values

验证步骤

  • 验证 pmcd 进程是否在主机上运行,且在配置中列出 XFS PMDA:

    # pcp
    
    Performance Co-Pilot configuration on workstation:
    
    platform: Linux workstation 4.18.0-80.el8.x86_64 #1 SMP Wed Mar 13 12:02:46 UTC 2019 x86_64
    hardware: 12 cpus, 2 disks, 1 node, 36023MB RAM
    timezone: CEST-2
    services: pmcd
    pmcd: Version 4.3.0-1, 8 agents
    pmda: root pmcd proc xfs linux mmv kvm jbd2

其他资源