-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Limit Redis memory usage of system RAM #3907
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
base: master
Are you sure you want to change the base?
Changes from 5 commits
9007d31
5333261
e15c731
8df1aea
8ef00ee
8360839
3d3f880
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
# maxmemory 0 # Unlimited memory usage | ||
# maxmemory 15gb # Limit memory usage to 15 GB | ||
|
||
maxmemory 0 | ||
maxmemory 2gb | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is absolutely crucial for https://redis.io/docs/latest/develop/reference/eviction/ :
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would argue that 2gb is not enough. I would prefer 8gb of 12gb. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 8 or 12g requires a large and more expensive instance. We have a relatively busy instance and 2g works fine for us. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Surprisingly that's not how Sentry uses Redis. Memcached is being used just for caching. But Redis, it's being used as (1) lock contention store, (2) storing uptime monitor configuration, (3) storing project configs that is used for validating incoming SDK envelopes, and much more that I can't remember. These are not really "caches" for me though. Although, I understand that this shouldn't how you use Redis, but it's a live software anyway, we can only work around it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are those use cases subject to cache eviction? |
||
|
||
# This setting determines how Redis evicts keys when it reaches the memory limit. | ||
# `allkeys-lru` evicts the least recently used keys from all keys stored in Redis, | ||
|
Uh oh!
There was an error while loading. Please reload this page.