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 don't emit max_memory #10838

Closed
tgross opened this issue Jul 1, 2021 · 5 comments · Fixed by #11490
Closed

metrics don't emit max_memory #10838

tgross opened this issue Jul 1, 2021 · 5 comments · Fixed by #11490

Comments

@tgross
Copy link
Member

tgross commented Jul 1, 2021

We emit the allocated memory for tasks but not the max_memory for oversubscription, which means you can't use the metrics endpoint to track how close you are to OOM when oversubscribed.

cc @angrycub

@danishprakash
Copy link
Contributor

@tgross is this something that a new contributor can pick up? would like to work on this.

@tgross
Copy link
Member Author

tgross commented Jul 6, 2021

Hi @danishprakash! It should be reasonably approachable. We emit the metrics for allocated memory in setGaugeForAllocationStats so it should be similar to that. Thanks!

@tgross tgross added this to Needs Triage in Nomad - Community Issues Triage via automation Jul 6, 2021
@danishprakash
Copy link
Contributor

@tgross thanks for the response. I ran into some issues while running make test which looks like something to do with my system. (I followed the instructions over at contributing though). Anyway, I've pushed the changes here, basically just returning MemoryMaxMB as part of ComparableResources struct and then exporting it as max_memory gauge.

@tgross tgross moved this from Needs Triage to Needs Roadmapping in Nomad - Community Issues Triage Nov 9, 2021
@tgross
Copy link
Member Author

tgross commented Nov 9, 2021

@danishprakash just wanted to follow-up on this one... the branch you have up looks reasonable to me. If you're interested in opening a PR we could try to get that merged in. I realize it's been a while though, so if you don't have time I'd can pick it up.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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 Oct 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging a pull request may close this issue.

2 participants