2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

kafka付属のパフォーマンス確認コマンドkafka-consumer-perf-test.shとkafka-producer-perf-test.sh

Posted at
bash-4.4# $KAFKA_HOME/bin/kafka-consumer-perf-test.sh --version
2.6.0 (Commit:62abe01bee039651)

kafka-consumer-perf-test.sh

consumerなので後述のkafka-producer-perf-test.shと組み合わせるか他の何かしらの手段でproduceして使う。以下は--messages=10なので10個consumeしたら終了する(もしくはタイムアウト)。

$KAFKA_HOME/bin/kafka-consumer-perf-test.sh  --bootstrap-server localhost:9092 --topic=perftest --messages=10

終了するとサマリが表示される。

start.time, end.time, data.consumed.in.MB, MB.sec, data.consumed.in.nMsg, nMsg.sec, rebalance.time.ms, fetch.time.ms, fetch.MB.sec, fetch.nMsg.sec
2021-01-17 13:10:46:392, 2021-01-17 13:10:46:777, 0.0000, 0.0001, 24, 62.3377, 1610889046729, -1610889046344, -0.0000, -0.0000

kafka-producer-perf-test.sh

  • --num-records 10 レコード数
  • --throughput 1 秒間produce数(たぶん。マニュアル読んでない)。
  • --record-size 10 各レコードのサイズ。10だとSSXVNJHPDQみたいのをproduceする。
bash-4.4# $KAFKA_HOME/bin/kafka-producer-perf-test.sh  --topic perftest --num-records 10 --throughput 1 --record-size 10 --producer-props bootstrap.servers=localhost:9092

終了するとサマリが表示される。

7 records sent, 1.3 records/sec (0.00 MB/sec), 54.3 ms avg latency, 295.0 ms max latency.
10 records sent, 1.073192 records/sec (0.00 MB/sec), 41.30 ms avg latency, 295.00 ms max latency, 13 ms 50th, 295 ms 95th, 295 ms 99th, 295 ms 99.9th.
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?