-
We're looking into FASTER for a LRU (Last Recently Used) cache. I've had a look at the samples but since they are not always very explicit about what they do I'm not sure that I have the full picture yet, so it would be helpful to get some answers to the following questions. Writing and reading with FASTER works already very well (including disk log, using a single log with
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
To control total log size, yes, you can look at
You can provide a custom compaction function ( If you do not need such a check for liveness, you can do the compaction more efficiently yourself as follows:
Other InfoYou can take a look at MemOnlyCache -- it operates as an LRU cache, but limited to main memory. It uses heap objects so needs to track heap sizes explicitly, but you do not need that with Another resource is the documentation on tuning starting here: https://microsoft.github.io/FASTER/docs/fasterkv-tuning/#computing-total-faster-memory |
Beta Was this translation helpful? Give feedback.
CopyReadsToTail.FromStorage
causes any reads from disk to be copied to the tail of log.CopyReadsToTail.FromReadOnly
causes any reads from either disk or the read-only region of memory to be copied to the tail of log. Latter is helpful when you do not want particularly hot items to "escape" to disk only to be immediately brought back to the tail of main mem…