Profile Memory Bandwidth and Cache Misses via Intel PCM Telemetry

Technical architecture diagram illustrating Intel Pcm Telemetry Xeon
Verified Answer

Intel Processor Counter Monitor (PCM) profiles bare-metal Xeon bottlenecks by reading core and uncore hardware PMUs directly via MSRs and PCIe config space. Tools like pcm-memory and pcm-numa expose per-channel DDR5 saturation, UPI interconnect traffic, L2/L3 cache hit rates, and IPC that standard OS utilities like top and vmstat cannot observe.

Quick Answer: Hardware-Level Observability with Intel PCM

Intel Processor Counter Monitor (PCM) reads uncore and core Performance Monitoring Units (PMUs) directly via MSRs and PCIe config space to expose per-channel DDR5 memory bandwidth, UPI interconnect saturation, L2/L3 cache hit ratios, and Instructions Per Cycle (IPC). Unlike OS-level tools such as top or vmstat, PCM pinpoints whether a Xeon workload is front-end stalled, memory-bandwidth bound, or suffering remote NUMA hops.

Core Silicon & Stack Covered: Intel PCM (pcm, pcm-memory, pcm-numa, pcm-pcie, pcm-sensor-server), Linux msr/perf_events, Prometheus exporter

Standard Linux utilities like top and vmstat report CPU utilization percentages but hide whether cores are stalled on memory bandwidth, remote NUMA hops, or cache misses. Hardware performance counters expose those exact bottlenecks in real time. This guide explains Intel PCM tools, uncore profiling, Prometheus streaming, and MSR permissions.

Blind Spots in OS Metrics

High CPU usage in top cannot distinguish productive instruction retirement from cores spinning on stalled DRAM fetches.

MSR Access and PMU Limits

Reading uncore counters requires msr kernel module permissions and coordination to avoid contention with perf_events.

Channel and IPC Telemetry

Deploy pcm-memory, pcm-numa, and pcm-sensor-server to stream per-channel DDR5 memory bandwidth and IPC metrics into Prometheus.

1. How Intel PCM Reads Core and Uncore Hardware Counters

