-
Notifications
You must be signed in to change notification settings - Fork 38
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
3.x: TokenAwarePolicy fix bad perf of ReplicaOrdering.RANDOM #427
3.x: TokenAwarePolicy fix bad perf of ReplicaOrdering.RANDOM #427
Conversation
`ReplicaOrdering.RANDOM` shows up to `20%` worse throughput. Switching from `java.util.Random `to `ThreadLocalRandom` showed `20%` improvement.
fb59761
to
cc98fd0
Compare
Do we have a similar optimization potential with 4.x, or is this 3.x-specific? (did not look at the code yet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Looks like 4.x already uses |
Thanks @dkropachev, great work identifying the root cause. @juliayakovlev this should solve the issue you have with c-s 3.17.0, we will need a new c-s release. |
We need to release driver first. |
Of course. |
ReplicaOrdering.RANDOM
shows up to 20% worse throughput. Switching from java.util.Random toThreadLocalRandom
showed 20% improvement:After PR:
Before :
Fixes: scylladb/cassandra-stress#38