~/talk

CPU Hardware Counters

Talkat PromCon EU 2025 · 2025-10-21..10-22· [observability, web-performance]
slides:none on file

CPU chips expose a PMU with cache, branch and TLB counters accessible via Linux perf but cloud VMs typically hide them so you need a metal/whole‑chip instance and to lower /proc/sys/kernel/perf_event_paranoid or run node_exporter with -collector.perf to see OS counters; node_exporter shows OS not hardware counters, cAdvisor requires building from source and Intel’s 333‑page event list hex codes to request many events. Concrete wins: 1,500 TLB entries cover ~6MB with 4KB pages, switching to transparent huge pages (2MB) cuts TLB misses and startup from ~64s to ~57s (~10%).

AI-written summary · about

  1. 0:00CPU hardware counters intro
  2. 1:26What are CPU counters
  3. 6:31PMU and Perf subsystem
  4. 10:30VMs and hardware counters
  5. 13:19Bare metal counter access
  6. 17:20cAdvisor counter challenges
  7. 19:19TLB performance impact
  8. 23:39Huge pages for TLB misses
  9. 25:06Performance gains example
  10. 27:13Q&A on Windows counters
  11. 28:18Optimizing with counter data
  12. 30:24NUMA and security use cases
  13. 31:07Virtual PMU limitations
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.