logo

How We Reduced Write Latency in TiKV?

2021-10-15

Authors:   Liqi Geng


Summary

The presentation discusses the optimization of the rough store layer in TechAV to reduce write latency and tail latency of store duration.
  • The rough store layer in TechAV uses rough consensus algorithm to make the system fault-tolerant.
  • The star series in the rough store layer handles the work of multi-rough groups and uses roughed eyes as consensus aggression module.
  • The duration time of a message append and a message append response is equal to network round trip time (RTT) and contains an unnecessary 0.5 IO duration.
  • Applying unpersistent entries in advance can significantly reduce the tail latency of store duration.
  • Privately applying process a single serious theory for each rough group can reduce the tail latency of reply duration.
The presentation shows that applying unpersistent entries in advance can significantly reduce the tail latency of store duration. This optimization effect is demonstrated in the suspension insert benchmark of the demo, where the 99 percentile latency is about 40 percent lower than the synchronized IO version, and the 99 higher latency has less jitter than the asynchronous IO version.

Abstract

Serving write requests in stable and low average latency is what many distributed databases pursue. So does TiKV, a distributed transactional Key-Value database. After a detailed investigation, Liqi Geng and his team found that TiKV’s write performance might be restricted by many factors. Among all these factors, the raftstore module might be the one that causes delay the worst. In order to optimize write latency, TiKV team plans to lower tail latency, in addition to reducing the average write latency, to make sure the overall latency is consistent and low. In this talk, Liqi Geng will walk you through TiKV’s architecture and share the optimization measures he and his team have used in the raftstore module to reduce the average write latency and tail latency, such as Asynchronous IO and other optimizing trials.

Materials:

Post a comment

Related work






Conference:  Defcon 31
Authors: Christien 'DilDog' Rioux Cult Of The Dead Cow, Katelyn 'Medus4' Bowden Cult Of The Dead Cow
2023-08-01