From a7e0579de20f7cd19b21f42ac9cace39417371e2 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Wed, 26 Feb 2025 17:11:39 +0800 Subject: [PATCH] docs: update description and default value for `concurrently-init-stats` in configuration file (#20254) (#20375) --- releases/release-8.2.0.md | 1 + tidb-configuration-file.md | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/releases/release-8.2.0.md b/releases/release-8.2.0.md index 346e3b5cf02b9..73554511ee05d 100644 --- a/releases/release-8.2.0.md +++ b/releases/release-8.2.0.md @@ -187,6 +187,7 @@ Quick access: [Quick start](https://docs.pingcap.com/tidb/v8.2/quick-start-with- | Configuration file | Configuration parameter | Change type | Description | | -------- | -------- | -------- | -------- | +| TiDB | [`concurrently-init-stats`](/tidb-configuration-file.md#concurrently-init-stats-new-in-v810-and-v752) | Modified | Changes the default value from `false` to `true` to shorten the duration of statistics initialization. This configuration item takes effect only when [`lite-init-stats`](/tidb-configuration-file.md#lite-init-stats-new-in-v710) is set to `false`. | | TiDB | [`stats-load-concurrency`](/tidb-configuration-file.md#stats-load-concurrency-new-in-v540) | Modified | Changes the default value from `5` to `0`, and the minimum value from `1` to `0`. The value `0` means the automatic mode, which automatically adjusts concurrency based on the configuration of the server. | | TiDB | [`token-limit`](/tidb-configuration-file.md#token-limit) | Modified | Changes the maximum value from `18446744073709551615` (64-bit platform) and `4294967295` (32-bit platform) to `1048576` to avoid causing TiDB Server OOM when setting it too large. It means that the number of sessions that can execute requests concurrently can be configured to a maximum of `1048576`. | | TiKV | [`max-apply-unpersisted-log-limit`](/tikv-configuration-file.md#max-apply-unpersisted-log-limit-new-in-v810) | Modified | Changes the default value from `0` to `1024` to reduce long-tail latency caused by I/O jitter on the TiKV node. It means that the maximum number of committed but not persisted Raft logs that can be applied is `1024` by default. | diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 387db1fc5e888..303e2e69a63d5 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -608,14 +608,14 @@ Configuration items related to performance. ### `concurrently-init-stats` New in v8.1.0 and v7.5.2 -+ Controls whether to initialize statistics concurrently during TiDB startup. -+ Default value: `false` ++ Controls whether to initialize statistics concurrently during TiDB startup. This configuration item takes effect only when [`lite-init-stats`](#lite-init-stats-new-in-v710) is set to `false`. ++ Default value: `false` for versions earlier than v8.2.0, `true` for v8.2.0 and later versions. ### `lite-init-stats` New in v7.1.0 + Controls whether to use lightweight statistics initialization during TiDB startup. + Default value: `false` for versions earlier than v7.2.0, `true` for v7.2.0 and later versions. -+ When the value of `lite-init-stats` is `true`, statistics initialization does not load any histogram, TopN, or Count-Min Sketch of indexes or columns into memory. When the value of `lite-init-stats` is `false`, statistics initialization loads histograms, TopN, and Count-Min Sketch of indexes and primary keys into memory but does not load any histogram, TopN, or Count-Min Sketch of non-primary key columns into memory. When the optimizer needs the histogram, TopN, and Count-Min Sketch of a specific index or column, the necessary statistics are loaded into memory synchronously or asynchronously (controlled by [`tidb_stats_load_sync_wait`](/system-variables.md#tidb_stats_load_sync_wait-new-in-v540)). ++ When the value of `lite-init-stats` is `true`, statistics initialization does not load any histogram, TopN, or Count-Min Sketch of indexes and columns into memory. When the value of `lite-init-stats` is `false`, statistics initialization loads histograms, TopN, and Count-Min Sketch of indexes into memory but does not load any histogram, TopN, or Count-Min Sketch of primary keys and columns into memory. When the optimizer needs the histogram, TopN, and Count-Min Sketch of a specific primary key or column, the necessary statistics are loaded into memory synchronously or asynchronously (controlled by [`tidb_stats_load_sync_wait`](/system-variables.md#tidb_stats_load_sync_wait-new-in-v540)). + Setting `lite-init-stats` to `true` speeds up statistics initialization and reduces TiDB memory usage by avoiding unnecessary statistics loading. For details, see [Load statistics](/statistics.md#load-statistics). ### `force-init-stats` New in v6.5.7 and v7.1.0