knative / operator

Combined operator for Knative.
Apache License 2.0
179 stars 98 forks source link

Perf: add resource limits to operators. #1767

Closed kycheng closed 2 months ago

kycheng commented 2 months ago

I think increasing the resource limit is a better best practice to prevent pods from using resources infinitely (this is not currently happening.)

Based on the monitoring data of our environment, I set the request and limit values to 100m/100Mi

image

Proposed Changes

Release Note

NONE
knative-prow[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kycheng Once this PR has been reviewed and has the lgtm label, please assign maximilien for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/knative/operator/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
linux-foundation-easycla[bot] commented 2 months ago

CLA Signed


The committers listed above are authorized under a signed CLA.

knative-prow[bot] commented 2 months ago

Welcome @kycheng! It looks like this is your first PR to knative/operator 🎉

knative-prow[bot] commented 2 months ago

Hi @kycheng. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
houshengbo commented 2 months ago

What is the reason for adding resource limit? Why is it just 100?

kycheng commented 2 months ago

What is the reason for adding resource limit? Why is it just 100?

Sorry I forgot to add the reason.

I think increasing the resource limit is a better best practice to prevent pods from using resources infinitely (this is not currently happening.)

100 From the monitoring data of our operating environment, it seems that 100 is enough.

image

ReToCode commented 2 months ago

100 From the monitoring data of our operating environment, it seems that 100 is enough.

This might be true for your environment, but not for everyones. I'd argue that this is a concern each operator has to take care of and figure out the correct values for their installation.