Skip to content

[METRICS] Topic Metric Store metric 收集不完全 #1810

@chinghongfang

Description

@chinghongfang

使用 #1524 實做的 CostAwareAssignor 做兩次實驗,兩次分別使用 local metric store 和 topic metric store。發現使用 topic metric store 的 consumer 會較晚開始消費。

指令使用:

JMX_PORT=7091 ACCOUNT=chinghongfang VERSION=mergeAssignor HEAP_OPTS=-Xmx24G /home/kafka/astraea/docker/start_app.sh performance --bootstrap.servers 192.168.103.185:9092 --value.size 10KiB --value.distribution fixed --run.until 10m --producers 1 --consumers 1 --read.idle 20m --topics simple --partitioner org.astraea.common.partitioner.StrictCostPartitioner --configs metric.store=local,jmx.port=7091,partition.assignment.strategy=org.astraea.common.assignor.CostAwareAssignor,max.retry.time=10m,metric.store.expiration.duration=3m

叢集有 6 個 broker,只有一個 topic ,該 topic 有 12 個 partition,手動用碼表計時 "performance tool 執行" -> "consumer 開始消費的時間",

  • Consumer with local metric store: ~6 sec
  • Consumer with topic metric store: ~46 sec

topic metric store 明顯需要較多時間收集完 metric ,離開 MetricStore#wait

實驗有初步從 Cost function 觀測 metric 獲取狀況,發現 "topicPartition 有在更新,但有些保持 0.0",故推測 topic metric store 或 metric publisher 有漏 metric ,導致 MetricStore#wait 一直等不到完整數據。

將會繼續追查,看看是 publisher 還是 metric store 的問題。

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions