如需類似 Amazon Timestream for LiveAnalytics 的功能,請考慮使用 Amazon Timestream for InfluxDB。它提供簡化的資料擷取和單一位數毫秒查詢回應時間,以進行即時分析。在這裡進一步了解。
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
Timestream for InfluxDB 3 中資料庫叢集的參數群組
資料庫參數指定資料庫的配置方式。您可以透過將資料庫執行個體與參數群組建立關聯來管理資料庫組態。
Amazon Timestream for InfluxDB 使用預設設定定義參數群組。您也可以使用自訂設定,定義自己的參數群組。Core 和 Enterprise 版本的參數群組,但相似版本不相同或可互換。
對於 InfluxDB 3,叢集組態是透過參數群組進行管理。這些參數群組包含引擎組態值,可決定 InfluxDB 3 叢集的運作方式。
參數群組特性
-
不可變性:參數群組在建立後是不可變的。您無法在建立後修改參數。
-
複製:您可以透過複製現有的參數群組並在複製過程中修改參數來建立新的參數群組。這是 AWS 管理主控台 唯一的功能。
-
刪除:無法刪除參數群組。
-
預設群組:InfluxDB 的 Timestream 提供預設參數群組,其中包含針對常見使用案例最佳化的預先設定設定。
叢集組態的關鍵參數
InfluxDB 3 的參數群組可讓您設定叢集的各個層面,包括:
-
引擎類型 (InfluxDBV2、InfluxDBV3Core, InfluxDBV3Enterprise)
-
InfluxDB 3 企業參數
-
服務定義的參數群組
-
查詢並行限制
-
查詢的記憶體配置
-
儲存快取設定
-
HTTP 逾時組態
-
日誌層級和詳細程度
-
壓縮設定 (企業版本)
建立新叢集時,您必須將其與參數群組建立關聯。此關聯會決定叢集的操作特性。
常見參數 (適用於 Core 和 Enterprise)
| Parameter (參數) | Description | 範圍/格式 |
|---|---|---|
| 查詢組態 | ||
queryFileLimit
|
查詢檔案的數量上限 | 0-1024 |
queryLogSize
|
查詢日誌的大小 | 1-10000 |
logFilter
|
日誌篩選組態 | 最多 1024 個字元 |
logFormat
|
日誌的格式 | 「完整」 |
| DataFusion 引擎 | ||
dataFusionNumThreads
|
DataFusion 執行緒的數量 | 1-2048 |
dataFusionRuntimeType
|
執行時間執行模型 | current-thread、multi-thread、multi-thread-alt |
dataFusionMaxParquetFanout
|
Parquet 檔案分佈上限 | 1-1000000 |
dataFusionUseCachedParquetLoader
|
啟用 Parquet 載入器快取 | Boolean |
| 記憶體管理 | ||
bufferMemLimitMb
|
緩衝記憶體限制,以 MB 為單位 | 1024-16777216000 |
execMemPoolBytes
|
執行記憶體集區大小 | 百分比或絕對值 |
parquetMemCacheSize
|
Parquet 記憶體快取大小 | 百分比或絕對值 |
forceSnapshotMemThreshold
|
強制快照的記憶體閾值 | 百分比或絕對值 |
| WAL 組態 | ||
walSnapshotSize
|
WAL 快照大小 | 1-10000 |
walMaxWriteBufferSize
|
WAL 寫入緩衝區大小上限 | 1-1000000 |
snapshottedWalFilesToKeep
|
要保留的快照 WAL 檔案數目 | 0-10000 |
walReplayConcurrencyLimit
|
WAL 重播並行限制 | 1-100 |
| 快取設定 | ||
lastCacheEvictionInterval
|
最後一個值快取移出間隔 | 持續時間 |
distinctCacheEvictionInterval
|
不同的值快取移出間隔 | 持續時間 |
tableIndexCacheMaxEntries
|
資料表索引快取項目上限 | 1-1000 |
parquetMemCachePrunePercentage
|
Parquet 快取刪除百分比 | 0-1 |
| HTTP 組態 | ||
maxHttpRequestSize
|
HTTP 請求大小上限 | 1024-16777216 |
| 保留與刪除 | ||
retentionCheckInterval
|
保留政策檢查間隔 | 持續時間 |
deleteGracePeriod
|
刪除的寬限期 | 持續時間 |
hardDeleteDefaultDuration
|
預設硬刪除持續時間 | 持續時間 |
僅限企業的參數
| Parameter (參數) | Description | 範圍/格式 |
|---|---|---|
| 節點組態 | ||
ingestQueryInstances
|
寫入器/讀取器節點的數量 | 1-2 (必要) |
queryOnlyInstances
|
專用讀取器節點的數量 | 0-1 (必要) |
dedicatedCompactor
|
啟用專用精簡器節點 | 布林值 (必要) |
| 壓縮設定 | ||
compactionRowLimit
|
壓縮的資料列限制 | 1-100000000 |
compactionMaxNumFilesPerPlan
|
每個壓縮計畫的檔案上限 | 1-10000 |
compactionGen2Duration
|
第 2 代壓縮持續時間 | 持續時間 |
compactionMultipliers
|
壓縮層級乘數 | 格式:"n,n,n,n" |
compactionCleanupWait
|
清除之前的等待時間 | 持續時間 |
compactionCheckInterval
|
壓縮檢查間隔 | 持續時間 |
| 快取組態 | ||
lastValueCacheDisableFromHistory
|
從歷史資料停用 LVC | Boolean |
distinctValueCacheDisableFromHistory
|
從歷史資料停用 DVC | Boolean |
| 複寫 | ||
replicationInterval
|
資料複寫間隔 | 持續時間 |
catalogSyncInterval
|
目錄同步間隔 | 持續時間 |
管理參數群組
若要管理參數群組:
-
建立:使用自訂設定建立新的參數群組。
-
關聯:將參數群組與新的或現有的叢集建立關聯。
-
刪除或修改:無法修改或刪除參數群組。
由於參數群組不可變,因此請在建立叢集之前仔細規劃您的組態。如果您稍後需要變更參數,則需要建立新的參數群組,並將其與您的叢集建立關聯,這可能需要重新啟動叢集。
建立參數群組
建立 InfluxDB 3 Core 參數群組:
aws timestream-influxdb create-db-parameter-group \ --name "my-influxdb3-core-pg" \ --description "Custom parameter group for InfluxDB 3 Core" \ --parameters '{ "InfluxDBv3Core": { "queryFileLimit": 512, "dataFusionNumThreads": 16, "bufferMemLimitMb": 8192, "maxHttpRequestSize": 8388608 } }'
建立 InfluxDB 3 Enterprise 參數群組 (3 節點組態):
aws timestream-influxdb create-db-parameter-group \ --name "my-influxdb3-enterprise-pg" \ --description "Custom parameter group for 3-node InfluxDB 3 Enterprise cluster" \ --parameters '{ "InfluxDBv3Enterprise": { "ingestQueryInstances": 2, "queryOnlyInstances": 0, "dedicatedCompactor": true, "compactionRowLimit": 1000000, "compactionCheckInterval": "30m", "dataFusionNumThreads": 32, "bufferMemLimitMb": 16384 } }'
建立 InfluxDB 3 Enterprise 參數群組 (單節點組態):
aws timestream-influxdb create-db-parameter-group \ --name "my-influxdb3-enterprise-single-pg" \ --description "Custom parameter group for single-node InfluxDB 3 Enterprise" \ --parameters '{ "InfluxDBv3Enterprise": { "ingestQueryInstances": 1, "queryOnlyInstances": 0, "dedicatedCompactor": false, "dataFusionNumThreads": 16 } }'
使用服務定義的參數群組
使用預設核心參數群組建立叢集:
aws timestream-influxdb create-db-cluster \ --name "my-core-cluster" \ --db-parameter-group-identifier "InfluxDBv3Core" \ --vpc-subnet-ids subnet-12345 subnet-67890 \ --vpc-security-group-ids sg-abcdef \ --db-instance-type db.influxIOIncluded.large \
使用預設企業參數群組 (3 節點) 建立叢集:
aws timestream-influxdb create-db-cluster \ --name "my-enterprise-cluster" \ --db-parameter-group-identifier "InfluxDBv3Enterprise" \ --vpc-subnet-ids subnet-12345 subnet-67890 \ --vpc-security-group-ids sg-abcdef \ --db-instance-type db.influxIOIncluded.xlarge \
使用單一節點企業參數群組建立叢集:
aws timestream-influxdb create-db-cluster \ --name "my-enterprise-single" \ --db-parameter-group-identifier "InfluxDBv3Enterprise1Node" \ --vpc-subnet-ids subnet-12345 subnet-67890 \ --vpc-security-group-ids sg-abcdef \ --db-instance-type db.influxIOIncluded.large \
列出和描述參數群組
列出所有參數群組:
aws timestream-influxdb list-db-parameter-groups
描述特定參數群組:
aws timestream-influxdb get-db-parameter-group \ --identifier "my-influxdb3-enterprise-pg"
服務定義的參數群組參考
Amazon Timestream for InfluxDB 提供三個服務定義的參數群組:
-
InfluxDBv3Core:單節點 InfluxDB 3 Core 叢集的預設組態。
-
InfluxDBv3Enterprise:3 節點 InfluxDB 3 Enterprise 叢集 (2 個寫入器/讀取器節點 + 1 個專用壓縮器) 的預設組態。
-
InfluxDBv3Enterprise1Node:單節點 InfluxDB 3 Enterprise 叢集 (無專用精簡器) 的預設組態。
這些服務定義的參數群組是不可變的,可以直接使用或用作使用 --source-db-parameter-group-id選項建立自訂參數群組的範本。