全部產品
Search
文件中心

Elasticsearch:壓測指標和任務參數說明

更新時間:Jun 30, 2024

使用Elasticsearch官方壓測工具ESRally對不同規格的阿里雲ES執行個體進行壓力測試和壓力測試對比實驗,本文對壓測中涉及的重要指標和任務進行說明。

背景資訊

ESRally是Elasticsearch官方提供的用於對ES叢集進行壓力測試的工具。壓測的詳細說明和具體使用方法,請參見Rally官網

壓測指標Metric

表中僅列出部分重要指標供您參考,更多指標說明請根據已有說明進行類推,或參見esrally壓測工具使用文檔

說明
  • 延遲(latency):提交一個完整請求所經歷的時間,即從提交請求到收到完整響應之間的時間段。包括等待(延遲)時間,即請求在準備好由Elasticsearch提供服務之前等待的時間。

  • 服務時間(service time):Elasticsearch開始處理一個請求到收到返回結果之間的時間段。

  • 錯誤率:錯誤響應相對於響應總數的比例。

指標類型

指標名稱

指標說明

主分區索引相關指標

Cumulative indexing time of primary shards

所有主分區索引累積時間總和。

說明

該時間總和是指多個indexing線程消耗CPU時間的總和,而不是自然時間。例如有M個indexing線程,運行了N分鐘,那麼此指標的總時間就是:M*N分鐘,而不是N分鐘。

Min cumulative indexing time across primary shards

跨主分區索引累積時間的最小值。

Median cumulative indexing time across primary shards

跨主分區索引累積時間的中值。

Max cumulative indexing time across primary shards

跨主分區索引累積時間的最大值。

Cumulative indexing throttle time of primary shards

所有主分區索引時被限流的累積時間。

說明

累積時間是指索引被限流時indexing線程消耗的CPU時間總和,而不是自然時間。

Min cumulative indexing throttle time across primary shards

跨主分區索引時被限流的累積時間的最小值。

Median cumulative indexing throttle time across primary shards

跨主分區索引時被限流的累積時間的中值。

Max cumulative indexing throttle time across primary shards

跨主分區索引時被限流的累積時間的最大值。

Cumulative merge time of primary shards

主分區的累積合并的已耗用時間,也是指線程消耗CPU的時間總和。

Cumulative merge count of primary shards

主分區合并的累積次數。

說明

不是所有的分區都會有合并(merge)動作。

Min cumulative merge time across primary shards

跨主分區索引合并累積時間的最小值。

Median cumulative merge time across primary shards

跨主分區索引合并累積時間的中值。

Max cumulative merge time across primary shards

跨主分區索引合并累積時間的最大值。

Cumulative merge throttle time of primary shards

主分區的累積合并限制時間,也是指線程消耗CPU的時間總和。

Min cumulative merge throttle time across primary shards

跨主分區索引合并累積的時間最小值,也是指線程消耗CPU的時間總和。

Median cumulative merge throttle time across primary shards

跨主分區索引合并累積時間的中值,也是指線程消耗CPU的時間總和。

Max cumulative merge throttle time across primary shards

跨主分區索引合并累積的時間最大值,也是指線程消耗CPU的時間總和。

Cumulative refresh time of primary shards

主分區累積重新整理的時間,也是指線程消耗CPU的時間總和。

Cumulative refresh count of primary shards

主分區累積重新整理的次數。

Min cumulative refresh time across primary shards

跨主分區索引重新整理時間的最小值。

Median cumulative refresh time across primary shards

跨主分區索引重新整理時間的中值。

Max cumulative refresh time across primary shards

跨主分區索引重新整理時間的最大值。

Cumulative flush time of primary shards

主分區索引交易資料從緩衝沖洗到磁碟的累積時間,也是指線程消耗CPU的時間總和。

Cumulative flush count of primary shards

主分區索引交易資料從緩衝沖洗到磁碟的累積次數。

Min cumulative flush time across primary shards

跨主分區索引,從緩衝沖洗到磁碟累積時間的最小值,也是指線程消耗CPU的時間總和。

Median cumulative flush time across primary shards

跨主分區索引,從緩衝沖洗到磁碟累積時間的中值,也是指線程消耗CPU的時間總和。

Max cumulative flush time across primary shards

跨主分區索引,從緩衝沖洗到磁碟累積時間的最大值,也是指線程消耗CPU的時間總和。

Store size

索引的大小。不包括 translog和副本分區。

Translog size

傳輸日誌大小。

Heap used for segments

所有主分區索引的segment數佔用heap的量。

Heap used for doc values

所有主分區索引的文檔數佔用heap的量。

Heap used for terms

所有主分區索引的terms因子佔用heap的量。

Heap used for norms

所有主分區索引的norms因子佔用heap的量。

Heap used for points

所有主分區索引的points佔用heap的量。

Heap used for stored fields

所有主分區索引的欄位儲存使用heap的量。

Segment count

所有主分區索引的segments數。

記憶體回收行程指標

Total Young Gen GC

整個叢集中年輕代垃圾收集器的總已耗用時間。

Total Old Gen GC

整個叢集中老年代垃圾收集器的總已耗用時間。

輸送量相關指標

Min Throughput

每個任務的最小輸送量,即QPS的最小值。

Median Throughput

每個任務的平均輸送量,即QPS的中值。

Max Throughput

每個任務的最大輸送量,即QPS的最大值。

延遲相關指標

50th percentile latency

50%的完整請求所經歷的時間。

90th percentile latency

90%的完整請求所經歷的時間。

99.9th percentile latency

99.9%的完整請求所經歷的時間。

100th percentile latency

100%的完整請求所經歷的時間。

服務時間相關指標

50th percentile service time

50%的請求所經歷的服務時間。

90th percentile service time

90%的請求所經歷的服務時間。

99.9th percentile service time

99.9%的請求所經歷的服務時間。

100th percentile service time

100%的請求所經歷的服務時間。

錯誤率相關指標

error rate

索引的每個任務的響應錯誤率。

壓測任務Task

您可以從Task維度查看執行個體的輸送量、延遲、服務時間、錯誤率等參數指標。

Operation

說明

index-append

索引。

index-stats

索引狀態。

node-stats

節點狀態。

default

預設。

term

term查詢。

phrase

短語精確查詢。

country_agg_uncached

agg無緩衝。

country_agg_cached

agg有緩衝。

scroll

滾動。

expression

運算式。

painless_static

靜態指令碼。

painless_dynamic

動態指令碼。

large_terms

大量的term組合查詢。

large_filtered_terms

大量的term組合過濾查詢。

large_prohibited_terms

大量的term組合禁用查詢。

相關文檔