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

tikv-control: make a parameter in right places #9549

Merged
merged 8 commits into from
Oct 11, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions tikv-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ You can add corresponding parameters and subcommands after `tiup ctl tikv`.
store:"127.0.0.1:20160" compact db:KV cf:default range:([], []) success!
```

- Local mode: Use the `--db` option to specify the local TiKV data directory path. In this mode, you need to stop the running TiKV instance.
- Local mode: Use the `--data-dir` option to specify the local TiKV data directory path. In this mode, you need to stop the running TiKV instance.

Unless otherwise noted, all commands support both the remote mode and the local mode.

Expand Down Expand Up @@ -228,7 +228,7 @@ The properties can be used to check whether the Region is healthy or not. If not
Use the `compact` command to manually compact data of each TiKV. If you specify the `--from` and `--to` options, then their flags are also in the form of escaped raw key.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I refresh the whole description, please update

Compact data of each TiKV manually

Use the compact command to manually compact data of each TiKV.

  • Use the --from and --to options to sepecify the compact range in the form of escaped raw key. If not set, the whole range will be compacted.

  • Use the --region option to compact range of a specific region. If set, --from and --to will be ignored.

  • Use the --db option to specify the RocksDB that performs compaction. The optional values are kv and raft.

  • Use the --threads option allows you to specify the concurrency for the TiKV compaction and its default value is 8. Generally, a higher concurrency comes with a faster compaction speed, which might yet affect the service. You need to choose an appropriate concurrency count based on your scenario.

  • Use the --bottommost option to include or exclude the bottommost files when TiKV performs compaction. The value options are default, skip, and force. The default value is default.

    • default means that the bottommost files are included only when the Compaction Filter feature is enabled.
    • skip means that the bottommost files are excluded when TiKV performs compaction.
    • force means that the bottommost files are always included when TiKV performs compaction.
  • For local mode
    {{< copyable "shell-regular" >}}

$ tikv-ctl --data-dir /path/to/tikv compact --db kv
success!
  • For remote mode
    {{< copyable "shell-regular" >}}
$ tikv-ctl --host ip:port compact --db kv
success!


- Use the `--host` option to specify the TiKV that needs to perform compaction.
- Use the `-d` option to specify the RocksDB that performs compaction. The optional values are `kv` and `raft`.
Oreoxmt marked this conversation as resolved.
Show resolved Hide resolved
- Use the `--data-dir` option to specify the local TiKV data directory path.
- Use the `--threads` option allows you to specify the concurrency for the TiKV compaction and its default value is `8`. Generally, a higher concurrency comes with a faster compaction speed, which might yet affect the service. You need to choose an appropriate concurrency count based on your scenario.
TomShawn marked this conversation as resolved.
Show resolved Hide resolved
- Use the `--bottommost` option to include or exclude the bottommost files when TiKV performs compaction. The value options are `default`, `skip`, and `force`. The default value is `default`.
- `default` means that the bottommost files are included only when the Compaction Filter feature is enabled.
Expand Down