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 checks before adding custom config while validating #485

Merged
merged 3 commits into from
Oct 10, 2022
Merged

Add checks before adding custom config while validating #485

merged 3 commits into from
Oct 10, 2022

Conversation

raghu-nandan-bs
Copy link
Contributor

Fixes #484

Changes proposed on the PR:

  • add checks before appending customConfig to redis object's spec

@raghu-nandan-bs raghu-nandan-bs requested a review from a team as a code owner September 20, 2022 16:55
@raghu-nandan-bs
Copy link
Contributor Author

@ese @samof76 this is a trivial fix, we can evaluate using map[string]bool instead of slice to avoid nested for loops.
please share your opinions on this.

@samof76
Copy link
Contributor

samof76 commented Sep 23, 2022

@ese this fixes the memory bloat issue in the operator. Can you please merge this?

@Wouter0100
Copy link
Contributor

I also think this is closely related to the CPU issue I'm seeing, besides the fact that this also seems to increase network traffic.

When doing a tcpdump from a redis-operator pod, I see a lot of traffic. An increasing number of config set commands each sync is increasing.

@raghu-nandan-bs
Copy link
Contributor Author

updated PR with fixes suggested by @samof76

@Wouter0100 that is true, it incrementally makes more and more SetRedisCustomConfig calls each iteration. it is going to be a huge stress on redis instances especially if operator is long-running.

@samof76
Copy link
Contributor

samof76 commented Oct 5, 2022

@ese can you please review this?

@Wouter0100
Copy link
Contributor

I have deployed the fix into one of our production and staging env, and it clearly shows an improvement.

image

As you might be able to guess, I deployed it at around 2AM. The CPU was constantly increasing due to the load of sending more and more network traffic.

@samof76
Copy link
Contributor

samof76 commented Oct 7, 2022

@ese could you kindly review this?

@raghu-nandan-bs
Copy link
Contributor Author

Hi @ese please do review this; this should potentially fix couple of open issues: #410 and #386

@Wouter0100
Copy link
Contributor

Wouter0100 commented Oct 9, 2022

@samof76 / @raghu-nandan-bs if you want to deploy this fix to production, I have prepared a container for it.

wouter0100/redis-operator:485

@raghu-nandan-bs
Copy link
Contributor Author

@samof76 / @raghu-nandan-bs if you want to deploy this fix to production, I have prepared a container for it.

wouter0100/redis-operator:485

thanks @Wouter0100

@ese
Copy link
Member

ese commented Oct 9, 2022

Thanks! sorry for the delay to take a look.

@ese ese merged commit 8e8486e into spotahome:master Oct 10, 2022
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.

Validator adds redundant objects in every iteration
4 participants