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

Lower memory usage of commons-operator #154

Open
lfrancke opened this issue Apr 4, 2023 · 4 comments
Open

Lower memory usage of commons-operator #154

lfrancke opened this issue Apr 4, 2023 · 4 comments

Comments

@lfrancke
Copy link
Member

lfrancke commented Apr 4, 2023

Currently the memory required by the commons-operator scales with the amount of Pods in a K8s cluster.
This can lead to more or less unbounded memory usage.

We need to investigate how we can limit this.
One possibility to limits this is by leveraging the work that will be done in stackabletech/issues#188

@nightkr
Copy link
Member

nightkr commented May 2, 2023

After some investigation, this largely comes down to two sources:

  1. Watcher resync causes memory usage burst kube-rs/kube#1209
  2. We cache a lot of data about each Pod that we don't really need, we could whittle that down during the data fetch/watch rather than keep it around indefinitely (related to Allow users to exclude managedFields from the Controller cache kube-rs/kube#1210, but we could go much further)

@nightkr nightkr self-assigned this May 2, 2023
@nightkr nightkr moved this to Refinement: In Progress in Stackable Engineering May 2, 2023
@nightkr nightkr removed their assignment May 2, 2023
@clux
Copy link

clux commented Sep 8, 2023

There are some docs on this now from kube in https://kube.rs/controllers/optimization/. in particular;

  • pruning techniques (for say managedFields or .status store contributions)
  • using metadata_watcher (also limits IO)
  • pagination (now default)

should all help reduce the memory contribution of cached objects - although it will still generally scale with num_objects in your stores.

@nightkr
Copy link
Member

nightkr commented May 3, 2024

@sbernauer
Copy link
Member

kube 0.92.0 also seems to have nice memory improvements: https://kube.rs/blog/2024/06/11/watcher-memory-improvements/ :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants