- ドキュメント ホーム
- TiDBについて
- クイックスタート
- 発展させる
- 概要
- クイックスタート
- TiDB Cloud(開発者層) で TiDB クラスターを構築する
- TiDB の CRUD SQL
- TiDB でシンプルな CRUD アプリを構築する
- 応用例
- TiDB に接続する
- データベース スキーマの設計
- 書き込みデータ
- データの読み取り
- 取引
- 最適化
- トラブルシューティング
- 参照
- 書店のサンプル アプリケーション
- ガイドライン
- アーカイブされたドキュメント
- クラウドネイティブ開発環境
- サードパーティのサポート
- デプロイ
- 移行する
- 管理
- 監視と警告
- トラブルシューティング
- TiDB トラブルシューティング マップ
- 遅いクエリを特定する
- 遅いクエリを分析する
- SQL 診断
- Top SQLを使用して高価なクエリを特定する
- ログを使用して高価なクエリを特定する
- ステートメント要約表
- ホットスポットの問題のトラブルシューティング
- 増加した読み取りおよび書き込み遅延のトラブルシューティング
- クラスターのオンサイト情報の保存と復元
- クラスタ セットアップのトラブルシューティング
- 高いディスク I/O 使用率のトラブルシューティング
- ロック競合のトラブルシューティング
- TiFlash のトラブルシューティング
- オプティミスティック トランザクションでの書き込み競合のトラブルシューティング
- データとインデックス間の不一致のトラブルシューティング
- 性能チューニング
- チューニングガイド
- Configuration / コンフィグレーションのチューニング
- システムのチューニング
- ソフトウェアのチューニング
- Configuration / コンフィグレーション
- コプロセッサ キャッシュ
- SQL チューニング
- チュートリアル
- TiDB ツール
- 概要
- ユースケース
- ダウンロード
- TiUP
- ドキュメンテーション マップ
- 概要
- 用語と概念
- TiUP コンポーネントの管理
- FAQ
- トラブルシューティングガイド
- コマンドリファレンス
- 概要
- TiUP コマンド
- TiUP クラスタ コマンド
- 概要
- tiup cluster audit
- tiup cluster check
- tiup cluster clean
- tiup cluster deploy
- tiup cluster destroy
- tiup cluster disable
- tiup cluster display
- tiup cluster edit-config
- tiup cluster enable
- tiup cluster help
- tiup cluster import
- tiup cluster list
- tiup cluster patch
- tiup cluster prune
- tiup cluster reload
- tiup cluster rename
- tiup cluster replay
- tiup cluster restart
- tiup cluster scale-in
- tiup cluster scale-out
- tiup cluster start
- tiup cluster stop
- tiup cluster template
- tiup cluster upgrade
- TiUP DMコマンド
- TiDB クラスター トポロジ リファレンス
- DM クラスタ トポロジ リファレンス
- ミラー リファレンス ガイド
- TiUP コンポーネント
- PingCAPクリニック診断サービス
- TiDB Operator
- Dumpling
- TiDB Lightning
- TiDB データ移行
- バックアップと復元 (BR)
- Binlog
- TiCDC
- Dumpling
- 同期差分インスペクター
- ティスパーク
- 参照
- クラスタ アーキテクチャ
- 主な監視指標
- セキュリティ
- 権限
- SQL
- SQL 言語の構造と構文
- SQL ステートメント
ADD COLUMN
ADD INDEX
ADMIN
ADMIN CANCEL DDL
ADMIN CHECKSUM TABLE
ADMIN CHECK [TABLE|INDEX]
ADMIN SHOW DDL [JOBS|QUERIES]
ADMIN SHOW TELEMETRY
ALTER DATABASE
ALTER INDEX
ALTER INSTANCE
ALTER PLACEMENT POLICY
ALTER TABLE
ALTER TABLE COMPACT
ALTER USER
ANALYZE TABLE
BACKUP
BATCH
BEGIN
CHANGE COLUMN
COMMIT
CHANGE DRAINER
CHANGE PUMP
CREATE [GLOBAL|SESSION] BINDING
CREATE DATABASE
CREATE INDEX
CREATE PLACEMENT POLICY
CREATE ROLE
CREATE SEQUENCE
CREATE TABLE LIKE
CREATE TABLE
CREATE USER
CREATE VIEW
DEALLOCATE
DELETE
DESC
DESCRIBE
DO
DROP [GLOBAL|SESSION] BINDING
DROP COLUMN
DROP DATABASE
DROP INDEX
DROP PLACEMENT POLICY
DROP ROLE
DROP SEQUENCE
DROP STATS
DROP TABLE
DROP USER
DROP VIEW
EXECUTE
EXPLAIN ANALYZE
EXPLAIN
FLASHBACK TABLE
FLUSH PRIVILEGES
FLUSH STATUS
FLUSH TABLES
GRANT <privileges>
GRANT <role>
INSERT
KILL [TIDB]
LOAD DATA
LOAD STATS
MODIFY COLUMN
PREPARE
RECOVER TABLE
RENAME INDEX
RENAME TABLE
REPLACE
RESTORE
REVOKE <privileges>
REVOKE <role>
ROLLBACK
SELECT
SET DEFAULT ROLE
SET [NAMES|CHARACTER SET]
SET PASSWORD
SET ROLE
SET TRANSACTION
SET [GLOBAL|SESSION] <variable>
SHOW ANALYZE STATUS
SHOW [BACKUPS|RESTORES]
SHOW [GLOBAL|SESSION] BINDINGS
SHOW BUILTINS
SHOW CHARACTER SET
SHOW COLLATION
SHOW [FULL] COLUMNS FROM
SHOW CONFIG
SHOW CREATE PLACEMENT POLICY
SHOW CREATE SEQUENCE
SHOW CREATE TABLE
SHOW CREATE USER
SHOW DATABASES
SHOW DRAINER STATUS
SHOW ENGINES
SHOW ERRORS
SHOW [FULL] FIELDS FROM
SHOW GRANTS
SHOW INDEX [FROM|IN]
SHOW INDEXES [FROM|IN]
SHOW KEYS [FROM|IN]
SHOW MASTER STATUS
SHOW PLACEMENT
SHOW PLACEMENT FOR
SHOW PLACEMENT LABELS
SHOW PLUGINS
SHOW PRIVILEGES
SHOW [FULL] PROCESSSLIST
SHOW PROFILES
SHOW PUMP STATUS
SHOW SCHEMAS
SHOW STATS_HEALTHY
SHOW STATS_HISTOGRAMS
SHOW STATS_META
SHOW STATUS
SHOW TABLE NEXT_ROW_ID
SHOW TABLE REGIONS
SHOW TABLE STATUS
SHOW [FULL] TABLES
SHOW [GLOBAL|SESSION] VARIABLES
SHOW WARNINGS
SHUTDOWN
SPLIT REGION
START TRANSACTION
TABLE
TRACE
TRUNCATE
UPDATE
USE
WITH
- データ型
- 関数と演算子
- クラスタ化インデックス
- 制約
- 生成された列
- SQL モード
- テーブル属性
- 取引
- ガベージ コレクション (GC)
- ビュー
- パーティショニング
- 一時テーブル
- キャッシュされたテーブル
- 文字セットと照合順序
- SQL の配置規則
- システム テーブル
mysql
- 情報_スキーマ
- 概要
ANALYZE_STATUS
CLIENT_ERRORS_SUMMARY_BY_HOST
CLIENT_ERRORS_SUMMARY_BY_USER
CLIENT_ERRORS_SUMMARY_GLOBAL
CHARACTER_SETS
CLUSTER_CONFIG
CLUSTER_HARDWARE
CLUSTER_INFO
CLUSTER_LOAD
CLUSTER_LOG
CLUSTER_SYSTEMINFO
COLLATIONS
COLLATION_CHARACTER_SET_APPLICABILITY
COLUMNS
DATA_LOCK_WAITS
DDL_JOBS
DEADLOCKS
ENGINES
INSPECTION_RESULT
INSPECTION_RULES
INSPECTION_SUMMARY
KEY_COLUMN_USAGE
METRICS_SUMMARY
METRICS_TABLES
PARTITIONS
PLACEMENT_POLICIES
PROCESSLIST
REFERENTIAL_CONSTRAINTS
SCHEMATA
SEQUENCES
SESSION_VARIABLES
SLOW_QUERY
STATISTICS
TABLES
TABLE_CONSTRAINTS
TABLE_STORAGE_STATS
TIDB_HOT_REGIONS
TIDB_HOT_REGIONS_HISTORY
TIDB_INDEXES
TIDB_SERVERS_INFO
TIDB_TRX
TIFLASH_REPLICA
TIKV_REGION_PEERS
TIKV_REGION_STATUS
TIKV_STORE_STATUS
USER_PRIVILEGES
VIEWS
METRICS_SCHEMA
- UI
- TiDB ダッシュボード
- 概要
- 管理
- アクセス
- 概要ページ
- クラスター情報ページ
- Top SQLページ
- キー ビジュアライザー ページ
- メトリクス関係グラフ
- SQL ステートメントの分析
- スロークエリページ
- クラスタ診断
- 検索ログ ページ
- インスタンスのプロファイリング
- セッションの管理とConfiguration / コンフィグレーション
- FAQ
- CLI
- コマンド ライン フラグ
- Configuration / コンフィグレーションファイルのパラメーター
- システム変数
- ストレージ エンジン
- テレメトリー
- エラーコード
- テーブル フィルター
- トポロジ ラベルごとにレプリカをスケジュールする
- よくある質問
- リリースノート
- すべてのリリース
- リリースのタイムライン
- TiDB のバージョニング
- v6.1
- v6.0
- v5.4
- v5.3
- v5.2
- v5.1
- v5.0
- v4.0
- v3.1
- v3.0
- v2.1
- v2.0
- v1.0
- 用語集
TiFlashを構成する
このドキュメントでは、TiFlashの展開と使用に関連する構成パラメーターを紹介します。
PDスケジューリングパラメータ
pd-ctlを使用してPDスケジューリングパラメータを調整できます。 tiupを使用してクラスタをデプロイおよび管理する場合は、 tiup ctl pd
を使用してpd-ctl -u <pd_ip:pd_port>
を置き換えることができることに注意してください。
replica-schedule-limit
:レプリカ関連の演算子が生成される速度を決定します。このパラメーターは、ノードをオフラインにしたり、レプリカを追加したりするなどの操作に影響します。ノート:
このパラメーターの値は、
region-schedule-limit
の値よりも小さくする必要があります。そうしないと、TiKVノード間の通常のリージョンスケジューリングが影響を受けます。store-balance-rate
:各TiKV/TiFlashストアのリージョンがスケジュールされるレートを制限します。このパラメーターは、ストアがクラスタに新たに参加した場合にのみ有効になることに注意してください。既存のストアの設定を変更する場合は、次のコマンドを使用します。ノート:
v4.0.2以降、
store-balance-rate
パラメーターは非推奨になり、store limit
コマンドに変更が加えられました。詳細については、 ストア制限を参照してください。pd-ctl -u <pd_ip:pd_port> store limit <store_id> <value>
コマンドを実行して、指定した店舗のスケジューリングレートを設定します。 (store_id
を取得するには、pd-ctl -u <pd_ip:pd_port> store
コマンドを実行できます。- 指定したストアのリージョンのスケジュールレートを設定しない場合、このストアは
store-balance-rate
の設定を継承します。 pd-ctl -u <pd_ip:pd_port> store limit
コマンドを実行して、現在の設定値store-balance-rate
を表示できます。
replication.location-labels
:TiKVインスタンスのトポロジー関係を示します。キーの順序は、さまざまなラベルの階層関係を示しています。 TiFlashが有効になっている場合は、pd-ctl config placement-rules
を使用してデフォルト値を設定する必要があります。詳細については、 geo-distributed-deployment-topologyを参照してください。
TiFlash構成パラメーター
このセクションでは、TiFlashの構成パラメーターを紹介します。
tiflash.toml
ファイルを構成します
## The listening host for supporting services such as TPC/HTTP. It is recommended to configure it as "0.0.0.0", which means to listen on all IP addresses of this machine.
listen_host = "0.0.0.0"
## The TiFlash TCP service port.
tcp_port = 9000
## The TiFlash HTTP service port.
http_port = 8123
## The cache size limit of the metadata of a data block. Generally, you do not need to change this value.
mark_cache_size = 5368709120
## The cache size limit of the min-max index of a data block. Generally, you do not need to change this value.
minmax_index_cache_size = 5368709120
## The cache size limit of the DeltaIndex. The default value is 0, which means no limit.
delta_index_cache_size = 0
## The storage path of TiFlash data. If there are multiple directories, separate each directory with a comma.
## path and path_realtime_mode are deprecated since v4.0.9. Use the configurations
## in the [storage] section to get better performance in the multi-disk deployment scenarios
## Since TiDB v5.2.0, if you need to use the storage.io_rate_limit configuration, you need to set the storage path of TiFlash data to storage.main.dir at the same time.
## When the [storage] configurations exist, both path and path_realtime_mode configurations are ignored.
# path = "/tidb-data/tiflash-9000"
## or
# path = "/ssd0/tidb-data/tiflash,/ssd1/tidb-data/tiflash,/ssd2/tidb-data/tiflash"
## The default value is false. If you set it to true and multiple directories
## are set in the path, the latest data is stored in the first directory and older
## data is stored in the rest directories.
# path_realtime_mode = false
## The path in which the TiFlash temporary files are stored. By default it is the first directory in path
## or in storage.latest.dir appended with "/tmp".
# tmp_path = "/tidb-data/tiflash-9000/tmp"
## Storage paths settings take effect starting from v4.0.9
[storage]
## This configuration item is deprecated since v5.2.0. You can use the [storage.io_rate_limit] settings below instead.
# bg_task_io_rate_limit = 0
## DTFile format
## * format_version = 1, the old format, deprecated.
## * format_version = 2, the default format for versions < v6.0.0.
## * format_version = 3, the default format for versions >= v6.0.0, which provides more data validation features.
# format_version = 3
[storage.main]
## The list of directories to store the main data. More than 90% of the total data is stored in
## the directory list.
dir = [ "/tidb-data/tiflash-9000" ]
## or
# dir = [ "/ssd0/tidb-data/tiflash", "/ssd1/tidb-data/tiflash" ]
## The maximum storage capacity of each directory in storage.main.dir.
## If it is not set, or is set to multiple 0, the actual disk (the disk where the directory is located) capacity is used.
## Note that human-readable numbers such as "10GB" are not supported yet.
## Numbers are specified in bytes.
## The size of the capacity list should be the same with the dir size.
## For example:
# capacity = [ 10737418240, 10737418240 ]
[storage.latest]
## The list of directories to store the latest data. About 10% of the total data is stored in
## the directory list. The directories (or directory) listed here require higher IOPS
## metrics than those in storage.main.dir.
## If it is not set (by default), the values of storage.main.dir are used.
# dir = [ ]
## The maximum storage capacity of each directory in storage.latest.dir.
## If it is not set, or is set to multiple 0, the actual disk (the disk where the directory is located) capacity is used.
# capacity = [ 10737418240, 10737418240 ]
## [storage.io_rate_limit] settings are new in v5.2.0.
[storage.io_rate_limit]
## This configuration item determines whether to limit the I/O traffic, which is disabled by default. This traffic limit in TiFlash is suitable for cloud storage that has the disk bandwidth of a small and specific size.
## The total I/O bandwidth for disk reads and writes. The unit is bytes and the default value is 0, which means the I/O traffic is not limited by default.
# max_bytes_per_sec = 0
## max_read_bytes_per_sec and max_write_bytes_per_sec have similar meanings to max_bytes_per_sec. max_read_bytes_per_sec means the total I/O bandwidth for disk reads, and max_write_bytes_per_sec means the total I/O bandwidth for disk writes.
## These configuration items limit I/O bandwidth for disk reads and writes separately. You can use them for cloud storage that calculates the limit of I/O bandwidth for disk reads and writes separately, such as the Persistent Disk provided by Google Cloud Platform.
## When the value of max_bytes_per_sec is not 0, max_bytes_per_sec is prioritized.
# max_read_bytes_per_sec = 0
# max_write_bytes_per_sec = 0
## The following parameters control the bandwidth weights assigned to different I/O traffic types. Generally, you do not need to adjust these parameters.
## TiFlash internally divides I/O requests into four types: foreground writes, background writes, foreground reads, background reads.
## When the I/O traffic limit is initialized, TiFlash assigns the bandwidth according to the following weight ratio.
## The following default configurations indicate that each type of traffic gets a weight of 25% (25 / (25 + 25 + 25 + 25) = 25%).
## If the weight is configured to 0, the corresponding I/O traffic is not limited.
# foreground_write_weight = 25
# background_write_weight = 25
# foreground_read_weight = 25
# background_read_weight = 25
## TiFlash supports automatically tuning the traffic limit for different I/O types according to the current I/O load. Sometimes, the tuned bandwidth might exceed the weight ratio set above.
## auto_tune_sec indicates the interval of automatic tuning. The unit is seconds. If the value of auto_tune_sec is 0, the automatic tuning is disabled.
# auto_tune_sec = 5
[flash]
tidb_status_addr = TiDB status port and address. # Multiple addresses are separated with commas.
service_addr = The listening address of TiFlash Raft services and coprocessor services.
## Multiple TiFlash nodes elect a master to add or delete placement rules to PD,
## and the configurations in flash.flash_cluster control this process.
[flash.flash_cluster]
refresh_interval = Master regularly refreshes the valid period.
update_rule_interval = Master regularly gets the status of TiFlash replicas and interacts with PD.
master_ttl = The valid period of the elected master.
cluster_manager_path = The absolute path of the pd buddy directory.
log = The pd buddy log path.
[flash.proxy]
addr = The listening address of proxy. If it is left empty, 127.0.0.1:20170 is used by default.
advertise-addr = The external access address of addr. If it is left empty, "addr" is used by default.
data-dir = The data storage path of proxy.
config = The configuration file path of proxy.
log-file = The log path of proxy.
log-level = The log level of proxy. "info" is used by default.
status-addr = The listening address from which the proxy pulls metrics | status information. If it is left empty, 127.0.0.1:20292 is used by default.
advertise-status-addr = The external access address of status-addr. If it is left empty, "status-addr" is used by default.
[logger]
## log level (available options: trace, debug, information, warning, error). The default value is `debug`.
level = debug
log = TiFlash log path
errorlog = TiFlash error log path
## Size of a single log file. The default value is "100M".
size = "100M"
## Maximum number of log files to save. The default value is 10.
count = 10
[raft]
## PD service address. Multiple addresses are separated with commas.
pd_addr = "10.0.1.11:2379,10.0.1.12:2379,10.0.1.13:2379"
[status]
## The port through which Prometheus pulls metrics information. The default value is 8234.
metrics_port = 8234
[profiles]
[profiles.default]
## The default value is false. This parameter determines whether the segment
## of DeltaTree Storage Engine uses logical split.
## Using the logical split can reduce the write amplification.
## However, these are at the cost of disk space waste.
## Modifying the default value is not recommended.
# dt_enable_logical_split = false
## The memory usage limit for the generated intermediate data when a single
## coprocessor query is executed. The default value is 0, which means no limit.
max_memory_usage = 0
## The memory usage limit for the generated intermediate data when all queries
## are executed. The default value is 0 (in bytes), which means no limit.
max_memory_usage_for_all_queries = 0
## New in v5.0. This item specifies the maximum number of cop requests that TiFlash Coprocessor executes at the same time. If the number of requests exceeds the specified value, the exceeded requests will queue. If the configuration value is set to 0 or not set, the default value is used, which is twice the number of physical cores.
cop_pool_size = 0
## New in v5.0. This item specifies the maximum number of batch requests that TiFlash Coprocessor executes at the same time. If the number of requests exceeds the specified value, the exceeded requests will queue. If the configuration value is set to 0 or not set, the default value is used, which is twice the number of physical cores.
batch_cop_pool_size = 0
## New in v6.1.0. This item specifies the number of requests that TiFlash can concurrently process when it receives ALTER TABLE ... COMPACT from TiDB.
## If the value is set to 0, the default value 1 prevails.
manual_compact_pool_size = 1
## New in v5.4.0. This item enables or disables the elastic thread pool feature, which significantly improves CPU utilization in high concurrency scenarios of TiFlash. The default value is true.
enable_elastic_threadpool = true
# Compression algorithm of the TiFlash storage engine. The value can be LZ4, zstd, or LZ4HC, and is case-insensitive. By default, LZ4 is used.
dt_compression_method = "LZ4"
# Compression level of the TiFlash storage engine. The default value is 1. It is recommended that you set this value to 1 if dt_compression_method is LZ4, -1 (smaller compression rate, but better read performance) or 1 if dt_compression_method is zstd, and 9 if dt_compression_method is LZ4HC.
dt_compression_level = 1
## Security settings take effect starting from v4.0.5.
[security]
## New in v5.0. This configuration item enables or disables log redaction. If the configuration value
## is set to true, all user data in the log will be replaced by ?.
## Note that you also need to set security.redact-info-log for tiflash-learner's logging in tiflash-learner.toml.
# redact_info_log = false
## Path of the file that contains a list of trusted SSL CAs. If set, the following settings
## cert_path and key_path are also needed.
# ca_path = "/path/to/ca.pem"
## Path of the file that contains X509 certificate in PEM format.
# cert_path = "/path/to/tiflash-server.pem"
## Path of the file that contains X509 key in PEM format.
# key_path = "/path/to/tiflash-server-key.pem"
tiflash-learner.toml
ファイルを構成します
[server]
engine-addr = The external access address of the TiFlash coprocessor service.
[raftstore]
## The allowable number of threads in the pool that flushes Raft data to storage.
apply-pool-size = 4
## The allowable number of threads that process Raft, which is the size of the Raftstore thread pool.
store-pool-size = 4
## The number of threads that handle snapshots.
## The default number is 2.
## If you set it to 0, the multi-thread optimization is disabled.
snap-handle-pool-size = 2
## The shortest interval at which Raft store persists WAL.
## You can properly increase the latency to reduce IOPS usage.
## The default value is "4ms".
## If you set it to 0ms, the optimization is disabled.
store-batch-retry-recv-timeout = "4ms"
[security]
## New in v5.0. This configuration item enables or disables log redaction.
## If the configuration value is set to true,
## all user data in the log will be replaced by ?. The default value is false.
redact-info-log = false
上記の項目に加えて、他のパラメータはTiKVのパラメータと同じです。キーがengine
であるlabel
は予約されており、手動で構成できないことに注意してください。
マルチディスク展開
TiFlashはマルチディスク展開をサポートします。 TiFlashノードに複数のディスクがある場合は、次のセクションで説明するパラメーターを構成することにより、それらのディスクを最大限に活用できます。 TiUPに使用されるTiFlashの構成テンプレートについては、 TiFlashトポロジの複雑なテンプレートを参照してください。
v4.0.9より前のバージョンのTiDBを使用したマルチディスク展開
v4.0.9より前のTiDBクラスターの場合、TiFlashはストレージエンジンのメインデータを複数のディスクに保存することのみをサポートします。 path
(TiUPではdata_dir
)およびpath_realtime_mode
構成を指定することにより、複数のディスクにTiFlashノードをセットアップできます。
path
に複数のデータストレージディレクトリがある場合は、それぞれをコンマで区切ります。たとえば、 /nvme_ssd_a/data/tiflash,/sata_ssd_b/data/tiflash,/sata_ssd_c/data/tiflash
。環境に複数のディスクがある場合は、各ディレクトリが1つのディスクに対応し、すべてのディスクのパフォーマンスを最大化するために、パフォーマンスが最高のディスクを前面に配置することをお勧めします。
TiFlashノードに同様のI/Oメトリックを持つディスクが複数ある場合は、 path_realtime_mode
パラメーターをデフォルト値のままにすることができます(または明示的にfalse
に設定することもできます)。これは、データがすべてのストレージディレクトリに均等に分散されることを意味します。ただし、最新のデータは最初のディレクトリにのみ書き込まれるため、対応するディスクは他のディスクよりもビジーです。
TiFlashノードに異なるI/Oメトリックを持つ複数のディスクがある場合は、 path_realtime_mode
からtrue
に設定し、最高のI/Oメトリックを持つディスクをpath
の前に配置することをお勧めします。これは、最初のディレクトリには最新のデータのみが格納され、古いデータは他のディレクトリに均等に分散されることを意味します。この場合、最初のディレクトリの容量は、すべてのディレクトリの合計容量の10%として計画する必要があることに注意してください。
TiDBv4.0.9以降を使用したマルチディスク展開
v4.0.9以降のバージョンのTiDBクラスターの場合、TiFlashはストレージエンジンのメインデータと最新データを複数のディスクに保存することをサポートします。 TiFlashノードを複数のディスクに展開する場合は、ノードを最大限に活用するために、 [storage]
セクションでストレージディレクトリを指定することをお勧めします。 v4.0.9より前の構成( path
およびpath_realtime_mode
)は引き続きサポートされることに注意してください。
TiFlashノードに同様のI/Oメトリックを持つディスクが複数ある場合は、 storage.main.dir
のリストで対応するディレクトリを指定し、 storage.latest.dir
を空のままにしておくことをお勧めします。 TiFlashは、I/O圧力とデータをすべてのディレクトリに分散します。
TiFlashノードにI/Oメトリックが異なる複数のディスクがある場合は、 storage.latest.dir
のリストでメトリックの高いディレクトリを指定し、 storage.main.dir
のリストでメトリックの低いディレクトリを指定することをお勧めします。たとえば、1つのNVMe-SSDと2つのSATA-SSDの場合、 storage.latest.dir
から["/nvme_ssd_a/data/tiflash"]
およびstorage.main.dir
から["/sata_ssd_b/data/tiflash", "/sata_ssd_c/data/tiflash"]
に設定できます。 TiFlashは、I/O圧力とデータをこれら2つのディレクトリリストにそれぞれ分散します。この場合、 storage.latest.dir
の容量は、計画された合計容量の10%として計画する必要があることに注意してください。
[storage]
構成は、v1.2.5以降のTiUPでサポートされています。 TiDBクラスタのバージョンがv4.0.9以降の場合は、TiUPのバージョンがv1.2.5以降であることを確認してください。そうしないと、 [storage]
で定義されたデータディレクトリはTiUPによって管理されません。