You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Linux: reading smaps_rollup every 2 s costs large processes more than the resident set did #636
Since ADR-0119 a process's memory on Linux is its proportional set (Pss),
read from /proc/<pid>/smaps_rollup on every usage sample (every 2 s) for a
service tree without a usable cgroup (crates/devstack-proc/src/linux.rs).
For each read the kernel walks all of the process's memory mappings and page
tables under its memory-map lock. For large processes (.NET, the JVM, a Node
dev server with gigabytes mapped) that costs far more than the one field of statm read before, both in the daemon's CPU and as lock contention for the
measured process's own mmap/munmap.
To decide: read smaps_rollup less often than the cheap figures (every
10–30 s, statm in between, scaled by the last ratio), or only for the
largest processes of a tree, or keep it as it is and measure first. A
measurement on a node with a few .NET lanes would settle it.
Activity