消费者测试:
./kafka-consumer-perf-test.sh --zookeeper vm10.60.0.11.com.cn:2181,vm10.60.0.7.com.cn:2181,vm10.60.0.8.com.cn:2181 --group test-teg1 --messages 50000000 --topic test --threads 8 --message-size 1000
end.time, data.consumed.in.MB, MB.sec, data.consumed.in.nMsg, nMsg.sec SLF4J: Class path contains multiple SLF4J bindings. SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] 2018-10-11 16:04:44:043, 2018-10-11 16:05:49:560, 4229.5218, 64.5561, 23931694, 365274.5700
生产者测试:
./kafka-run-class.sh org.apache.kafka.tools.ProducerPerformance --topic test --num-records 50000000 --record-size 100 --throughput 100000 --producer-props acks=1 bootstrap.servers=vm10.60.0.7.com.cn:9092,vm10.60.0.8.com.cn:9092,vm10.60.0.12.com.cn:9092,vm10.60.0.13.com.cn:9092 buffer.memory=67108864 batch.size=8196
485142 records sent, 97028.4 records/sec (9.25 MB/sec), 6936.5 ms avg latency, 12667.0 max latency. 337630 records sent, 67526.0 records/sec (6.44 MB/sec), 7173.8 ms avg latency, 12892.0 max latency. 539739 records sent, 107861.5 records/sec (10.29 MB/sec), 6893.6 ms avg latency, 12422.0 max latency. 519729 records sent, 103945.8 records/sec (9.91 MB/sec), 6092.3 ms avg latency, 12278.0 max latency. 456663 records sent, 90107.1 records/sec (8.59 MB/sec), 5697.1 ms avg latency, 11117.0 max latency. 432484 records sent, 86496.8 records/sec (8.25 MB/sec), 6481.3 ms avg latency, 13293.0 max latency. 324879 records sent, 64975.8 records/sec (6.20 MB/sec), 7089.8 ms avg latency, 14868.0 max latency. 517991 records sent, 103598.2 records/sec (9.88 MB/sec), 7504.3 ms avg latency, 14920.0 max latency. 478320 records sent, 94194.6 records/sec (8.98 MB/sec), 6949.2 ms avg latency, 12826.0 max latency. 478230 records sent, 94232.5 records/sec (8.99 MB/sec), 6075.5 ms avg latency, 12400.0 max latency. 431201 records sent, 86240.2 records/sec (8.22 MB/sec), 6492.0 ms avg latency, 11988.0 max latency. 325704 records sent, 65140.8 records/sec (6.21 MB/sec), 8248.2 ms avg latency, 12531.0 max latency. 490254 records sent, 96716.1 records/sec (9.22 MB/sec), 7083.7 ms avg latency, 13378.0 max latency. 466362 records sent, 92734.5 records/sec (8.84 MB/sec), 7065.3 ms avg latency, 12572.0 max latency. 420405 records sent, 84081.0 records/sec (8.02 MB/sec), 6897.7 ms avg latency, 11279.0 max latency. 444416 records sent, 88883.2 records/sec (8.48 MB/sec), 6607.1 ms avg latency, 11112.0 max latency. 502765 records sent, 100553.0 records/sec (9.59 MB/sec), 6767.4 ms avg latency, 11248.0 max latency. 387823 records sent, 77564.6 records/sec (7.40 MB/sec), 7328.2 ms avg latency, 10982.0 max latency.