CPUInfo 与 CentOS 性能的关系
核心结论
关键字段与性能关联
| 字段 | 含义 | 与性能的关联 | 如何核验 |
|---|---|---|---|
| model name / cpu family / model / stepping | CPU 型号与步进 | 决定微架构能力与微码修复级别,影响指令吞吐、漏洞修复与稳定性 | grep -E "model name |
| cpu MHz | 当前运行频率 | 频率越高单核越快;若明显低于标称,多为节能/降频 | watch -n 0.5 “grep ‘cpu MHz’ /proc/cpuinfo” |
| cache size / clflush size / cache_alignment | 缓存大小与行对齐 | 更大缓存与对齐命中率更高,减少访存延迟 | grep -E "cache size |
| flags | 指令集特性 | 如 sse4_2、avx、avx2、aes、vmx/svm 等决定可否启用优化路径与虚拟化 | grep flags /proc/cpuinfo |
| physical id / core id / siblings / cpu cores | 物理 CPU、核心、线程拓扑 | 影响并行度与调度域,决定可并行任务数与跨 NUMA 访问成本 | lscpu;或 grep -E "physical id |
| address sizes | 物理/虚拟地址位宽 | 影响可用内存空间与某些内存模型行为 | grep “address sizes” /proc/cpuinfo |
| power management | 电源管理特性 | 节能策略可能降低频率与电压,影响时延与吞吐 | grep “power management” /proc/cpuinfo |
| bogomips | 内核计算的伪 MIPS | 仅作参考,不等同基准性能 | grep bogomips /proc/cpuinfo |
| 以上字段均可在 /proc/cpuinfo 中查看,配合 lscpu 获取更直观的拓扑汇总。 |
从 CPUInfo 发现性能瓶颈与优化方向
快速检查清单