[论文解读] Size-aware Sharding For Improving Tail Latencies in In-memory Key-value Stores
本文提出在内存键值存储中采用大小感知分片技术,通过将小请求和大请求隔离在独立的核心上,避免队首阻塞,从而降低尾部延迟。所实现的系统Minos利用硬件分发机制处理小数据项,并动态调整核心分配,与当前最先进的系统相比,在相同99百分位延迟下,吞吐量最高提升7.4倍。
This paper introduces the concept of size-aware sharding to improve tail latencies for in-memory key-value stores, and describes its implementation in the Minos key-value store. Tail latencies are crucial in distributed applications with high fan-out ratios, because overall response time is determined by the slowest response. Size-aware sharding distributes requests for keys to cores according to the size of the item associated with the key. In particular, requests for small and large items are sent to disjoint subsets of cores. Size-aware sharding improves tail latencies by avoiding head-of-line blocking, in which a request for a small item gets queued behind a request for a large item. Alternative size-unaware approaches to sharding, such as keyhash-based sharding, request dispatching and stealing do not avoid head-of-line blocking, and therefore exhibit worse tail latencies. The challenge in implementing size-aware sharding is to maintain high throughput by avoiding the cost of software dispatching and by achieving load balancing between different cores. Minos uses hardware dispatch for all requests for small items, which form the very large majority of all requests. It achieves load balancing by adapting the number of cores handling requests for small and large items to their relative presence in the workload. We compare Minos to three state-of-the-art designs of in-memory KV stores. Compared to its closest competitor, Minos achieves a 99th percentile latency that is up to two orders of magnitude lower. Put differently, for a given value for the 99th percentile latency equal to 10 times the mean service time, Minos achieves a throughput that is up to 7.4 times higher.
研究动机与目标
- 解决由于数据项大小可变导致的内存键值存储中高尾部延迟问题,其根源是队首阻塞。
- 在不依赖专用硬件的前提下,通过通用多核系统和多队列网卡,改善尾部延迟。
- 设计一种分片策略,将小请求与大请求分离,防止小请求因大请求而被延迟。
- 通过最小化软件分发开销并支持小请求与大请求处理模块之间的动态负载均衡,实现高吞吐量和低延迟。
提出的方法
- 通过将小请求和大请求分配到互不重叠的核心集合中,实现大小感知分片,从而消除小数据项的队首阻塞。
- 利用基于硬件的请求队列机制,直接将小请求分发至指定核心,避免对大多数请求进行软件分发。
- 通过轻量级控制环路在运行时动态确定小数据项与大数据项之间的大小阈值。
- 根据工作负载特征动态调整分配给小请求和大请求处理的核心数量,以维持负载均衡。
- 利用现有的多队列网卡硬件,实现小请求在硬件层面直接分发至特定核心。
- 与现有内存键值存储架构无缝集成,无需修改客户端协议或数据布局。
实验结果
研究问题
- RQ1在具有可变数据项大小的内存键值存储中,将小请求和大请求隔离在独立核心上,是否能显著降低尾部延迟?
- RQ2如何在不引入高软件分发开销的前提下,高效实现大小感知分片?
- RQ3在运行时,确定大小阈值和小请求/大请求工作负载核心分配的最优策略是什么?
- RQ4与传统的分片技术(如基于键哈希的分片或工作窃取)相比,大小感知分片在尾部延迟和吞吐量方面能提升多少?
主要发现
- 与最接近的竞争对手相比,Minos将99百分位延迟降低了两个数量级,实现了亚微秒级的尾部延迟。
- 在目标99百分位延迟为平均服务时间10倍的情况下,Minos的吞吐量比次优系统最高提升7.4倍。
- 对小请求使用硬件分发机制消除了软件分发瓶颈,实现了高吞吐量且延迟开销极低。
- 基于工作负载比例的动态核心分配机制,即使在工作负载变化时也能维持负载均衡,避免资源闲置或过载。
- 大小感知分片通过完全消除小请求的队首阻塞,性能优于工作窃取和基于键哈希的分片技术。
- 该方法在通用硬件上有效,仅需多队列网卡,无需专用加速器或RDMA支持。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。