-
Notifications
You must be signed in to change notification settings - Fork 75
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
Recommended gc settings? #76
Comments
Hey @kurtome !! First of all, thanks for the positive feedback, and sure, I will try to improve the docs a little bit more according to your suggestions. On the other hand, each scenario is different, I'd say there is no as a general rule about the what the config might be, but you're right, perhaps I can give you some advice:
I will include these tips in the docs anyway, and also I will change the examples using these config params with the recommended values. Thanks again, and I hope this info may help, otherwise just let me know, I'm glad to help! |
Thanks so much, this is very helpful! The only thing I'm confused about now is: If I'm always setting the I'm familiar with the concept of how garbage collection generations work generally, but it's a bit confusing how the generations interact with all the other options. Which values survive to the next generation and is a new generation required for expiration, etc. I think I have all the info I need for my project since the memory requirements are pretty relaxed, but mostly I'm just curious now :) |
That a good question, normally the Something to keep in mind is, the I hope this has been helpful, otherwise, just let me know, stay tuned! Thanks! |
Thanks for the great question and answers. If I understand this correctly then you can have a cache full of records that have expired but if they are never retrieved (to trigger eviction) or garbage collected they will just remain in the cache? TTL is then not a way to maintain cache size. It is handy for maintaining the integrity of the cache, but you have to set the GC values in the config to prevent the default behaviour which would be to grow without being cleaned up. |
Yes, that is correct, the real eviction mechanism is not the TTL, it is the generational process when the GC runs creating a new generation so that the oldest one is evicted (since the data in the oldest one is the least frequently used). Also, pushing a new generation is also triggered when the configured max size or memory is reached.
Exactly, for taking care of the cache size, you have to configure the GC values. Thanks! |
Added section "Eviction configuration" into the local adapter to cover GC/eviction settings, caveats, recommendations, etc. |
Hello,
I'm trying to build a basic distributed cache (mostly so in-memory data survives to the next node during rolling deployments in the cluster), and I'm confused about the
gc_interval
setting. I'm seeing in your getting started guide examples with agc_interval
of 1 day, is that normal? It seems very very long to me, but perhaps I'm way off base. The data I plan to cache is going to have attl
of 1 hour, and maybe updated repeatedly for a couple of hours before it goes stale.Generally, it would be super nice if if there were a little more "this is the config to use if you don't know what you're doing" type of documentation. Overall though, the docs have been fantastic, so thank you for all the detailed info!
The text was updated successfully, but these errors were encountered: