A key-value cache is a key component of many services to provide low-latency and high-throughput data accesses to a huge amount of data. To improve the end-to-end performance of such services, a key-value cache must achieve a high cache hit ratio with high throughput. In this paper, we propose a new cache replacement algorithm, multi-step LRU, which achieves high throughput by efficiently exploiting SIMD instructions without using per-item additional memory (LRU metadata) to record information such as the last access timestamp. For a small set of items that can fit within a vector register, SIMD-based LRU management without LRU metadata is known (in-vector LRU). It remembers the access history by reordering items in one vector using vector shuffle instruction. In-vector LRU alone cannot be used for a caching system since it can manage only few items. Set-associative cache is a straightforward way to build a large cache using in-vector LRU as a building block. However, a naive set-associative cache based on in-vector LRU has a poorer cache hit ratio than the original LRU although it can achieve a high throughput. Our multi-step LRU enhances naive set-associative cache based on in-vector LRU for improving cache accuracy by taking both access frequency and access recency of items into account while keeping the efficiency by SIMD instructions. Our results indicate that multi-step LRU outperforms the original LRU and GCLOCK algorithms in terms of both execution speed and cache hit ratio. Multi-step LRU improves the cache hit ratios over the original LRU by implicitly taking access frequency of items as well as access recency into account. The cache hit ratios of multi-step LRU are similar to those of ARC, which achieves a higher a cache hit ratio in a tradeoff for using more LRU metadata.
翻译:关键值缓存是许多服务的关键组成部分, 以提供低延迟和高通量数据访问大量数据。 为改善此类服务的端对端性能, 关键值缓存必须达到高缓存触碰率。 在本文中, 我们提出一个新的缓存替换算法, 多步骤 LRU, 通过高效利用SIMMD 指令实现高通量, 而不使用每件额外存储量( LRU 元数据) 来记录信息, 如上次存取时间戳。 对于能够安装在矢量登记册内的一小组项目, 以 SIMD 为基础的 LRU 管理, 没有 LRU 元数据。 关键值缓存必须记住获取历史, 使用矢量的缓存率, 以矢量递增速度计算, 以 RRRRRRR 的超量存取价。 设置一个快速的缓存点, 以RRRRRRRR IM, 以RR RR RR RR 的原始存算算算法, 以RRRRRRRRRRRRRRR, 以先先先先制, 更低的RRRLRRRRRRR 。 以先先制, 路路路路, 以先先制, 路路路路取一个更先先先制, 路, 路, 路路, 路路, 路路, 路路, 路, 更慢路路路路路, 路路, 路, 路, 更慢路, 更慢路, 路, 路, 路, 路, 路, 路, 路, 路,以先制,以RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR, 。