How to Troubleshoot RocksDB Write Stalls in TiKV

TiDB, an open-source, distributed NewSQL database, can experience write performance degradation for several reasons. This troubleshooting guide discusses write performance degradation related to the RocksDB built-in write stall feature. RocksDB is an open-source, mature, and high-performance key-value store. It is optimized for fast, low latency storage such as flash drives and high-speed disk drives.

We will also discuss how to resolve this issue in TiKV, a highly scalable, low latency, and easy-to-use key-value database that uses RocksDB as its storage engine.

TiFS: A TiKV-Based, Partition Tolerant, Strictly Consistent File System

TiKV is a distributed key-value storage engine, featuring strong consistency and partition tolerance. It can act either as the storage engine for TiDB or as an independent transactional key-value database. Do you know what else it is capable of?

At TiDB Hackathon 2020, our team built a TiKV-based distributed POSIX file system, TiFS, which inherits the powerful features of TiKV and also taps into TiKV's possibilities beyond data storage.

Dive Deep Into TiKV Transactions: The Life Story of a TiKV Prewrite Request

TiKV is a distributed key-value storage engine, which is based on the designs of Google Spanner, F1, and HBase. However, TiKV is much simpler to manage because it does not depend on a distributed file system.

As introduced in A Deep Dive into TiKV and How TiKV Reads and Writes, TiKV applies a 2-phase commit (2PC) algorithm inspired by Google Percolator to support distributed transactions. These two phases are Prewrite and Commit.

How We Trace a KV Database With Less Than 5% Performance Impact

TiKV is a distributed key-value database. It has higher performance requirements than a regular application, so tracing tools must have minimal impact. This article describes how we achieved tracing all requests' time consumption in TiKV with less than 5% performance impact.

Background Knowledge

Logs, metrics, and traces are the three pillars of system observability. The following figure shows their relationship: