Announcing Azul Vulnerability Detection - a revolutionary new product that addresses critical security gaps in your software supply chain
Support
Blog chevron_right Performance

Apache Kafka Throughput on Azul Platform Prime vs OpenJDK

Today we continue in our series of articles measuring performance of Azul Platform Prime against vanilla OpenJDK. In past articles, we have looked at Renaissance benchmark and Solr. Today, we look at Kafka, one of the most popular event streaming platforms in the community today.

Azul Zulu Prime (formerly known as “Zing”) is a part of the Azul Platform Prime offering. Azul Zulu Prime is based on OpenJDK, and enhanced with performance, efficiency, and scaling features including the Falcon JIT Compiler, the C4 Pauseless Garbage Collector, and many others. We compare Kafka performance on Azul Zulu Prime with Kafka performance on “unimproved” OpenJDK and use Azul’s Zulu Builds of OpenJDK as a basis for OpenJDK measurement.

Apache Kafka Measurement Methodology

Our Simple Kafka End-to-End benchmark measures producer and consumer throughput and overall latency on a simple Kafka installation. We run with three Kafka broker nodes and one node for Zookeeper. We also ran the benchmark itself on the Zookeeper node. The AMI and instance sizes were as follows:

  • AMI: ami-0747bdcabd34c712a (UBUNTU18)
  • 1 node (c5.2xlarge) – for Zookeeper and kafka-e2e-benchmark. Zookeeper Heap: 1GB
  • 3 nodes (i3en.2xlarge) – for Kafka brokers. Kafka Broker Heap: 40GB
  • 1 node (m5n.8xlarge) – for load generator. Note that the size of the node running the load generator has a big impact on the scores. When we ran the load generator on a smaller AWS instance type we saw, it became a bottleneck and, as a result, Azul Platform Prime scores were lower compared to OpenJDK.

The only OSS configuration we performed on the instances was to configure Transparent Huge Pages:

$ echo madvise | sudo tee /sys/kernel/mm/transparent_hugepage/enable
$ echo advise | sudo tee /sys/kernel/mm/transparent_hugepage/shmem_enabled
$ echo defer | sudo tee /sys/kernel/mm/transparent_hugepage/defrag
$ echo 1 | sudo tee /sys/kernel/mm/transparent_hugepage/khugepaged/defrag

For Kafka configuration, we used the following parameters:

  • Partitions: 3
  • replicationFactor: 3
  • producerThreads: 3
  • consumerThreads: 3
  • acks: 1
  • messageLength: 1000
  • batchSize: 0
  • warmupTime: 600s
  • runTime: 600s

For full instructions on running the tests and parsing output, see the benchmark GitHub page.

Azul Platform Prime vs OpenJDK Benchmark Results

In our tests, Azul Platform Prime achieved a 45% higher maximum throughput than OpenJDK. We measured maximum throughput by increasing the load on the server by 5000 requests per second until we reached the point at which Kafka could not reach the higher load. Maximum throughput in our tests was as follows:

Kafka Max Throughput (requests/sec)

Azul Zulu Prime 155797
OpenJDK 107805

Try Azul Platform Prime Yourself

Azul Platform Prime Stream Builds are free for development and evaluation. Try it yourself.