Skip to content

Commit

Permalink
tikv: update the default value of periodic-compaction and ttl (pingca…
Browse files Browse the repository at this point in the history
  • Loading branch information
qiancai authored Oct 30, 2023
1 parent 9a3bc3e commit 79255c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions releases/release-7.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ Quick access: [Quick start](https://docs.pingcap.com/tidb/v7.4/quick-start-with-
| Configuration file | Configuration parameter | Change type | Description |
| -------- | -------- | -------- | -------- |
| TiDB | [`enable-stats-cache-mem-quota`](/tidb-configuration-file.md#enable-stats-cache-mem-quota-new-in-v610) | Modified | The default value is changed from `false` to `true`, which means the memory limit for caching TiDB statistics is enabled by default. |
| TiKV | [<code>rocksdb.\[defaultcf\|writecf\|lockcf\].periodic-compaction-seconds</code>](/tikv-configuration-file.md#periodic-compaction-seconds-new-in-v720) | Modified | The default value is changed from `"30d"` to `"0s"` to disable periodic compaction of RocksDB by default. This change avoids a significant number of compactions being triggered after the TiDB upgrade, which affects the read and write performance of the frontend. |
| TiKV | [<code>rocksdb.\[defaultcf\|writecf\|lockcf\].ttl</code>](/tikv-configuration-file.md#ttl-new-in-v720) | Modified | The default value is changed from `"30d"` to `"0s"` so that SST files do not trigger compactions by default due to TTL, which avoids affecting the read and write performance of the frontend. |
| TiFlash | [`flash.compact_log_min_gap`](/tiflash/tiflash-configuration.md) | Newly added | When the gap between the `applied_index` advanced by the current Raft state machine and the `applied_index` at the last disk spilling exceeds `compact_log_min_gap`, TiFlash executes the `CompactLog` command from TiKV and spills data to disk. |
| TiFlash | [`profiles.default.enable_resource_control`](/tiflash/tiflash-configuration.md) | Newly added | Controls whether to enable the TiFlash resource control feature. |
| TiFlash | [`storage.format_version`](/tiflash/tiflash-configuration.md) | Modified | Change the default value from `4` to `5`. The new format can reduce the number of physical files by merging smaller files. |
Expand Down
4 changes: 2 additions & 2 deletions tikv-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -1577,13 +1577,13 @@ Configuration items related to `rocksdb.defaultcf`, `rocksdb.writecf`, and `rock
### `ttl` <span class="version-mark">New in v7.2.0</span>

+ SST files with updates older than the TTL will be automatically selected for compaction. These SST files will go through the compaction in a cascading way so that they can be compacted to the bottommost level or file.
+ Default value: `"30d"`
+ Default value: `"0s"`, meaning that no SST file is selected by default.
+ Unit: s(second)|h(hour)|d(day)

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

+ The time interval for periodic compaction. SST files with updates older than this value will be selected for compaction and rewritten to the same level where these SST files originally reside.
+ Default value: `"30d"`
+ Default value: `"0s"`, meaning that periodic compaction is disabled by default.
+ Unit: s(second)|h(hour)|d(day)

## rocksdb.defaultcf.titan
Expand Down

0 comments on commit 79255c3

Please sign in to comment.