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

Set the memory and open files maximums based on the host #1225

Merged
merged 2 commits into from
Apr 7, 2016

Conversation

paulbellamy
Copy link
Contributor

Fixes #1149

Now the max on Memory, and Open Files metrics are set based on the host.

However, it seems like the sparklines don't use the max value? @davkal @foot ?

@foot
Copy link
Contributor

foot commented Apr 5, 2016

I think so... 2x checking.

On Tuesday, April 5, 2016, Paul Bellamy [email protected] wrote:

Fixes #1149 #1149

Now the max on Memory, and Open Files metrics are set based on the host.

However, it seems like the sparklines don't use the max value? @davkal

https://github.com/davkal @foot https://github.com/foot ?

You can view, comment on, or merge this pull request online at:

#1225
Commit Summary

  • Set the memory and open files maximums based on the host

File Changes

Patch Links:


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1225

@foot
Copy link
Contributor

foot commented Apr 6, 2016

You are right, we're taking the max of the samples I think, which might be more appropriate for sparklines? I will try w/ real max soon.

But this works great on MoC! Awesome stuff, LGTM from a behavioural POV

// MaxMemory is the type for the function used to fetch the hosts' max memory.
type MaxMemory func() (uint64, error)

// OpenFilesLimit is the type for the function used to fetch the hosts' open files limit.

This comment was marked as abuse.

This comment was marked as abuse.

process memory limit is not cgroup-aware
@paulbellamy paulbellamy force-pushed the 1149-more-meaningful-metrics-max-mmmmmmm branch from 1a99bfc to b970b05 Compare April 6, 2016 12:08
@paulbellamy
Copy link
Contributor Author

Ok, I updated this to get per-process File limit and memory limits. Unfortunately, the memory limits are not cgroup aware (because the /proc/<pid>/stat is not cgroup aware). Apparently to do that you have to parse the cgroups and mount files, and dig through the cgroup file system, so I'll create a separate issue for that.

Now that we have the real max!! \o/
@foot
Copy link
Contributor

foot commented Apr 7, 2016

Updated js code to use openfiles.max.

Proc -> Container memory doesn't seem to "add up", e.g.
sum(proc.mem_usage) > container.mem_usage.
But I don't think thats a regression!

LGTMTM.

@foot foot assigned paulbellamy and unassigned foot Apr 7, 2016
@paulbellamy paulbellamy merged commit bfb65cb into master Apr 7, 2016
@paulbellamy paulbellamy deleted the 1149-more-meaningful-metrics-max-mmmmmmm branch April 7, 2016 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants