Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal to add system.memory.slab #531

Closed
rogercoll opened this issue Mar 27, 2023 · 4 comments · Fixed by #1078
Closed

Proposal to add system.memory.slab #531

rogercoll opened this issue Mar 27, 2023 · 4 comments · Fixed by #1078
Assignees
Labels

Comments

@rogercoll
Copy link
Contributor

rogercoll commented Mar 27, 2023

What are you trying to achieve?

At the moment, the assumption that the sum of all metrics states should be equal to the limit (or total) is broken for the Linux system.memory provided by the hostmetrics receiver. The issue is that Slab memory is included as a memory state.

Related issues/PRs:
open-telemetry/opentelemetry-collector-contrib#14909
open-telemetry/opentelemetry-collector-contrib#7417
open-telemetry/opentelemetry-collector-contrib#19149

The proposed metric, "system.memory.slab", would track the amount of memory used by the kernel for Slab caching. This metric would be helpful for monitoring system memory usage on Linux-based systems, particularly in environments where Slab memory usage may be a significant contributor to overall memory usage.

Why not include it into system.memory? Because slab memory is already included in the used state provided by the receiver.

What did you expect to see?

system.memory.slab.usage
system.memory.slab.utilization

Attributes: reclaimable + unreclaimable

Additional context.

FreeBSD's systems uses a similar memory management technique called "uma" (Unified Memory Architecture), but I could not find the value on Gopsutils library, neither a generic name for all the systems. In Windows, the kernel uses a memory allocation technique called the "Non-paged pool" and the "Paged pool" to manage kernel memory.
Open to any other naming proposal, the most generic name I could think of to refer to Slab memory on any operating system is "object caching".

cc @rmfitzpatrick @dmitryax

@mx-psi
Copy link
Member

mx-psi commented Jan 18, 2024

Discussed on January 18th System Semantic Conventions WG meeting, we consider this a blocker since it affects the dimensions and metrics reported by the hostmetrics receiver.

@rogercoll
Copy link
Contributor Author

As the slab memory term is unique to the Linux kernel, I would follow the same approach as in #257 and add the system.linux.memory.slab metric. Also, remove the slab state from the system.memory.state values (similar to #522)

@mx-psi
Copy link
Member

mx-psi commented May 22, 2024

@rogercoll Could you file a PR for this? I think that makes sense to me indeed

@rogercoll
Copy link
Contributor Author

@rogercoll Could you file a PR for this? I think that makes sense to me indeed

Sure, I'll file a PR for this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

4 participants