~/talk

Reading memcg stats more efficiently

Talkat Linux Plumbers Conference 2025 · 2025-12-11..12-13· [observability]
name:JP Kobryn
links:none on file
slides:none on file

Periodic memcg reads spend most time formatting text so the team implements BPF kfuncs to iterate cgroups, map a binary data section to user space and fetch only needed fields, cutting kernel CPU time by about 90% kernel time reduction in benchmarks and eliminating expensive string conversion. Earlier per-subsystem rstat separation landed in 6.16 and saved over a million dollars saved by avoiding cross-subsystem flushes. A proposed CPU stat stream_interval uses a root async flush, sequence numbers and wait/notify so readers sleep and wake only when fresh data is ready.

AI-written summary · about

  1. 0:00Introduction to memcg stats
  2. 1:06Historical delays in stat reading
  3. 2:52Separation of cgroup stats
  4. 3:35String formatting overhead
  5. 5:39BPF-based stat fetching
  6. 8:13Reading stats in parallel
  7. 10:18Proposed paradigm shift
  8. 15:11Q&A on stat efficiency
~/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.