Skip to content

Commit 95274e6

Browse files
authored
docs: fix TiKV RocksDB block-size defaults (#23269) (#23271)
1 parent ce32385 commit 95274e6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

storage-engine/rocksdb-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ As the storage engine of TiKV, RocksDB is used to store Raft logs and user data.
2727

2828
## RocksDB memory usage
2929

30-
To improve the reading performance and reduce the reading operations to the disk, RocksDB divides the files stored on the disk into blocks based on a certain size (the default is 64 KB). When reading a block, it first checks if the data already exists in BlockCache in memory. If true, it can read the data directly from memory without accessing the disk.
30+
To improve the reading performance and reduce the reading operations to the disk, RocksDB divides the files stored on the disk into blocks based on a certain size (the default is 32 KiB). When reading a block, it first checks if the data already exists in BlockCache in memory. If true, it can read the data directly from memory without accessing the disk.
3131

3232
BlockCache discards the least recently used data according to the LRU algorithm. By default, TiKV devotes 45% of the system memory to BlockCache. Users can also modify the `storage.block-cache.capacity` configuration to an appropriate value by themselves. However, it is not recommended to exceed 60% of the total system memory.
3333

tune-tikv-memory-performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ max-manifest-file-size = "20MiB"
145145
[rocksdb.defaultcf]
146146
# The data block size. RocksDB compresses data based on the unit of block.
147147
# Similar to page in other databases, block is the smallest unit cached in block-cache.
148-
block-size = "64KB"
148+
block-size = "32KiB"
149149

150150
# The compaction mode of each layer of RocksDB data. The optional values include no, snappy, zlib,
151151
# bzip2, lz4, lz4hc, and zstd. Note that the Snappy compressed file must be in the [official Snappy format](https://github.com/google/snappy). Other variants of Snappy compression are not supported.

0 commit comments

Comments
 (0)