-
Notifications
You must be signed in to change notification settings - Fork 298
DEV: add info about new eviction policies (allkeys-lrm & volatile-lrm) #2638
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: feat-ros-8.6
Are you sure you want to change the base?
Conversation
|
|
||
| ## LRM eviction {#lrm-eviction} | ||
|
|
||
| Starting with Redis 8.6, the Least Recently Modified (LRM) eviction mode is available. LRM is similar to LRU but only updates the timestamp on write operations, not read operations. This makes it useful for evicting keys that haven't been modified recently, regardless of how frequently they are read. |
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.
mode --> policies
| - Your application has a clear distinction between read-heavy and write-heavy workloads | ||
| - You want to evict stale data that hasn't been updated, regardless of read activity | ||
|
|
||
| To configure the LRM mode, the following policies are available: |
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.
avoid "mode"
|
|
||
| This distinction makes LRM particularly useful in scenarios where: | ||
|
|
||
| - You want to preserve frequently read data, even if it's not being modified |
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 one is LRU
| - `allkeys-random`: Evict keys at random. | ||
| - `volatile-lru`: Evict the least recently used keys that have the `expire` field | ||
| set to `true`. | ||
| - `volatile-lrm`: Evict the least recently modified keys that have the `expire` field |
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.
Please fix the 4 volatile policies:
instead of "that have the expire field set to true" ---> "that has an associated expiration (TTL)"
I'm not aware of any such field (and if there is - it is an internal implementation details)
|
|
||
| To configure the LRM mode, the following policies are available: | ||
|
|
||
| * `volatile-lrm` Evict using LRM among the keys with an expire set. |
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.
expire set --> associated expiration (TTL)
andy-stark-redis
left a comment
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.
Language LGTM
No description provided.