Skip to content

Commit

Permalink
tikv: recorrect the descriptions on the feature region-split-size p…
Browse files Browse the repository at this point in the history
…art. (pingcap#15611)
  • Loading branch information
qiancai authored Dec 22, 2023
1 parent c2b94db commit de49c6c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
12 changes: 9 additions & 3 deletions releases/release-6.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,17 @@ In 6.1.0, the key new features or improvements are as follows:

### Performance

* Support customized Region size (experimental)
* Support customized Region size

Setting Regions to a larger size can effectively reduce the number of Regions, make Regions easier to manage, and improve the cluster performance and stability. This feature introduces the concept of bucket, which is a smaller range within a Region. Using buckets as the query unit can optimize concurrent query performance when Regions are set to a larger size. Using buckets as the query unit can also dynamically adjust the sizes of hot Regions to ensure the scheduling efficiency and load balance. This feature is currently experimental. It is not recommended to use it in production environments.
Starting from v6.1.0, you can configure [`coprocessor.region-split-size`](/tikv-configuration-file.md#region-split-size) to set Regions to a larger size. This can effectively reduce the number of Regions, make Regions easier to manage, and improve the cluster performance and stability.

[User document](/tune-region-performance.md), [#11515](https://github.com/tikv/tikv/issues/11515)
[User document](/tune-region-performance.md#use-region-split-size-to-adjust-region-size), [#11515](https://github.com/tikv/tikv/issues/11515)

* Support using buckets to increase concurrency (experimental)

To help you further improve the query concurrency after setting Regions to a larger size, TiDB introduces the concept of bucket, which is a smaller range within a Region. Using buckets as the query unit can optimize concurrent query performance when Regions are set to a larger size. Using buckets as the query unit can also dynamically adjust the sizes of hotspot Regions to ensure the scheduling efficiency and load balance. This feature is currently experimental. It is not recommended to use it in production environments.

[User document](/tune-region-performance.md#use-bucket-to-increase-concurrency), [#11515](https://github.com/tikv/tikv/issues/11515)

* Use Raft Engine as the default log storage engine

Expand Down
16 changes: 8 additions & 8 deletions tune-region-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ This document introduces how to tune Region performance by adjusting the Region

TiKV automatically [shards bottom-layered data](/best-practices/tidb-best-practices.md#data-sharding). Data is split into multiple Regions based on the key ranges. When the size of a Region exceeds a threshold, TiKV splits it into two or more Regions.

When processing a large amount of data, TiKV might split too many Regions, which causes more resource consumption and [performance regression](/best-practices/massive-regions-best-practices.md#performance-problem). For a certain amount of data, the larger the Region size, the fewer the Regions. Since v6.1.0, TiDB supports setting customizing Region size. The default size of a Region is 96 MiB. To reduce the number of Regions, you can adjust Regions to a larger size.
In scenarios involving large datasets, if the Region size is relatively small, TiKV might have too many Regions, which causes more resource consumption and [performance regression](/best-practices/massive-regions-best-practices.md#performance-problem). Since v6.1.0, TiDB supports customizing Region size. The default size of a Region is 96 MiB. To reduce the number of Regions, you can adjust Regions to a larger size.

To reduce the performance overhead of many Regions, you can also enable [Hibernate Region](/best-practices/massive-regions-best-practices.md#method-4-increase-the-number-of-tikv-instances) or [`Region Merge`](/best-practices/massive-regions-best-practices.md#method-5-adjust-raft-base-tick-interval).

## Use `region-split-size` to adjust Region size

> **Warning:**
> **Note:**
>
> Currently, customized Region size is an experimental feature introduced in TiDB v6.1.0. It is not recommended that you use it in production environments. The risks are as follows:
> The recommended range for the Region size is [48MiB, 258MiB]. Commonly used sizes include 96 MiB, 128 MiB, and 256 MiB. It is NOT recommended to set the Region size beyond 1 GiB. Avoid setting the size to more than 10 GiB. An excessively large Region size might result in the following side effects:
>
> + Performance jitter might be caused.
> + The query performance, especially for queries that deal with a large range of data, might decrease.
> + The Region scheduling slows down.
> + Performance jitters
> + Decreased query performance, especially for queries that deal with a large range of data
> + Slower Region scheduling
To adjust the Region size, you can use the [`coprocessor.region-split-size`](/tikv-configuration-file.md#region-split-size) configuration item. The recommended sizes are 96 MiB, 128 MiB, or 256 MiB. The larger the `region-split-size` value, the more jittery the performance will be. It is NOT recommended to set the Region size over 1 GiB. Avoid setting the size to more than 10 GiB. When TiFlash is used, the Region size should not exceed 256 MiB.
To adjust the Region size, you can use the [`coprocessor.region-split-size`](/tikv-configuration-file.md#region-split-size) configuration item. When TiFlash is used, the Region size should not exceed 256 MiB.

When the Dumpling tool is used, the Region size should not exceed 1 GiB. In this case, you need to reduce the concurrency after increasing the Region size; otherwise, TiDB might run out of memory.

Expand All @@ -35,4 +35,4 @@ When the Dumpling tool is used, the Region size should not exceed 1 GiB. In this
>
> Currently, this is an experimental feature introduced in TiDB v6.1.0. It is not recommended that you use it in production environments.
When Regions are set to a larger size, you need to set [`coprocessor.enable-region-bucket`](/tikv-configuration-file.md#enable-region-bucket-new-in-v610) to `true` to increase the query concurrency. When you use this configuration, Regions are divided into buckets. Buckets are smaller ranges within a Region and are used as the unit of concurrent query to improve the scan concurrency. You can control the bucket size using [`coprocessor.region-bucket-size`](/tikv-configuration-file.md#region-bucket-size-new-in-v610).
After Regions are set to a larger size, if you want to further improve the query concurrency, you can set [`coprocessor.enable-region-bucket`](/tikv-configuration-file.md#enable-region-bucket-new-in-v610) to `true`. When you use this configuration, Regions are divided into buckets. Buckets are smaller ranges within a Region and are used as the unit of concurrent query to improve the scan concurrency. You can control the bucket size using [`coprocessor.region-bucket-size`](/tikv-configuration-file.md#region-bucket-size-new-in-v610).

0 comments on commit de49c6c

Please sign in to comment.