-
Notifications
You must be signed in to change notification settings - Fork 985
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
Redis cluster refresh of large clusters keeps I/O threads busy #2045
Comments
In my actual environment, I use both Should I use only |
Ah, it seems good to use |
It would be possible to use a different scheduler in |
I had this problem when I upgraded from lettuce5 to lettuce6. After investigating the cause, it was determined that it was due to |
Feel free to submit a pull request to use |
OK. I'll try to submit PR later. |
Original pull request: redis#2048.
Use thenApplyAsync(…) instead of supplyAsync(…) to reduce allocations. Adopt tests. Original pull request: redis#2048.
BugReportCurrent Behavior
For large redis cluster, using enablePeriodicRefresh causes serious performance problems.
The processing time required for
DefaultClusterTopologyRefresh.getNodeSpecificViews
increases in proportion to the cluster size.Unfortunately, this is executed in the NIO event loop thread.
See the repository README below for details.
https://github.com/be-hase/lettuce-with-large-cluster
Input Code
I have prepared the code that can reproduce this problem.
https://github.com/be-hase/lettuce-with-large-cluster
Expected behavior/code
Even if we use enablePeriodicRefresh with large redis cluster, the performance will not deteriorate.
Environment
Possible Solution
Idea 1
Stop running
DefaultClusterTopologyRefresh.getNodeSpecificViews
on the NIO event loop.I won't go into details, but if I customized
DefaultClusterTopologyRefresh
and ran it on another thread, theperformance improved.
My team is considering adopting this method as a workaround.
Idea 2
Looking at the previous framegraph, it seems that the overhead is large in the processing using BitSet.
Why not change to a more primitive method like
boolean[]
?However, I'm not sure if the performance will improve.
Additional context
NONE
The text was updated successfully, but these errors were encountered: