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

Use physical memory for stats of kubelet #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adam-jian-zhang
Copy link
Owner

@adam-jian-zhang adam-jian-zhang commented Aug 30, 2022

This is a hack to make kubelet use physical memory for calculate
memory usage of the node without changing the data structure which
only accounts private working set and commited pages.
We patch the second to include the difffrom phsical available
memory to the sum of private working set and commited pages.
After the change,
memory usage = memoryPrivWorkingSetBytes + memoryCommittedBytes
= totalPhys - AvailPhys

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@YanzhaoLi
Copy link

Looks like a fix for kubernetes#112111

This is a hack to make kubelet use physical memory for calculate
memory usage of the node without changing the data structure which
only accounts private working set and commited pages.
We patch the second to include the difffrom phsical available
memory to the sum of private working set and commited pages.
After the change,
memory usage = memoryPrivWorkingSetBytes + memoryCommittedBytes
	     = totalPhys - AvailPhys
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.

2 participants