用于改善内存中键值存储的尾部延迟的大小感知分片
Size-aware Sharding For Improving Tail Latencies in In-memory Key-value Stores
摘要:
本文介绍了大小感知分片的概念,以改善内存中键值存储的尾部延迟,并描述了其在Minos键值存储中的实现。尾部延迟在具有高扇出比的分布式应用程序中至关重要,因为总响应时间由最慢的响应决定。大小感知分片根据与键相关联的项的大小将对键的请求分发到核心。特别地,对小项目和大项目的请求被发送到核的不相交子集。大小感知分片通过避免行首阻塞(head-of-line blocking)来改善尾部延迟,在行首阻塞中,对小项目的请求排在对大项目的请求之后。其他不知道大小的分片方法,如基于密钥散列的分片、请求分派和窃取,都不能避免行首阻塞,因此表现出更差的尾部延迟。实现大小感知分片的挑战是通过避免软件调度的成本和通过实现不同核之间的负载均衡来保持高吞吐量。Minos对所有小物品请求使用硬件调度,这些小物品占所有请求的绝大多数。它通过调整处理大小项请求的核心数量,使之适应它们在工作负载中的相对存在,从而实现负载均衡。我们将Minos与三种最先进的内存KV存储设计进行比较。与其最接近的竞争对手相比,Minos实现了第99百分位的延迟,最多低两个数量级。换句话说,对于等于平均服务时间10倍的第99百分位延迟的给定值,Minos实现了高达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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。