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

Filter what objects we cache from the API #1549

Merged
merged 4 commits into from
Feb 6, 2024
Merged

Conversation

mkuratczyk
Copy link
Collaborator

@mkuratczyk mkuratczyk commented Jan 30, 2024

With 10000 edit ConfigMaps and 10000 Services in a cluster, that have nothing to do with RabbitMQ, here is the before:

(pprof) top
Showing nodes accounting for 47.56MB, 93.15% of 51.06MB total

and after:

(pprof) top
Showing nodes accounting for 5255.83kB, 100% of 5255.83kB total

Basically, memory usage should only depend on the number of RabbitMQ clusters currently deployed, not on the number and size of any unrelated objects.

This closes #1537

@mkuratczyk mkuratczyk force-pushed the reduce-memory-usage branch 2 times, most recently from 46ff530 to d970cf8 Compare January 31, 2024 16:44
@Zerpet Zerpet self-requested a review January 31, 2024 16:48
Copy link
Collaborator

@Zerpet Zerpet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm super happy we figured this out!

main.go Outdated Show resolved Hide resolved
With 10000 small ConfigMaps and 10000 Services in a cluster,
that have nothing to do with RabbitMQ, here is the before:
```
(pprof) top
Showing nodes accounting for 47.56MB, 93.15% of 51.06MB total
```

and after:
```
(pprof) top
Showing nodes accounting for 5255.83kB, 100% of 5255.83kB total
```
Now that we cache only specific objects from the API,
we don't see TLS secrets that don't have the
"app.kubernetes.io/part-of=rabbitmq" label.

To check if the desired secrets exist, use the APIReader
which checks the API directly.
The Operator part is not very interesting when it is "unchanged"
The error part is the most interesting, but wasn't present at all
@mkuratczyk mkuratczyk marked this pull request as ready for review February 1, 2024 16:36
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.

2 participants