Skip to main content
QUICK REVIEW

[Paper Review] Size-aware Sharding For Improving Tail Latencies in In-memory Key-value Stores

Diego Didona, Willy Zwaenepoel|arXiv (Cornell University)|Feb 2, 2018
Cloud Computing and Resource ManagementComputer Science41 references26 citations
TL;DR

This paper proposes size-aware sharding in in-memory key-value stores to reduce tail latency by isolating small and large requests on disjoint cores, preventing head-of-line blocking. Minos, the implemented system, uses hardware dispatch for small items and dynamically adjusts core allocation, achieving up to 7.4× higher throughput at the same 99th percentile latency compared to state-of-the-art systems.

ABSTRACT

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.

Motivation & Objective

  • Address the problem of high tail latency in in-memory key-value stores caused by head-of-line blocking due to variable item sizes.
  • Improve tail latency without requiring specialized hardware, focusing on commodity multi-core systems with multi-queue NICs.
  • Design a sharding strategy that separates small and large requests to prevent small requests from being delayed by large ones.
  • Achieve high throughput and low latency by minimizing software dispatch overhead and enabling dynamic load balancing between small and large request handlers.

Proposed method

  • Implement size-aware sharding by assigning small and large requests to disjoint sets of cores, eliminating head-of-line blocking for small items.
  • Use hardware-based request queueing to directly dispatch small requests to their designated cores, avoiding software dispatch for the majority of requests.
  • Dynamically determine the size threshold between small and large items at runtime using a lightweight control loop.
  • Adjust the number of cores allocated to small and large request processing based on workload characteristics to maintain load balance.
  • Leverage existing multi-queue NIC hardware to enable direct hardware-level dispatching of small requests to specific cores.
  • Integrate with existing in-memory key-value store architectures without requiring changes to client protocols or data layout.

Experimental results

Research questions

  • RQ1Can isolating small and large requests on separate cores significantly reduce tail latency in in-memory key-value stores with variable item sizes?
  • RQ2How can size-aware sharding be implemented efficiently without incurring high software dispatch overhead?
  • RQ3What is the optimal runtime strategy for determining the size threshold and core allocation between small and large request workloads?
  • RQ4To what extent can size-aware sharding outperform traditional sharding techniques like keyhash-based sharding or work stealing in terms of tail latency and throughput?

Key findings

  • Minos reduces 99th percentile latency by up to two orders of magnitude compared to the closest competitor, achieving sub-microsecond tail latencies.
  • For a target 99th percentile latency of 10× the mean service time, Minos achieves up to 7.4× higher throughput than the next best system.
  • The use of hardware dispatch for small requests eliminates software dispatch bottlenecks, enabling high throughput with minimal latency overhead.
  • Dynamic core allocation based on workload ratios maintains load balancing even under varying workloads, preventing underutilization or overload.
  • Size-aware sharding outperforms work-stealing and keyhash-based sharding by fully eliminating head-of-line blocking for small requests.
  • The approach is effective on commodity hardware, requiring only multi-queue NICs and no specialized accelerators or RDMA support.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.