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

metrics: added mapped_file metric #11500

Merged

Conversation

deblasis
Copy link
Contributor

This PR should address #10067 and trivially adds mapped_file in DockerStatsToTaskResourceUsage.

It sounds like that the mapped_file metric is needed in here as well:

https://github.com/deblasis/nomad/blob/b4a230d2cf57ff7a18c1e3bca006a9a7c4b284ca/drivers/shared/executor/executor_linux.go#L386

I had a look at runc code and it seems that the metric is pulled from the memory.stat file, in compliance with https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt
so I thought it was a good thing to add it in LibcontainerExecutor as well.

If you think it's a welcome addition and tests are needed, I would like a pointer on how to test that as well.

Cheers

- added `mapped_file` in DockerStatsToTaskResourceUsage
- added `mapped_file` in LibcontainerExecutor.handleStats

Fixes hashicorp#10067

Signed-off-by: Alessandro De Blasis <[email protected]>
Signed-off-by: Alessandro De Blasis <[email protected]>
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

Hi @deblasis! Sorry for the delay on reviewing this. LGTM!

@tgross tgross merged commit 7593975 into hashicorp:main Jan 10, 2022
@tgross tgross added this to the 1.2.4 milestone Jan 10, 2022
@github-actions
Copy link

github-actions bot commented Nov 4, 2022

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants