GCS: periodically update cgroup limits#2827
Open
ryankeithster wants to merge 1 commit into
Open
Conversation
Signed-off-by: Ryan Keith (from Dev Box) <ryankeith@microsoft.com>
Contributor
|
This can have a couple of side-effects-
Instead of this, can we simply perform the update of pod cgroup as part of the actual Update request? Also, perhaps the Update request targeting pod-id should be explicitly used by caller to update the pod limit. I feel that GCS should not perform any implicit operation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Currently, pod cgroup memory limits are set once during guest boot, and then never changed, not even in the case of a memory resize event. This can result is containers being OOM killed even when they have not come close to exceeding the available memory. These changes add a task that runs every 60 seconds in the GCS that polls for memory changes and then adjusts the pod cgroup memory limit accordingly.
Changes
Add periodic cgroup resize task to (
cmd/gcs/main.go)New test coverage (
cmd/gcs/main_test.go)