pingcap / docs-cn

TiDB/TiKV/PD 中文文档
https://docs.pingcap.com/zh
Other
1.81k stars 1.21k forks source link

a total of 4 CFs or 5CFs #13499

Open polestar2012 opened 1 year ago

polestar2012 commented 1 year ago

File: /release-6.5/storage-engine/rocksdb-overview.md

The data written to RocksDB is written to MemTable firstly. When the size of a MemTable exceeds 128 MB, it switches to a new MemTable. There are 2 RocksDB instances in TiKV, a total of 4 CFs. The size limit of a single MemTable for each CF is 128 MB. A maximum of 5 MemTables can exist at the same time; otherwise, the foreground writes is blocked. The memory occupied by this part is at most 2.5 GB (4 x 5 x 128 MB).

qiancai commented 1 year ago

@Connor1996, would you please help confirm whether "There are 2 RocksDB instances in TiKV, a total of 4 CFs." is correct? Thanks.

Connor1996 commented 1 year ago

Indeed, it should be 5 CFs: kvdb: defaultCF, writeCF, lockCF, raftCF raftdb: defaultCF

Though with raft-engine, raftdb does not exist anymore.