export zookeepers=$(maprcli node listzookeepers -noheader) export bootstrap_servers=$(maprcli node list -columns hostname -noheader -filter csvc==kafka | awk '{ print $1 }' | head -1) # Producer # Setup bin/kafka-topics.sh --zookeeper $zookeepers --create --topic test-rep-one --partitions 6 --replication-factor 1 bin/kafka-topics.sh --zookeeper $zookeepers --create --topic test --partitions 6 --replication-factor 3 # Single thread, no replication bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=${bootstrap_servers}:9092 buffer.memory=67108864 batch.size=8196 # Single-thread, async 3x replication bin/kafka-topics.sh --zookeeper $zookeepers --create --topic test --partitions 6 --replication-factor 3 bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test6 50000000 100 -1 acks=1 bootstrap.servers=${bootstrap_servers}:9092 buffer.memory=67108864 batch.size=8196 # Single-thread, sync 3x replication bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test 50000000 100 -1 acks=-1 bootstrap.servers=${bootstrap_servers}:9092 buffer.memory=67108864 batch.size=64000 # Three Producers, 3x async replication bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test 50000000 100 -1 acks=1 bootstrap.servers=${bootstrap_servers}:9092 buffer.memory=67108864 batch.size=8196 # Throughput Versus Stored Data bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test 50000000000 100 -1 acks=1 bootstrap.servers=${bootstrap_servers}:9092 buffer.memory=67108864 batch.size=8196 # Effect of message size for i in 10 100 1000 10000 100000; do echo "" echo $i bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test $((1000*1024*1024/$i)) $i -1 acks=1 bootstrap.servers=${bootstrap_servers}:9092 buffer.memory=67108864 batch.size=128000 done; # Consumer # Consumer throughput bin/kafka-consumer-perf-test.sh --zookeeper $zookeepers --messages 50000000 --topic test --threads 1 # 3 Consumers # On three servers, run: bin/kafka-consumer-perf-test.sh --zookeeper $zookeepers --messages 50000000 --topic test --threads 1 # End-to-end Latency bin/kafka-run-class.sh kafka.tools.TestEndToEndLatency ${bootstrap_servers}:9092 $zookeepers test 5000 # Producer and consumer bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test 50000000 100 -1 acks=1 bootstrap.servers=${bootstrap_servers}:9092 buffer.memory=67108864 batch.size=8196 bin/kafka-consumer-perf-test.sh --zookeeper $zookeepers --messages 50000000 --topic test --threads 1