Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Monitor rss, vsz, cpu usage and page faults #1028

Merged
merged 8 commits into from
Aug 30, 2018
Merged

Monitor rss, vsz, cpu usage and page faults #1028

merged 8 commits into from
Aug 30, 2018

Conversation

Dieterbe
Copy link
Contributor

@Dieterbe Dieterbe commented Aug 30, 2018

fix #1019
a bunch of useful new stats. interesting to see relation between cpu usage, GC, page faults and memory usage.
in addition to extra stats, no longer display bytes_sys by default anymore because it's not very useful.

before:
before
after:
after

Copy link
Member

@woodsaj woodsaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a procfs.Proc in both MemoryReporter and ProcessReporter and are calling proc.NewStat() on both. This seems very redundant.
I think you should just move the vsz and rss stats into the ProcessReporter.

Right now for metrics that are coming from the kernel as opposed to the internal go runtime you have

  • memory.process.virtual_memory_bytes.gauge64
  • memory.process.resident_memory_bytes.gauge64
  • process.minor_page_faults.counter64
  • process.major_page_faults.counter64
  • process.cpu_seconds_total.counter64

The rss/vsz and page_fault metrics are all related to memory usage of the process (not the runtime). It seems weird to have them named differently.
I think the metrics should just be

  • process.virtual_memory_bytes.gauge64
  • process.resident_memory_bytes.gauge64
  • process.minor_page_faults.counter64
  • process.major_page_faults.counter64
  • process.cpu_seconds_total.counter64

@Dieterbe
Copy link
Contributor Author

@woodsaj @replay PTAL kthx woop woop

@Dieterbe Dieterbe merged commit 54300e8 into master Aug 30, 2018
@Dieterbe Dieterbe deleted the monitor-rss branch September 18, 2018 08:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

report RSS
2 participants