-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
performance testing/tuning/refactoring #30
Comments
The following is an unscientific and incomplete performance comparison of pony kafka with librdkafka to get an idea of how far we have to go. It is by no way meant to be definitive nor a real benchmark. TLDR:
All testing was done on an make cluster cluster_name=dh2 mem_required=30 cpus_required=32 num_followers=0 force_instance=i3.8xlarge spot_bid_factor=100 ansible_system_cpus=0,16 no_spot=true cluster_project_name=wallaroo_dev ansible_install_devtools=true This includes the following:
The following steps were taken after ssh'ing in: Clone pony-kafka: cd ~
git clone https://github.com/WallarooLabs/pony-kafka
cd ~/pony-kafka
git checkout code_improvements_new Build pony-kafka performance app: cd ~/pony-kafka
ponyc examples/performance Clone librdkafka: cd ~
git clone https://github.com/edenhill/librdkafka
cd ~/librdkafka
git checkout v0.11.3 Build librdkafka performance app: cd ~/librdkafka
./configure
make examples Install java/kafka: ~/pony-kafka/misc/kafka/download_kafka_java.sh Everything was run using Start zookeeper: numactl -C 15 chrt -f 80 env KAFKA_HEAP_OPTS="-Xmx40960M -Xms40960M" ~/pony-kafka/misc/kafka/start_zookeeper.sh Start kafka broker 0: numactl -C 12-14 chrt -f 80 env KAFKA_HEAP_OPTS="-Xmx40960M -Xms40960M" ~/pony-kafka/misc/kafka/start_kafka_0.sh Start kafka broker 1: numactl -C 9-11 chrt -f 80 env KAFKA_HEAP_OPTS="-Xmx40960M -Xms40960M" ~/pony-kafka/misc/kafka/start_kafka_1.sh Start kafka broker 2: numactl -C 6-8 chrt -f 80 env KAFKA_HEAP_OPTS="-Xmx40960M -Xms40960M" ~/pony-kafka/misc/kafka/start_kafka_2.sh Create topic: ~/pony-kafka/misc/kafka/create_replicate_topic.sh Producing tests (acks = -1): Everything was run using Each application was run 3 times alternating between one and the other. Run librdkafka performance app in producer mode with acks=-1: cd ~/librdkafka
numactl -C 1-5 chrt -f 80 ./examples/rdkafka_performance -P -t test -s 100 -c 1000000 -m "_____________Test2:OneBrokers:500kmsgs:100bytes" -S 1 -a -1 -b 127.0.0.1:9092 Results: Run 1:
Run 2:
Run 3:
Run pony-kafka performance app in producer mode with acks=-1: cd ~/pony-kafka
numactl -C 1-5 chrt -f 80 ./performance --client_mode producer --produce_message_size 100 --num_messages 1000000 --brokers 127.0.0.1:9092 --produce_acks -1 --topic test --ponythreads 4 --ponyminthreads 4 --ponypinasio --ponynoblock Results: Run 1:
Run 2:
Run 3:
Producing tests (acks = 1): Everything was run using Each application was run 3 times alternating between one and the other. Run librdkafka performance app in producer mode with acks=1:
Results: Run 1:
Run 2:
Run 3:
Run pony-kafka performance app in producer mode with acks=1:
Results: Run 1:
Run 2:
Run 3:
Producing tests (acks = 0): Everything was run using Each application was run 3 times alternating between one and the other. Run librdkafka performance app in producer mode with acks=0: cd ~/librdkafka
numactl -C 1-5 chrt -f 80 ./examples/rdkafka_performance -P -t test -s 100 -c 1000000 -m "_____________Test2:OneBrokers:500kmsgs:100bytes" -S 1 -a 0 -b 127.0.0.1:9092 Results: Run 1:
Run 2:
Run 3:
Run pony-kafka performance app in producer mode with acks=0: cd ~/pony-kafka
numactl -C 1-5 chrt -f 80 ./performance --client_mode producer --produce_message_size 100 --num_messages 1000000 --brokers 127.0.0.1:9092 --produce_acks 0 --topic test --ponythreads 4 --ponyminthreads 4 --ponypinasio --ponynoblock Results: Run 1:
Run 2:
Run 2:
Consuming tests: Everything was run using Each application was run 3 times alternating between one and the other. Prior to running this, data was loaded into kafka using Run librdkafka performance app in consumer mode: cd ~/librdkafka
numactl -C 1-5 chrt -f 80 ./examples/rdkafka_performance -C -t test -b 127.0.0.1:9092 -o beginning -c 10000000 -G test1 # use a unique number each time (1,2,3) Results: Run 1:
Run 2:
Run 3:
Run pony-kafka performance app in consumer mode: cd ~/pony-kafka
numactl -C 1-5 chrt -f 80 ./performance --client_mode consumer --num_messages 10000000 --brokers 127.0.0.1:9092 --topic test --ponythreads 4 --ponyminthreads 4 --ponypinasio --ponynoblock Results: Run 1:
Run 2:
Run 3:
|
Good work on the client and the blog post - a lot of good insight into early stage client development. 👍 You might want to try rdkafka_performance with |
@edenhill Thank you very much for the kind words. As mentioned in the blog post, I'll definitely do another round of testing with the |
The code is mostly unoptimized except for some performance oriented design decisions to keep things as asynchronous as possible.
This code should be properly performance tested and tuned as required.
The text was updated successfully, but these errors were encountered: