You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tiflash/tiflash-configuration.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,8 @@ This section introduces the configuration parameters of TiFlash.
65
65
66
66
- The path in which the TiFlash temporary files are stored.
67
67
- By default, it is the first directory in [`path`](#path) or in [`storage.latest.dir`](#dir-1) appended with `"/tmp"`.
68
+
- Starting from v9.0.0, it is recommended that you use the [`storage.temp`](#storagetemp-new-in-v900) configuration instead of `tmp_path`, because it supports setting a capacity limit to control temporary file space usage.
69
+
- When `storage.temp` is configured, the `tmp_path` configuration does not take effect.
68
70
69
71
<!-- Example: `"/tidb-data/tiflash-9000/tmp"` -->
70
72
@@ -122,6 +124,24 @@ Configure storage path related settings.
122
124
123
125
<!-- Example: `[10737418240, 10737418240]` -->
124
126
127
+
#### storage.temp <spanclass="version-mark">New in v9.0.0</span>
128
+
129
+
##### `dir`
130
+
131
+
- The directory in which the temporary spill files generated during query execution are stored.
132
+
- By default, it is the first directory in [`storage.latest.dir`](#dir-1) appended with `"/tmp"`.
133
+
134
+
##### `capacity`
135
+
136
+
- Limits the total space usage of the temporary file directory. If the temporary spill files generated during query execution exceed this limit, the query fails with an error.
137
+
- Unit: Byte. Formats such as `"10GB"` are not supported.
138
+
- Range: `[0, 9223372036854775807]`
139
+
- If this value is not set or is set to `0`, temporary files are not subject to a space limit and can use the entire disk capacity.
140
+
- If a value greater than `0` is set, TiFlash performs the following checks at startup:
141
+
-`storage.temp.capacity` must be less than or equal to the total space of the disk where `storage.temp.dir` is located.
142
+
- If `storage.temp.dir` is a subdirectory of `storage.main.dir` and `storage.main.capacity` is greater than `0`, then `storage.temp.capacity` must be less than or equal to `storage.main.capacity`. The same check applies if it is a subdirectory of `storage.latest.dir`.
143
+
- This configuration item does not support hot-reloading. You must restart the TiFlash process for changes to take effect.
144
+
125
145
#### storage.io_rate_limit <spanclass="version-mark">New in v5.2.0</span>
0 commit comments