12–14 Sept 2022
Europe/Dublin timezone

cgroup rstat's advanced adoption

14 Sept 2022, 11:45
25m
"Herbert" (Clayton Hotel on Burlington Road)

"Herbert"

Clayton Hotel on Burlington Road

262
Containers and Checkpoint/Restore MC Containers and Checkpoint/Restore MC

Speaker

Michal Koutný

Description

rstat is a framework how generic hierarchical stats collection is implemented
for cgroups.
It is light on the writer (update) side since it works with per-cgroup per-cpu
structures only (mostly).
It is quick on the reader side since it aggregates only cgroups active since
the previous read in a given subtree.
It is used for accounting CPU time on the unified hierachy, blkcg and memcg stats.
Readers of the first two are user space queriers, the memcg stats are used
additionally by MM code internally and hence memcg builds some optimizations
above rstat. Despite that there were reports of readers being negatively
affected by occasionally too long stats retrieval.
This is suspected to be caused by some shared structures within rstat and their
effect may get worse as more subsystems (or even BPF) start building upon
rstat.

This talk describes how rstat currently works and then analyzes time complexity
of updates and readings depending on number of active use sites.
The result could already be a base for discussion and we will further consider
some approaches to keep rstat durations under control with more new adopters
and also how such methods affect error of collected stats (when tolerance is
limited, e.g. for the VM reclaim code).

This presentation and discussion will fit in a slot of 30 minutes (give or take).

I agree to abide by the anti-harassment policy Yes

Primary author

Michal Koutný

Presentation materials

Diamond Sponsor

Platinum Sponsors





Gold Sponsors




Silver Sponsors





Speaker Gift Sponsor

Catchbox Sponsor

Video Recording Sponsor

Livestream Sponsor

T-Shirt Sponsor

Conference Services Provided by