dynolog: collect memory-management counters from /proc/vmstat - #600
Open
abhiShedge wants to merge 1 commit into
Open
dynolog: collect memory-management counters from /proc/vmstat#600abhiShedge wants to merge 1 commit into
abhiShedge wants to merge 1 commit into
Conversation
Summary:
Adds `VmStatCollector` (`fbcode/dynolog/src/VmStatCollector.{h,cpp}`), a small
open-source collector that parses a selected set of `/proc/vmstat` fields. It
mirrors the existing `KvmStatsCollector` structure: each `readStats()` reads the
file, and `getDelta()` returns the per-read delta of each counter against the
previous snapshot.
All tracked fields are monotonically increasing since-boot counters, so
`VmStats::operator-` computes deltas and clamps negative results to 0 (counter
reset, or a field that appeared/disappeared across kernels). Fields absent on a
given kernel (for example `pgpromote_candidate` without NUMA tiering) never match
and stay 0.
Tracked fields: `pgscan_direct`, `pgscan_kswapd`, `pgsteal_kswapd`, `pageoutrun`,
`compact_stall`, `compact_fail`, `compact_success`, `compact_free_scanned`,
`compact_migrate_scanned`, `compact_isolated`, `pgmajfault`,
`workingset_refault_anon`, `workingset_refault_file`, `pgpromote_candidate`.
This is collection only; wiring into the daemon follows in later diffs.
Differential Revision: D116889620
|
@abhiShedge has exported this pull request. If you are a Meta employee, you can view the originating Diff in D116889620. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Adds
VmStatCollector(fbcode/dynolog/src/VmStatCollector.{h,cpp}), a smallopen-source collector that parses a selected set of
/proc/vmstatfields. Itmirrors the existing
KvmStatsCollectorstructure: eachreadStats()reads thefile, and
getDelta()returns the per-read delta of each counter against theprevious snapshot.
All tracked fields are monotonically increasing since-boot counters, so
VmStats::operator-computes deltas and clamps negative results to 0 (counterreset, or a field that appeared/disappeared across kernels). Fields absent on a
given kernel (for example
pgpromote_candidatewithout NUMA tiering) never matchand stay 0.
Tracked fields:
pgscan_direct,pgscan_kswapd,pgsteal_kswapd,pageoutrun,compact_stall,compact_fail,compact_success,compact_free_scanned,compact_migrate_scanned,compact_isolated,pgmajfault,workingset_refault_anon,workingset_refault_file,pgpromote_candidate.This is collection only; wiring into the daemon follows in later diffs.
Differential Revision: D116889620