elastic / elastic/opentelemetry-lib
[Hostmetrics: Memory] Difference in values of cached memory
- Dominant language
- Go
- Stars
- 5
- Forks
- 18
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 7
Description
There is a difference in the values being fetched for cached memory.
OTEL reports this metric using system.memory.usage, attribute: cached. On checking the logic, it fetches the cached value from /proc/meminfo and also add the reclaimed memory to it.
https://github.com/shirou/gopsutil/blob/master/mem/mem_linux.go#L297
System Integration: Uses the cached memory directly from /proc/meminfo.
The difference in values seen is exactly equal to the reclaimed memory:
Eg:
[OTEL] system.memory.usage, attr: cached= 6681276416
[OTEL] system.memory.usage, attr: slab_reclaimable = 372350976
[System Integration] = system.memory.cached = 6308524032 = 6681276416-372350976
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.