Skip to content

Commit

Permalink
tools: add dynamically modifying RocksDB configuration (#541)
Browse files Browse the repository at this point in the history
* tools: add dynamically modifying RocksDB configuration

* Update wording
  • Loading branch information
CaitinChen authored Jul 19, 2018
1 parent 2fe2ade commit ccbdba0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tools/tikv-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,22 @@ If the command is successfully executed, it prints the above information. If the
```bash
$ tikv-ctl --host 127.0.0.1:20160 region-properties -r 2
```
### Modify the RocksDB configuration of TiKV dynamically
You can use the `modify-tikv-config` command to dynamically modify the configuration arguments. Currently, it only supports dynamically modifying RocksDB related arguments.
- `-m` is used to specify the target RocksDB. You can set it to `kvdb` or `raftdb`.
- `-n` is used to specify the configuration name.
You can refer to the arguments of `[rocksdb]` and `[raftdb]` (corresponding to `kvdb` and `raftdb`) in the [TiKV configuration template](https://github.com/pingcap/tikv/blob/master/etc/config-template.toml#L213-L500).
You can use `default|write|lock + . + argument name` to specify the configuration of different CFs. For `kvdb`, you can set it to `default`, `write`, or `lock`; for `raftdb`, you can only set it to `default`.
- `-v` is used to specify the configuration value.
```bash
$ tikv-ctl modify-tikv-config -m kvdb -n max_background_jobs -v 8
success!
$ tikv-ctl modify-tikv-config -m kvdb -n write.block-cache-size -v 256MB
success!
$ tikv-ctl modify-tikv-config -m raftdb -n default.disable_auto_compactions -v true
success!
```

0 comments on commit ccbdba0

Please sign in to comment.