Skip to content

How Does Garnet Handle Memory When It's Full? #626

Answered by Yiling-J
n-1701 asked this question in Q&A
Discussion options

You must be logged in to vote

Here are some details on Garnet's caching policies:

The data is stored in a hybrid log with 90% of the log marked as mutable (90% is the default, overridable using --mutable-percent).
When you add a new record R to the cache, it starts at the tail (in the mutable region). Updates to R in the mutable region happen "in place".
As other new records are added to the tail, the record R "travels" through the log, until it eventually reaches the immutable region in memory.
Updates in the immutable region will move the record back to the tail (simulating LRU with second chance, for writes).
Reads in the immutable region, however, will not by default move the record back to tail, so it will behav…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by badrishc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants