Re:Random notes on improving the Redis LRU algorithm
by jonstewart on Friday July 29, 2016 @11:00AM
(#12187255)
The problem is that then you have K caching algorithms in use, and the memory used by K-1 of them would be better used if given to the winner. The more sophisticated algorithms that use a combination of recency and frequency, like LIRS and ARC, will adapt to most workloads. 2Queues does better than LRU at not letting sequential reads evict frequently accessed data and it's pretty simple to implement, but, in my experience, LIRS seems to evict low probability data faster, letting you use more memory for higher probability data.
Regardless, if you have instrumentation, you can do a lot of testing and offline analysis.
Regardless, if you have instrumentation, you can do a lot of testing and offline analysis.