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

Add resources requests and limits for all containers #327

Merged
merged 1 commit into from
Nov 17, 2022

Conversation

jpmcb
Copy link
Contributor

@jpmcb jpmcb commented Oct 28, 2022

Issue number:

Closes #240

Description of changes:

This patch provides the expected resource (cpu and memory) requests for each container along with some reasonable limits. These numbers were derived from several experiments (noted in #240 and in the process of creating this patch): the 10m CPU and 50Mi memory limit is due to components having spikes in resource requirements when nodes rotate and pods are re-scheduled (during upgrade scenarios where the agent, api-server, and/or controller exist on the upgrading node). The request delimiter allows for more resources to be consumed (if they are available on the node) and should be safe since we drain the nodes before doing an upgrade. Having too tight of resource limits will cause the system's kernel to kill the process, so these are intentionally forgiving.

TODO:

  • documentation for consumers of brupop

Testing done:

Several integration tests were run with the metric-server and kubernetes dashboard also installed to monitor resource utilization.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@jpmcb
Copy link
Contributor Author

jpmcb commented Oct 31, 2022

Force pushed to add documentation ✏️

This PR is ready to go, but leaving in draft for now so we don't get in the way of the upcoming v1.0.0 release

Signed-off-by: John McBride <jpmmcb@amazon.com>
@jpmcb
Copy link
Contributor Author

jpmcb commented Nov 3, 2022

Marking ready for review now that 1.0.0 is out and force pushed to address a merge conflict in the README.md documentation!

@jpmcb jpmcb marked this pull request as ready for review November 3, 2022 16:19
@jpmcb
Copy link
Contributor Author

jpmcb commented Nov 3, 2022

Final verification experiment:

  1. Installed the kubernetes metrics server
  2. Installed the kubernetes dashboard with an admin user
  3. Ran integration tests off this patch using the modified yaml manifest and the default 1.0.0image.

Results

Screen Shot 2022-11-03 at 2 52 05 PM

API server

Memory below 3Mi
CPU at 1.00 M

Controller

Memory stable ~2.75 Mi with small spikes below 3 Mi
CPU at 1.00 M or lower

Agents

Memory below 7 Mi
CPU at 1.00 M with small spikes up to ~3 M during node updates

@jpmcb jpmcb merged commit c8d1370 into bottlerocket-os:develop Nov 17, 2022
@jpmcb jpmcb deleted the resources-limits branch November 17, 2022 23:26
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.

How many cpu/memory does brupop use
3 participants