Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update default values for RocksDB config #14129

Merged
merged 4 commits into from
Aug 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions tikv-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,11 @@ Configuration items related to the sharing of block cache among multiple RocksDB
### `capacity`

+ The size of the shared block cache.
+ Default value: 45% of the size of total system memory
+ Default value:

+ When `storage.engine="raft-kv"`, the default value is 45% of the size of total system memory.
+ When `storage.engine="partitioned-raft-kv"`, the default value is 30% of the size of total system memory.

+ Unit: KB|MB|GB

## storage.flow-control
Expand Down Expand Up @@ -1153,12 +1157,18 @@ Configuration items related to RocksDB
### `max-total-wal-size`

+ The maximum RocksDB WAL size in total, which is the size of `*.log` files in the `data-dir`.
+ Default value: `"4GB"`
+ Default value:

+ When `storage.engine="raft-kv"`, the default value is `"4GB"`.
+ When `storage.engine="partitioned-raft-kv"`, the default value is `1`.

### `stats-dump-period`

+ The interval at which statistics are output to the log.
+ Default value: `10m`
+ Default value:

+ When `storage.engine="raft-kv"`, the default value is `"10m"`.
+ When `storage.engine="partitioned-raft-kv"`, the default value is `"0"`.

### `compaction-readahead-size`

Expand Down Expand Up @@ -1268,8 +1278,12 @@ Configuration items related to RocksDB
>
> This feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub.

+ Specifies the total memory limit of `memtable` for all RocksDB instances in a single TiKV. The default value is 25% of the memory of the machine. It is recommended to configure a memory of at least 5 GiB. This configuration only takes effect for Partitioned Raft KV (`storage.engine`=`"partitioned-raft-kv"`).
+ Default value: 25%
+ Specifies the total memory limit of `memtable` for all RocksDB instances in a single TiKV. `0` means no limit.
+ Default value:

+ When `storage.engine="raft-kv"`, the default value is `0`, which means no limit.
+ When `storage.engine="partitioned-raft-kv"`, the default value is 20% of the size of total system memory.

+ Unit: KiB|MiB|GiB

## rocksdb.titan
Expand Down Expand Up @@ -1537,7 +1551,10 @@ Configuration items related to `rocksdb.defaultcf`, `rocksdb.writecf`, and `rock
- `3`: Can be read by TiKV v2.1 and later versions. Changes the encoding of the keys in index blocks.
- `4`: Can be read by TiKV v3.0 and later versions. Changes the encoding of the values in index blocks.
- `5`: Can be read by TiKV v6.1 and later versions. Full and partitioned filters use a faster and more accurate Bloom filter implementation with a different schema.
+ Default value: `2`
+ Default value:

+ When `storage.engine="raft-kv"`, the default value is `2`.
+ When `storage.engine="partitioned-raft-kv"`, the default value is `5`.

### `ttl` <span class="version-mark">New in v7.2.0</span>

Expand Down
Loading