集群性能测试
Producer测试
kafka-producer-perf-test.sh --topic test --record-size 100 --num-records 100000 --throughput -1 --producer-props bootstrap.servers=bigdata01:9092,bigdata02:9092,bigdata03:9092
输出:
100000 records sent, 51572.975761 records/sec (4.92 MB/sec), 633.28 ms avg latency, 811.00 ms max latency, 678 ms 50th, 789 ms 95th, 806 ms 99th, 811 ms 99.9th.
Consumer测试
kafka-consumer-perf-test.sh --broker-list bigdata01:9092,bigdata02:9092,bigdata03:9092 --topic test --fetch-size 10000 --messages 10000000 --threads 1
输出:
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
2020-09-05 02:44:07:468, 2020-09-05 02:44:19:496, 9.5367, 0.7929, 100000, 8313.9342, 1599273847882, -1599273835854, -0.0000, -0.0001