Files
Inbox/系统基座文件/1/1.6/1.6.2 性能分析与实时监控 (Performance Analysis & Real-time Monitoring).md
2025-12-11 07:24:36 +08:00

58 lines
2.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
tags: []
date created: 星期三, 十一月 19日 2025, 8:34:02 晚上
date modified: 星期三, 十一月 19日 2025, 8:34:18 晚上
---
# 1.6.2 性能分析与实时监控 (Performance Analysis & Real-time Monitoring)
**审计综述**
系统在 Host 端和 Device 端均具备强大的性能监控和分析能力。已确认关键工具 `perf``ixprof` 存在且内核支持完整的事件追踪。NUMA 内存分配均衡,为高性能雷达应用提供了可靠的诊断基础。
**1. GPU 性能分析工具链 (GPU Profiling Toolchain)**
- **关键性****P0**
- **信息解析**
- **CUpti 接口**`libcupti.so.2.89` 存在。**CUpti (CUDA Profiling Tools Interface)** 是所有高级 GPU 性能工具与驱动通信的底层接口,它的存在证明 GPU 侧的性能数据采集功能已激活。
- **专用 Profiler**`ixprof` (Iluvatar Profiler) 存在。这是用于采集 GPU 单元利用率、显存带宽和 Kernel 时序等指标的专用工具,可用于替代 `nvprof`
- **探测依据**
```bash
ls -l /usr/local/corex/lib/libcupti.so*
… libcupti.so.2.89
ls -l /usr/local/corex/bin/ixprof
/usr/local/corex/bin/ixprof
```
**2. Linux 内核级性能分析 (Kernel Performance Analysis)**
- **关键性****P0**
- **信息解析**
- **Perf 工具**`/usr/bin/perf` 存在。Perf 已识别出 **Bus Cycles**、**Cache Misses**、**CPU Cycles** 等 ARMv8 硬件性能计数器事件。
- **内核追踪 (Ftrace)**`/sys/kernel/debug/tracing/available_tracers` 文件存在(虽然大小为 0证明 `debugfs` 已挂载,内核支持 **ftrace**。这为分析锁竞争、调度延迟等实时性问题提供了深度追踪能力。
- **探测依据**
```bash
which perf && perf list
/usr/bin/perf [Hardware events listed]
ls -l /sys/kernel/debug/tracing/available_tracers
… available_tracers
```
**3. 实时系统与 NUMA 监控 (Real-time & NUMA Monitoring)**
- **关键性****P1**
- **信息解析**
- **增强任务管理**`htop` 已安装。这是比 `top` 更直观的实时任务管理器,有利于在运行雷达程序时实时观察 CPU 亲和性Affinity是否正确绑定在 Node 1 (CPU 16-31) 上。
- **NUMA 内存分配**`numastat -m` 显示 Node 0 和 Node 1 的物理内存总量和使用量**大致均衡**。当前没有明显的跨节点内存压力。
- **默认策略**`numactl --show` 显示当前 shell 默认策略是 `policy: default`,且绑定到所有 CPU (0-31) 和所有 Node (0/1)。
- **重申风险**:这再次印证了为什么必须在启动 `main_app` 时使用 `numactl --cpunodebind=1 --membind=1` 强制覆盖默认策略。
- **探测依据**
```bash
which htop
/usr/bin/htop
numactl --show
policy: default
```