22 ms·
Facebook also talked about something similar back in 2014 for caching of people's photos. https://engineering.fb.com/2014/02/27/web/an-analysis-of-facebook-pho
by yrral 5y ago
Facebook also talked about something similar back in 2014 for caching of people's photos.
https://engineering.fb.com/2014/02/27/web/an-analysis-of-facebook-photo-caching-2/ https://engineering.fb.com/2014/02/27/web/an-analysis-of-fac...
http://www.cs.cornell.edu/~qhuang/papers/sosp_fbanalysis.pdf http://www.cs.cornell.edu/~qhuang/papers/sosp_fbanalysis.pdf
> Quadruply-segmented LRU. Four queues are maintained at levels 0 to 3. On a cache miss, the item is inserted at the head of queue 0. On a cache hit, the item is moved to the head of the next higher queue (items in queue 3 move to the head of queue 3). Each queue is allocated 1/4 of the total cache size and items are evicted from the tail of a queue to the head of the next lower queue to maintain the size invariants. Items evicted from queue 0 are evicted from the cache.