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

ui: fix zero memory utilization bug on systems using cgroups v2 #13670

Merged
merged 6 commits into from
Aug 3, 2022

Conversation

shoenig
Copy link
Member

@shoenig shoenig commented Jul 11, 2022

A quick band-aid fix for #13023. On systems using cgroups v2, the MemoryStats struct no longer reports .RSS, but rather .Usage. Kind of just assuming they mean the same thing.

The fix here is to just check if .Usage exists and if so use that, otherwise fallback to the .RSS field.

"MemoryStats": {
	"RSS": 0,
	"Cache": 0,
	"Swap": 0,
	"MappedFile": 0,
	"Usage": 98656256,
	"MaxUsage": 0,
	"KernelUsage": 0,
	"KernelMaxUsage": 0,
	"Measured": [
		"Cache",
		"Swap",
		"Usage"
	]
},

@philrenaud @ChaiWithJai

Fixes #13023

@github-actions
Copy link

github-actions bot commented Jul 11, 2022

Ember Asset Size action

As of d1e14f1

Files that got Bigger 🚨:

File raw gzip
nomad-ui.js +84 B +10 B

Files that stayed the same size 🤷‍:

File raw gzip
vendor.js 0 B 0 B
nomad-ui.css 0 B 0 B
vendor.css 0 B 0 B

@github-actions
Copy link

github-actions bot commented Jul 11, 2022

Ember Test Audit comparison

main d1e14f1 change
passes 1380 1380 0
failures 2 2 0
flaky 0 0 0
duration 000ms 000ms -000ms

This PR fixes a bug where allocation memory usage is always zero on
Linux systems where the kernel is configured to use cgroups v2.
@shoenig shoenig changed the title WIP: demonstrate memory data problem on cgroups v2 ui: fix zero memory utilization bug on systems using cgroups v2 Aug 2, 2022
@shoenig shoenig added this to the 1.3.3 milestone Aug 2, 2022
@shoenig
Copy link
Member Author

shoenig commented Aug 3, 2022

@philrenaud
Copy link
Contributor

Thanks @shoenig , digging into that test now

@github-actions
Copy link

github-actions bot commented Dec 3, 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 Dec 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/1.3.x backport to 1.3.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resource Utilization - Memory not showing / 0 bytes
2 participants