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

[Feature] Prevent overcommitting memory #135

Open
alexellis opened this issue Dec 3, 2020 · 0 comments
Open

[Feature] Prevent overcommitting memory #135

alexellis opened this issue Dec 3, 2020 · 0 comments

Comments

@alexellis
Copy link
Member

alexellis commented Dec 3, 2020

Expected Behaviour

If a user has a 1GB node and sets memory limits of 100Mi for 10 containers, then that should prevent any new containers from being deployed i.e. the 11th and 12th which would overcommit the memory, and possibly cause an OOM somewhere.

Current Behaviour

You can continue to deploy containers beyond the memory available on the the host

Possible Solution

Read the available memory, minus a set amount of headroom for the system, and limit according to the total memory reserved by all deployed containers.

I.e.

1000MB total
System headroom = 500MB

Available = 1000-500 = 500MB

nodeinfo1 - 250MB
nodeinfo2 - 250MB

Deploying nodeinfo3 with a limit of 100MB will fail due to the sum of (nodeinfo1 - nodeinfo2 - headroom) == 0

@alexellis alexellis changed the title [Feature [Feature] Prevent overcommitting memory Dec 3, 2020
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

No branches or pull requests

1 participant