Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 25c7542

Browse files
TomShawnNingLin-P
and
NingLin-P
authoredAug 13, 2020
update the usage of tikv-ctl modify-tikv-config (pingcap#3650)
* update the usage of tikv-ctl modify-tikv-config * Update tikv-control.md Co-authored-by: NingLin-P <linning@pingcap.com> Co-authored-by: NingLin-P <linning@pingcap.com>
1 parent 6cd8fea commit 25c7542

File tree

1 file changed

+45
-13
lines changed

1 file changed

+45
-13
lines changed
 

‎tikv-control.md

+45-13
Original file line numberDiff line numberDiff line change
@@ -275,23 +275,55 @@ If the command is successfully executed, it prints the above information. If the
275275
$ tikv-ctl --host 127.0.0.1:20160 region-properties -r 2
276276
```
277277
278-
### Modify the RocksDB configuration of TiKV dynamically
278+
### Modify the TiKV configuration dynamically
279279
280-
You can use the `modify-tikv-config` command to dynamically modify the configuration arguments. Currently, it only supports dynamically modifying RocksDB related arguments.
280+
You can use the `modify-tikv-config` command to dynamically modify the configuration arguments. Currently, the TiKV configuration items that can be dynamically modified and the detailed modification are consistent with modifying configuration using SQL statements. For details, see [Modify TiKV configuration online](/dynamic-config.md#modify-tikv-configuration-online).
281281
282-
- `-m` is used to specify the target RocksDB. You can set it to `kvdb` or `raftdb`.
283-
- `-n` is used to specify the configuration name.
284-
You can refer to the arguments of `[rocksdb]` and `[raftdb]` (corresponding to `kvdb` and `raftdb`) in the [TiKV configuration template](https://github.com/tikv/tikv/blob/master/etc/config-template.toml#L213-L500).
285-
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`.
282+
- `-n` is used to specify the full name of the configuration item. For the list of configuration items that can be modified online, see [Modify TiKV configuration online](/dynamic-config.md#modify-tikv-configuration-online).
286283
- `-v` is used to specify the configuration value.
287284
288-
```bash
289-
$ tikv-ctl modify-tikv-config -m kvdb -n max_background_jobs -v 8
290-
success!
291-
$ tikv-ctl modify-tikv-config -m kvdb -n write.block-cache-size -v 256MB
292-
success!
293-
$ tikv-ctl modify-tikv-config -m raftdb -n default.disable_auto_compactions -v true
294-
success!
285+
Set the size of `shared block cache`:
286+
287+
{{< copyable "shell-regular" >}}
288+
289+
```shell
290+
tikv-ctl --host ip:port modify-tikv-config -n storage.block-cache.capacity -v 10GB
291+
```
292+
293+
```
294+
success
295+
```
296+
297+
When `shared block cache` is disabled, set `block cache size` for the `write` CF:
298+
299+
{{< copyable "shell-regular" >}}
300+
301+
```shell
302+
tikv-ctl --host ip:port modify-tikv-config -n rocksdb.writecf.block-cache-size -v 256MB
303+
```
304+
305+
```
306+
success
307+
```
308+
309+
{{< copyable "shell-regular" >}}
310+
311+
```shell
312+
tikv-ctl --host ip:port modify-tikv-config -n raftdb.defaultcf.disable-auto-compactions -v true
313+
```
314+
315+
```
316+
success
317+
```
318+
319+
{{< copyable "shell-regular" >}}
320+
321+
```shell
322+
tikv-ctl --host ip:port modify-tikv-config -n raftstore.sync-log -v false
323+
```
324+
325+
```
326+
success
295327
```
296328
297329
### Force Region to recover the service from failure of multiple replicas

0 commit comments

Comments
 (0)
Please sign in to comment.