Every Intel Xeon Scalable and Xeon 6 core contains fixed-function counters (instructions retired, unhalted core cycles, reference cycles) plus programmable general-purpose PMU counters exposed through Model-Specific Registers (/dev/cpu/*/msr). Meanwhile, the Xeon uncore houses separate PMU boxes inside each Memory Controller (IMC), Mesh/CHA slice, Mesh-to-Memory (M2M) bridge, UPI link, and IIO/PCIe root complex.

Because uncore counters aggregate traffic across all cores on a socket, sampling them requires either root access to PCIe configuration space (/dev/mem, /sys/bus/pci, or Linux TPMI/MMIO regions) or Linux perf_event_open uncore PMU drivers. Intel PCM abstracts register-layout differences between Skylake-SP, Ice Lake-SP, Sapphire Rapids, Emerald Rapids, and Granite Rapids automatically by probing the host CPUID and PCIe device IDs at startup.

Terminal / Bash

# Load the kernel MSR module required by Intel PCM
sudo modprobe msr

# Install prebuilt PCM package or build from source
# Ubuntu 24.04+ / Debian:
sudo apt-get install -y pcm

# Or build latest upstream Intel PCM for Xeon 6 / Emerald Rapids support:
git clone --recursive https://github.com/intel/pcm.git
cd pcm && mkdir build && cd build
cmake .. -DPCM_USE_PERF=ON && cmake --build . --parallel $(nproc)

Direct MSR/MMIO Mode vs. Linux perf_event Mode

By default, upstream PCM opens /dev/cpu/*/msr and PCI config devices directly, which can fail on enterprise Linux distributions booted with UEFI Secure Boot because Linux Kernel Lockdown (integrity mode) blocks direct /dev/mem and raw MSR writes. Building with -DPCM_USE_PERF=ON (or running pcm with kernel uncore PMU drivers loaded) routes counter programming through the kernel’s perf_event_open subsystem, preserving full compliance with Secure Boot and avoiding silent counter contention with other perf clients.

2. Profiling DDR5 IMC Channels, UPI Traffic, and IPC

When diagnosing throughput ceilings, start with four targeted PCM binaries: pcm (core IPC, L2/L3 cache hit rates, active frequency), pcm-memory (per-channel DDR4/DDR5 read/write bandwidth), pcm-numa (local vs. remote DRAM access counts), and pcm-pcie (IIO DMA hits and misses into L3 cache via Intel DDIO). Running 2-second sampling intervals avoids smoothing out micro-bursts while keeping MSR read overhead negligible.

Terminal / Bash

# 1. Monitor core IPC, L3 Cache Misses, and package power (2s interval, 5 samples)
sudo ./pcm 2 -i=5

# 2. Inspect per-channel IMC memory bandwidth (detects asymmetric DIMM population)
sudo ./pcm-memory 2 -i=5

# 3. Measure local vs. remote NUMA memory accesses per core
sudo ./pcm-numa 2 -i=5

# 4. Inspect PCIe Gen4/Gen5 NVMe & NIC DMA read/write bandwidth and DDIO hit rate
sudo ./pcm-pcie -e 2 -i=5

Walkthrough: Reading pcm and pcm-memory Sample Output

Understanding how PCM formats socket and channel telemetry prevents misreading saturation symptoms. Below is a representative excerpt from a dual-socket Xeon Scalable node experiencing unbalanced memory pressure:

Terminal / Bash

EXEC | IPC  | FREQ  | AFREQ | L3MISS | L2MISS | L3HIT | L2HIT | READ   | WRITE
SKT0 | 0.62 | 0.88  | 1.05  |  418 M |  690 M |  0.39 |  0.54 | 198 GB |  44 GB
SKT1 | 1.48 | 0.94  | 1.12  |   62 M |  195 M |  0.68 |  0.71 |  38 GB |  12 GB

# pcm-memory per-channel excerpt on Socket 0 (8-channel DDR5):
|-- Ch0 Read: 28.4 GB/s  Write: 6.1 GB/s --|-- Ch1 Read: 28.1 GB/s  Write: 6.0 GB/s --|
|-- Ch2 Read:  0.0 GB/s  Write: 0.0 GB/s --|-- Ch3 Read: 27.9 GB/s  Write: 5.9 GB/s --|
|-- Socket 0 Total Memory Bandwidth: 242.0 GB/s (Read: 198.0, Write: 44.0) --|

Notice two immediate hardware clues in this output. First, Socket 0 shows an IPC of 0.62 alongside an L3HIT ratio of 0.39 and 418 million L3 misses—meaning cores on Socket 0 spend most of their cycles stalled waiting on DRAM rather than retiring instructions. Second, pcm-memory reveals 0.0 GB/s on Channel 2 while Channels 0, 1, and 3 carry ~34 GB/s each. That signature exposes either a missing DIMM, an unseated DDR5 module, or an ECC-disabled channel forcing the remaining channels into early queue-depth saturation.

Interpreting Key Xeon Bottleneck Thresholds

As a rule of thumb, an IPC below 0.7 paired with high L3 cache misses per kilo-instruction (MPKI > 10) indicates memory-latency stalls—often solved by pinning threads to local NUMA nodes via numactl or allocating static 2 MB/1 GB HugePages. Conversely, if pcm-memory shows total socket bandwidth exceeding 75–80% of theoretical DDR5 peak (e.g., >230 GB/s on an 8-channel DDR5-4800 socket), memory latency rises exponentially due to IMC queue saturation. On two-socket systems, watch the UPI utilization column in pcm: sustained UPI link traffic above 60% or remote-access ratios above 20% in pcm-numa confirm cross-socket NUMA thrashing.

3. Streaming Xeon Telemetry to Prometheus with pcm-sensor-server

For continuous fleet observability, Intel PCM includes pcm-sensor-server, a lightweight HTTP/JSON and Prometheus metrics exporter. Running it as a systemd service lets Grafana dashboards correlate application P99 latency spikes directly with UPI link utilization, DDR5 read/write saturation, or L3 cache eviction waves across hundreds of bare-metal nodes.

Terminal / Bash

# Launch pcm-sensor-server on loopback port 9738 for Prometheus scraping
sudo ./pcm-sensor-server -p 9738 -a 127.0.0.1 -r

# Verify exported Prometheus metrics locally
curl -s http://127.0.0.1:9738/metrics | grep -E 'Socket_.*_Read|IPC|L3_Cache_Hit' | head -n 20

# Inspect systemd unit hardening example for production scrape intervals
systemctl cat pcm-sensor-server || true

When deploying pcm-sensor-server behind a Prometheus agent or Grafana Alloy collector on localhost, set your Prometheus scrape_interval to 5s or 10s and avoid overlapping scrapes from multiple Prometheus servers. Every scrape triggers a counter sample cycle inside the exporter; concurrent scrapers hitting port 9738 rapidly can cause inconsistent delta windows unless pcm-sensor-server caches its latest sampling interval.

Key Prometheus Metrics and Grafana Alerting Rules

Rather than graphing dozens of raw per-core counters across 64-core sockets, build high-signal alerts around four hardware saturation indicators exported by pcm-sensor-server. First, track Socket IMC Read + Write Bandwidth as a percentage of theoretical socket peak (for example, 307.2 GB/s theoretical on 8-channel DDR5-4800, alerting above 230 GB/s sustained). Second, alert when UPI Link Utilization crosses 60% or when remote DRAM accesses rise above 20%, indicating NUMA scheduler drift or a misconfigured memory-interleave policy. Third, correlate L3 Cache Hit Ratio drops alongside tail latency spikes to spot noisy-neighbor cache thrashing. Fourth, monitor Core Frequency / Thermal Headroom flags to ensure package PL1 power limits or datacenter inlet temperatures are not silently downclocking compute nodes under peak batch load.

Terminal / Bash

# Example systemd unit override for pcm-sensor-server bound to localhost
[Service]
ExecStart=/usr/local/bin/pcm-sensor-server -p 9738 -a 127.0.0.1 -r
Restart=on-failure
RestartSec=5
NoNewPrivileges=yes

4. Intel PCM Tools vs. Linux perf and sar

Choose the right telemetry utility depending on whether you need socket-wide silicon bandwidth visibility or function-level call-stack attribution:

Utility Primary Visibility Uncore IMC / UPI Support Overhead Best Use Case
pcm / pcm-memory IPC, L2/L3 hits, per-channel DRAM GB/s Native per-channel & per-link Very Low (<1%) Detecting memory saturation & NUMA imbalance
pcm-pcie PCIe root-port DMA hit/miss & bandwidth Native IIO PMU counters Low Validating 100GbE NIC & NVMe DMA paths
Linux perf stat Per-PID cycles, instructions, cache-misses Via uncore_imc_* events Low to Medium Correlating PMU events to specific PIDs
sar / vmstat OS CPU%, runqueue, page faults None Negligible Baseline OS scheduling & I/O wait checks

Use Intel PCM to isolate the hardware subsystem bottleneck first—confirming whether memory controllers, L3 caches, or PCIe lanes are saturated—then use perf record -g -p <PID> on the offending process to locate the hot C++, Rust, or Go function causing the cache misses.

5. Continuous Hardware Telemetry Guardrails

Follow these four engineering practices when running Intel PCM on production Xeon servers:

Bind Exporter to Loopback or Admin VLAN

Never expose pcm-sensor-server on public interfaces; bind to 127.0.0.1 or a private management interface behind TLS.

Use Linux Perf Driver Mode Where Possible

Compile PCM with PCM_USE_PERF=1 on hardened kernels with CONFIG_SECURITY_LOCKDOWN_LSM enabled to avoid /dev/mem restrictions.

Sample at 2–5 Second Intervals

Avoid sub-second polling in production daemons; 2-second to 5-second windows capture bursts cleanly with negligible MSR IPI traffic.

Baseline Before & After BIOS Changes

Archive pcm-memory and pcm-numa snapshots before altering Sub-NUMA Clustering (SNC) or prefetcher settings.

Handling Sub-NUMA Clustering (SNC) and NMI Watchdog Contention

Two common platform behaviors surprise engineers deploying PCM across diverse Xeon fleets. First, enabling Sub-NUMA Clustering (SNC-2 or SNC-4) in UEFI BIOS splits each physical socket into multiple logical NUMA domains, which alters how pcm-numa and pcm-memory report socket vs. memory-controller domains—always note your SNC BIOS setting alongside archived CSV baselines. Second, the Linux kernel’s built-in nmi_watchdog consumes one general-purpose core PMU counter per logical CPU by default. On Xeon SKUs with four programmable counters per core (when SMT is enabled), running pcm alongside nmi_watchdog=1 may leave insufficient free counters for simultaneous L2/L3 event multiplexing; disabling it temporarily via sysctl -w kernel.nmi_watchdog=0 frees that hardware slot during deep profiling sessions.

6. Troubleshooting MSR Permissions and PMU Contention

Because Xeon PMUs have a finite number of programmable registers, running Intel PCM simultaneously with another hardware profiler (like Intel VTune, Datadog continuous eBPF PMU profiling, or perf stat -a) can trigger PMU already in use warnings or zeroed counters. Similarly, UEFI Secure Boot kernel lockdown blocks raw /dev/msr writes unless PCM uses the Linux perf interface or MSR writes are permitted.

PowerShell / CMD

# Check if another process holds PMU counters or /dev/msr is blocked
lsmod | grep msr
cat /sys/kernel/security/lockdown
dmesg | grep -iE 'lockdown|PMU|perf'

# Free the NMI watchdog PMU slot temporarily during profiling if counters multiplex
sudo sysctl -w kernel.nmi_watchdog=0

# Reset stuck PMU freeze/control state safely if a prior PCM run crashed
sudo ./pcm --reset-pmu

# Stop pcm-sensor-server cleanly to release all hardware counters
sudo pkill -SIGTERM pcm-sensor-server

If pcm prints Access to /dev/cpu/0/msr failed or Operation not permitted inside a container or hardened host, verify that the process runs outside restrictive seccomp/capability drops (CAP_SYS_RAWIO is required for raw MSR mode, whereas CAP_PERFMON suffices for PCM_USE_PERF=1 on Linux 5.8+). If you need to roll back telemetry completely on a latency-critical node, stop pcm-sensor-server, run pcm --reset-pmu to restore default MSR counter states, re-enable kernel.nmi_watchdog=1 if desired, and unload the msr kernel module with modprobe -r msr.

Related Intel PCM Telemetry & Memory Profiling Guides

Explore our Intel Xeon Dedicated Server Hosting platform overview, alongside Verify Bare-Metal Boot Integrity Using Intel TXT and Boot Guard and Intel Hyper-Threading Isolation for Deterministic Realtime Apps.

Frequently Asked Questions

Does Intel PCM work inside a guest VM or container?

Full uncore IMC and UPI counters require bare-metal access on the host. Inside VMs, virtualized PMUs only expose limited core events.

Why does pcm-memory show zero bandwidth on some channels?

Zero bandwidth on specific IMC channels usually means DIMMs are not populated symmetrically across all 8 or 12 channels of that Xeon socket.

Is Intel PCM safe to run on production database servers?

Yes. Reading PMU counters does not alter execution pipelines, and at 2-second intervals overhead stays well below 1% of a single core.

What is the difference between pcm-numa and numastat?

numastat tracks OS page allocation policy, whereas pcm-numa measures actual hardware cache-line fetches crossing local vs. remote DRAM controllers.

How do I interpret PCIe Hit vs. Miss rates in pcm-pcie?

High PCIe Read/Write Hit counts mean Intel Data Direct I/O (DDIO) is placing 100GbE NIC or NVMe DMA buffers directly into L3 cache cleanly. High Miss rates indicate L3 thrashing or oversized ring buffers spilling DMA traffic out to DRAM, adding tens of nanoseconds per packet or I/O completion.

Diagnose Real Silicon Bottlenecks on Bare-Metal Xeon

Get full root access to hardware PMUs, MSRs, and uncore telemetry on dedicated Intel Xeon Scalable and Xeon 6 servers.

Configure Intel Xeon Bare-Metal Servers