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
New caching strategies #34651
New caching strategies #34651
Conversation
d6ee34a
to
3b93067
Compare
…guration oache policiesf
… default pcahce policy SLRU
…greater than max_elements_size
The following figures are a comparison of Segmented LRU and basic LRU caching strategies. The main difference between these strategies is that SLRU save frequent elements in a special place and they don't remove them from a cache after full scanning of a table. For tests were used queries from this benchmark https://clickhouse.com/docs/en/getting-started/example-datasets/star-schema/. The first 5 queries on the graphic are Q1.1 with different years, the next 5 queries are exactly the same, so there is a 1.0 hitrate (proportion of reading data from the cache to all reading data). After there is a Q2.1 query that scans all table and we can see that hitrate decrease there. After we run 10 Q1.1 queries in the same way as in the previous one. We can see that for SLRU hitrate increase faster than for LRU. Also if reading from disk was a bottleneck part then the graphic of time for these queries looks like on the second picture, thereafter a big scan we can see that LRU works slower than SLRU for some time. In other cases, SLRU and LRU show exactly similar results as in the first half of graphics. |
Changelog category:
Changelog entry:
Add SLRU cache policy for uncompressed cache and marks cache.