-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Use Caffeine instead of GuavaCache #17684
Comments
@terrymanu Can you assign it to me? |
Great, hope the feature can be finished soon |
Compare the performance of Caffeine and Guava Cache in ShardingSphereI tested the performance of caffeine and guava cache through ShardingSphere-Proxy, and put the test result as following : Test Environment
using Test Planuse $ sysbench oltp_read_only
--mysql-host=$host
--mysql-port=$port
--mysql-user=$user
--mysql-password=$password
--mysql-db=$db
--tables=1
--table-size=1000000
--report-interval=10
--time=300
--threads=100
--max-requests=0
--percentile=99
--mysql-ignore-errors="all"
--rand-type=uniform
--range_selects=off
--auto_inc=off prepare test the $ sysbench oltp_point_select
--mysql-host=$host
--mysql-port=$port
--mysql-user=$user
--mysql-password=$password
--mysql-db=$db
--tables=10
--table-size=1000000
--report-interval=5
--time=300
--threads=100
--max-requests=0
--percentile=99
--mysql-ignore-errors="all"
--range_selects=off
--rand-type=uniform
--auto_inc=off run Test Result1.point_select
2.read_write
3.write_only
as we can see, for the action contains "reading data" operation, the PR contains Caffeine will increase 1% performace to the Guava Cache. |
Vitess uses a Go cache that borrows from Caffeine’s design. Their query cache benchmark might be of interest to you. It defended from pollution which LRU suffers from. |
The guava cache usage is in
SQLStatementCacheBuilder
andParseTreeCacheBuilder
, please replace it as Caffeine, and test the performance.The text was updated successfully, but these errors were encountered: