-
Notifications
You must be signed in to change notification settings - Fork 309
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
Enable large cache per column family #9127
Enable large cache per column family #9127
Conversation
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
.map( | ||
isLarger -> { | ||
if (isLarger) { | ||
LOG.info("Using larger cache for column {}", column.getId().toHexString()); |
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.
NIT: not sure if we need this as a info. It seems to be pretty low level and I belive we are happy that most users are gonna use default values anyway.
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.
This was just for testing purposes.
return new LRUCache(configuration.getCacheCapacity()); | ||
} | ||
}) | ||
.orElse(new LRUCache(configuration.getCacheCapacity())); |
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.
If getIsLargerCacheAvalilable()
is Optional.empty(), it means that we are on the default case, right? If we don't want to change the existing behaviour we should use the large capacity (matching the old value) when getIsLargerCacheAvalilable() is empty. Maybe I am missing something but it does look like to me that we would be changing every cache to 32MB.
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.
So long story short the default value used to be 8MB, which is low. We've changed to 128MB as a first step to get the db performing better and we're trying to narrow down what columns need larger caches, that being said the default should be something lower than 128MB, Rocks default is 32MB (as of release 8.x) which is what I believe we should be using by default as well, 8MB was set long time ago and I don't think is suitable anymore for the current needs.
I'm closing this PR because I haven't seen the benefits of using lower caches. |
PR Description
This PR adds an extra property to the KVStoreColumn to allow specifying if a certain column should use a larger cache, allowing us to provide larger caches only to the columns that require that.
Fixed Issue(s)
Fixes #9089
Documentation
doc-change-required
label to this PR if updates are required.Changelog