{"id":5505,"date":"2025-02-03T20:58:20","date_gmt":"2025-02-03T20:58:20","guid":{"rendered":"https:\/\/dalelane.co.uk\/blog\/?p=5505"},"modified":"2025-02-03T20:58:20","modified_gmt":"2025-02-03T20:58:20","slug":"running-openmessaging-benchmarks-on-your-kafka-cluster","status":"publish","type":"post","link":"https:\/\/dalelane.co.uk\/blog\/?p=5505","title":{"rendered":"Running OpenMessaging benchmarks on your Kafka cluster"},"content":{"rendered":"<p><strong>The <a href=\"https:\/\/openmessaging.cloud\/docs\/benchmarks\/\">OpenMessaging Benchmark Framework<\/a> is typically used to benchmark messaging systems in the cloud, but in this post I want to show how useful it can also be for Kafka clusters that you run yourself in Kubernetes (whether that is using the open source Strimzi operator, or IBM&#8217;s Event Streams).<\/strong><\/p>\n<p>From <a href=\"https:\/\/openmessaging.cloud\/docs\/benchmarks\">openmessaging.cloud<\/a>:<\/p>\n<blockquote><p>The OpenMessaging Benchmark Framework is a suite of tools that make it easy to benchmark distributed messaging systems.<\/p><\/blockquote>\n<p>As I&#8217;ve written about before (when illustrating the <a href=\"https:\/\/dalelane.co.uk\/blog\/?p=4822\">impact of setting quotas at the Kafka cluster level<\/a>, and when <a href=\"https:\/\/dalelane.co.uk\/blog\/?p=5281\">adding quotas at the event gateway level<\/a>), Apache Kafka comes with a good performance test tool. That is still my go-to option if I just want an easy way to push data through a Kafka cluster in bulk.<\/p>\n<p>But &#8211; OpenMessaging&#8217;s benchmark has some interesting features that make it a useful complement and worth considering.<\/p>\n<p>The benefit that OpenMessaging talk about the most is that can be used with a variety of messaging systems, such as RocketMQ, Pulsar, RabbitMQ, NATS, Redis and more &#8211; although in this post I&#8217;m only interested in using it to benchmark an Apache Kafka cluster.<\/p>\n<p>More interesting for me was their focus on <strong>realistic workloads<\/strong> rather than relying on static data.<\/p>\n<p>Quoting again from <a href=\"https:\/\/openmessaging.cloud\/docs\/benchmarks\">openmessaging.cloud<\/a>:<\/p>\n<blockquote><p>Benchmarks should be largely oriented toward standard use cases rather than bizarre edge cases<\/p><\/blockquote>\n<p><!--more-->I also like the way that the framework orchestrates running <strong>distributed benchmarks<\/strong>. It deploys a &#8220;driver&#8221; pod and multiple &#8220;worker&#8221; pods into your Kubernetes cluster.<\/p>\n<p>You open a terminal into the driver pod, and start a benchmark by running a command-line command. The driver pod makes HTTP calls to each of worker pods to get them all to participate in a distributed benchmark workload, and it collects the results from each worker into a single collated file for you.<\/p>\n<p>It also starts each benchmark by getting all of the worker pods to participate in a warmup phase, before it starts the actual measured benchmark.<\/p>\n<p>This all works well and it is a very simple system.<\/p>\n<h3>Specifying a benchmark<\/h3>\n<p>The command you run is just:<\/p>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">benchmark \\\n    --workers $WORKERS \\\n    --drivers DRIVER-NAME-HERE \\\n    WORKLOAD-NAME-HERE<\/pre>\n<p>The workers flag is where you provide the location of your worker pods, but the driver pod has the environment variable <code style=\"font-weight: bold; color: #770000;\">WORKERS<\/code> automatically configured for you, so that bit is easy.<\/p>\n<p>The only decisions you need to make are what <strong>driver<\/strong> and <strong>workload<\/strong> to use for your benchmark. Each one is defined as a simple, human-readable YAML file containing <a href=\"https:\/\/kafka.apache.org\/documentation\/#producerconfigs\">standard Kafka client configuration properties<\/a> so you can add your own if you want.<\/p>\n<h3>Choosing a driver<\/h3>\n<p>The <strong>driver<\/strong> option is where you specify <strong>how you want the Kafka clients used in your benchmark to behave<\/strong>.<\/p>\n<p>For example, do you want the clients optimised for high throughput (<a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/driver-kafka\/kafka-throughput.yaml\"><code style=\"font-weight: bold; color: #770000;\">kafka-throughput.yaml<\/code><\/a>) or low latency (<a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/driver-kafka\/kafka-latency.yaml\"><code style=\"font-weight: bold; color: #770000;\">kafka-latency.yaml<\/code><\/a>)?<\/p>\n<p>Do you want clients to use a compression algorithm (e.g. <a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/driver-kafka\/kafka-compression-gzip.yaml\"><code style=\"font-weight: bold; color: #770000;\">kafka-compression-gzip.yaml<\/code><\/a>, <a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/driver-kafka\/kafka-compression-zstd.yaml\"><code style=\"font-weight: bold; color: #770000;\">kafka-compression-zstd.yaml<\/code><\/a>, <a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/driver-kafka\/kafka-compression-lz4.yaml\"><code style=\"font-weight: bold; color: #770000;\">kafka-compression-lz4.yaml<\/code><\/a>)?<\/p>\n<p>Do you want the clients to wait for and produce large batches (e.g. <a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/driver-kafka\/kafka-big-batches.yaml\"><code style=\"font-weight: bold; color: #770000;\">kafka-big-batches.yaml<\/code><\/a>) or send events immediately without waiting (<a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/driver-kafka\/kafka-no-linger.yaml\"><code style=\"font-weight: bold; color: #770000;\">kafka-no-linger.yaml<\/code><\/a>)?<\/p>\n<p>Do you want the clients to optimise for preventing message duplication due to network retries (<a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/driver-kafka\/kafka-exactly-once.yaml\"><code style=\"font-weight: bold; color: #770000;\">kafka-exactly-once.yaml<\/code><\/a>)?<\/p>\n<p>And so on &#8211; you can see the <a href=\"https:\/\/github.com\/openmessaging\/benchmark\/tree\/master\/driver-kafka\">drivers available for Kafka benchmarks in the <code style=\"font-weight: bold;\">driver-kafka<\/code> folder<\/a>.<\/p>\n<h3>Choosing a workload<\/h3>\n<p>The <strong>workload<\/strong> option is where you specify <strong>what you want the Kafka clients to do<\/strong>.<\/p>\n<p>For example, how many topics do you want it to use? How many partitions should the topics have? How many consumers and producers do you want to run? Do you want the producers to run at a fixed rate, or to produce as fast as possible? What size messages do you want the producers to create? Do you want to produce fixed static data, or to generate random data? How long do you want the benchmark to run for? There are many choices!<\/p>\n<p>Each workload is defined as a human-readable YAML file &#8211; try clicking on one of the example workloads in the scrollable list below to see what they look like:<\/p>\n<ul style=\"max-height: 190px; overflow-y: scroll; background-color: #eeeeee; max-width: 80%;\">\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-1-partition-100b.yaml\">1-topic-1-partition-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-1-partition-1kb.yaml\">1-topic-1-partition-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-100-partitions-1kb-4p-4c-1000k.yaml\">1-topic-100-partitions-1kb-4p-4c-1000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-100-partitions-1kb-4p-4c-2000k.yaml\">1-topic-100-partitions-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-100-partitions-1kb-4p-4c-200k-backlog.yaml\">1-topic-100-partitions-1kb-4p-4c-200k-backlog.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-100-partitions-1kb-4p-4c-200k.yaml\">1-topic-100-partitions-1kb-4p-4c-200k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-100-partitions-1kb-4p-4c-500k.yaml\">1-topic-100-partitions-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-100-partitions-1kb.yaml\">1-topic-100-partitions-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-10000-partitions-1kb-4p-4c-1000k.yaml\">1-topic-10000-partitions-1kb-4p-4c-1000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-10000-partitions-1kb-4p-4c-2000k.yaml\">1-topic-10000-partitions-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-10000-partitions-1kb-4p-4c-200k.yaml\">1-topic-10000-partitions-1kb-4p-4c-200k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-10000-partitions-1kb-4p-4c-500k.yaml\">1-topic-10000-partitions-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-16-partition-100b.yaml\">1-topic-16-partition-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-16-partitions-1kb.yaml\">1-topic-16-partitions-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-3-partition-100b-3producers.yaml\">1-topic-3-partition-100b-3producers.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1-topic-6-partition-100b.yaml\">1-topic-6-partition-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/100-topic-1kb-4p-4c-2000k.yaml\">100-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/100-topic-1kb-4p-4c-500k.yaml\">100-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/100-topics-1-partitions-1kb.yaml\">100-topics-1-partitions-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/100k-topic-1kb-4p-4c-100k.yaml\">100k-topic-1kb-4p-4c-100k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/100k-topic-1kb-4p-4c-2000k.yaml\">100k-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/100k-topic-1kb-4p-4c-500k.yaml\">100k-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/10k-topic-1kb-4p-4c-100k.yaml\">10k-topic-1kb-4p-4c-100k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/10k-topic-1kb-4p-4c-2000k.yaml\">10k-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/10k-topic-1kb-4p-4c-500k.yaml\">10k-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1k-topic-1kb-4p-4c-100k.yaml\">1k-topic-1kb-4p-4c-100k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1k-topic-1kb-4p-4c-2000k.yaml\">1k-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1k-topic-1kb-4p-4c-500k.yaml\">1k-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1m-10-topics-1-partition-100b.yaml\">1m-10-topics-1-partition-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1m-10-topics-16-partitions-100b.yaml\">1m-10-topics-16-partitions-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1m-10-topics-2-partitions-100b.yaml\">1m-10-topics-2-partitions-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1m-10-topics-3-partitions-100b.yaml\">1m-10-topics-3-partitions-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1m-10-topics-4-partitions-100b.yaml\">1m-10-topics-4-partitions-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1m-10-topics-6-partitions-100b.yaml\">1m-10-topics-6-partitions-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1m-10-topics-9-partitions-100b.yaml\">1m-10-topics-9-partitions-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1m-topic-1kb-4p-4c-2000k.yaml\">1m-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/1m-topic-1kb-4p-4c-500k.yaml\">1m-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/200k-topic-1kb-4p-4c-100k.yaml\">200k-topic-1kb-4p-4c-100k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/200k-topic-1kb-4p-4c-2000k.yaml\">200k-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/200k-topic-1kb-4p-4c-500k.yaml\">200k-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/300k-topic-1kb-4p-4c-2000k.yaml\">300k-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/300k-topic-1kb-4p-4c-500k.yaml\">300k-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/400k-topic-1kb-4p-4c-2000k.yaml\">400k-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/400k-topic-1kb-4p-4c-500k.yaml\">400k-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/500-topic-1kb-4p-4c-2000k.yaml\">500-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/500-topic-1kb-4p-4c-500k.yaml\">500-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/500k-topic-1kb-4p-4c-2000k.yaml\">500k-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/500k-topic-1kb-4p-4c-500k.yaml\">500k-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/50k-topic-1kb-4p-4c-100k.yaml\">50k-topic-1kb-4p-4c-100k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/50k-topic-1kb-4p-4c-2000k.yaml\">50k-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/50k-topic-1kb-4p-4c-500k.yaml\">50k-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/5k-topic-1kb-4p-4c-100k.yaml\">5k-topic-1kb-4p-4c-100k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/5k-topic-1kb-4p-4c-2000k.yaml\">5k-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/5k-topic-1kb-4p-4c-500k.yaml\">5k-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/600k-topic-1kb-4p-4c-2000k.yaml\">600k-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/600k-topic-1kb-4p-4c-600k.yaml\">600k-topic-1kb-4p-4c-600k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/700k-topic-1kb-4p-4c-2000k.yaml\">700k-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/700k-topic-1kb-4p-4c-500k.yaml\">700k-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/800k-topic-1kb-4p-4c-2000k.yaml\">800k-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/800k-topic-1kb-4p-4c-500k.yaml\">800k-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/900k-topic-1kb-4p-4c-2000k.yaml\">900k-topic-1kb-4p-4c-2000k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/900k-topic-1kb-4p-4c-500k.yaml\">900k-topic-1kb-4p-4c-500k.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/backlog-1-topic-1-partition-1kb.yaml\">backlog-1-topic-1-partition-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/backlog-1-topic-16-partitions-1kb.yaml\">backlog-1-topic-16-partitions-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-1-partition-1p-1c-100b.yaml\">max-rate-1-topic-1-partition-1p-1c-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-1-partition-1p-1c-1kb.yaml\">max-rate-1-topic-1-partition-1p-1c-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-1-partition-1p-1c-64kb.yaml\">max-rate-1-topic-1-partition-1p-1c-64kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-1-partition-4p-1c-1kb.yaml\">max-rate-1-topic-1-partition-4p-1c-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-10-partitions-10p-10c-100b.yaml\">max-rate-1-topic-10-partitions-10p-10c-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-10-partitions-10p-10c-1kb.yaml\">max-rate-1-topic-10-partitions-10p-10c-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-10-partitions-10p-10c-64kb.yaml\">max-rate-1-topic-10-partitions-10p-10c-64kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-10-partitions-1p-1c-100b.yaml\">max-rate-1-topic-10-partitions-1p-1c-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-10-partitions-1p-1c-1kb.yaml\">max-rate-1-topic-10-partitions-1p-1c-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-10-partitions-1p-1c-64kb.yaml\">max-rate-1-topic-10-partitions-1p-1c-64kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-100-partitions-100b.yaml\">max-rate-1-topic-100-partitions-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-100-partitions-100p-100c-100b.yaml\">max-rate-1-topic-100-partitions-100p-100c-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-100-partitions-100p-100c-1kb.yaml\">max-rate-1-topic-100-partitions-100p-100c-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-100-partitions-100p-100c-64kb.yaml\">max-rate-1-topic-100-partitions-100p-100c-64kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-100-partitions-1kb.yaml\">max-rate-1-topic-100-partitions-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-100-partitions-1p-1c-100b.yaml\">max-rate-1-topic-100-partitions-1p-1c-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-100-partitions-1p-1c-1kb.yaml\">max-rate-1-topic-100-partitions-1p-1c-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-16-partitions-100b.yaml\">max-rate-1-topic-16-partitions-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-16-partitions-1kb.yaml\">max-rate-1-topic-16-partitions-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-20-partitions-20p-20c-100b.yaml\">max-rate-1-topic-20-partitions-20p-20c-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-20-partitions-20p-20c-1kb.yaml\">max-rate-1-topic-20-partitions-20p-20c-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-20-partitions-20p-20c-64kb.yaml\">max-rate-1-topic-20-partitions-20p-20c-64kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-30-partitions-30p-30c-100b.yaml\">max-rate-1-topic-30-partitions-30p-30c-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-30-partitions-30p-30c-1kb.yaml\">max-rate-1-topic-30-partitions-30p-30c-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-40-partitions-40p-40c-100b.yaml\">max-rate-1-topic-40-partitions-40p-40c-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-40-partitions-40p-40c-1kb.yaml\">max-rate-1-topic-40-partitions-40p-40c-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-40-partitions-40p-40c-64kb.yaml\">max-rate-1-topic-40-partitions-40p-40c-64kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-50-partitions-50p-50c-100b.yaml\">max-rate-1-topic-50-partitions-50p-50c-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-50-partitions-50p-50c-1kb.yaml\">max-rate-1-topic-50-partitions-50p-50c-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-60-partitions-60p-60c-100b.yaml\">max-rate-1-topic-60-partitions-60p-60c-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-60-partitions-60p-60c-1kb.yaml\">max-rate-1-topic-60-partitions-60p-60c-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-60-partitions-60p-60c-64kb.yaml\">max-rate-1-topic-60-partitions-60p-60c-64kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-70-partitions-70p-70c-100b.yaml\">max-rate-1-topic-70-partitions-70p-70c-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-70-partitions-70p-70c-1kb.yaml\">max-rate-1-topic-70-partitions-70p-70c-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-80-partitions-80p-80c-100b.yaml\">max-rate-1-topic-80-partitions-80p-80c-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-80-partitions-80p-80c-1kb.yaml\">max-rate-1-topic-80-partitions-80p-80c-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-80-partitions-80p-80c-64kb.yaml\">max-rate-1-topic-80-partitions-80p-80c-64kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-90-partitions-90p-90c-100b.yaml\">max-rate-1-topic-90-partitions-90p-90c-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-90-partitions-90p-90c-1kb.yaml\">max-rate-1-topic-90-partitions-90p-90c-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-10-topics-1-partition-100b.yaml\">max-rate-10-topics-1-partition-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-10-topics-1-partition-1kb.yaml\">max-rate-10-topics-1-partition-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-10-topics-1-partition-64kb.yaml\">max-rate-10-topics-1-partition-64kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-100-topics-1-partition-100b.yaml\">max-rate-100-topics-1-partition-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-100-topics-1-partition-1kb.yaml\">max-rate-100-topics-1-partition-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-100-topics-1-partition-64kb.yaml\">max-rate-100-topics-1-partition-64kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-20-topics-1-partition-100b.yaml\">max-rate-20-topics-1-partition-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-20-topics-1-partition-1kb.yaml\">max-rate-20-topics-1-partition-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-20-topics-1-partition-64kb.yaml\">max-rate-20-topics-1-partition-64kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-30-topics-1-partition-100b.yaml\">max-rate-30-topics-1-partition-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-30-topics-1-partition-1kb.yaml\">max-rate-30-topics-1-partition-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-40-topics-1-partition-100b.yaml\">max-rate-40-topics-1-partition-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-40-topics-1-partition-1kb.yaml\">max-rate-40-topics-1-partition-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-40-topics-1-partition-64kb.yaml\">max-rate-40-topics-1-partition-64kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-50-topics-1-partition-100b.yaml\">max-rate-50-topics-1-partition-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-50-topics-1-partition-1kb.yaml\">max-rate-50-topics-1-partition-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-60-topics-1-partition-100b.yaml\">max-rate-60-topics-1-partition-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-60-topics-1-partition-1kb.yaml\">max-rate-60-topics-1-partition-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-60-topics-1-partition-64kb.yaml\">max-rate-60-topics-1-partition-64kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-70-topics-1-partition-100b.yaml\">max-rate-70-topics-1-partition-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-70-topics-1-partition-1kb.yaml\">max-rate-70-topics-1-partition-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-80-topics-1-partition-100b.yaml\">max-rate-80-topics-1-partition-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-80-topics-1-partition-1kb.yaml\">max-rate-80-topics-1-partition-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-80-topics-1-partition-64kb.yaml\">max-rate-80-topics-1-partition-64kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-90-topics-1-partition-100b.yaml\">max-rate-90-topics-1-partition-100b.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/max-rate-90-topics-1-partition-1kb.yaml\">max-rate-90-topics-1-partition-1kb.yaml<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openmessaging\/benchmark\/blob\/master\/workloads\/simple-workload.yaml\">simple-workload.yaml<\/a><\/li>\n<\/ul>\n<p>This means that running a benchmark looks something like:<\/p>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">benchmark \\\n    --workers $WORKERS \\\n    --drivers driver-kafka\/kafka-exactly-once.yaml \\\n    workloads\/1-topic-1-partition-1kb.yaml<\/pre>\n<p>The permutations enabled by the choice of drivers (how the Kafka clients should behave) and workloads (what the Kafka clients should do) makes for a large range of possible benchmarks you can run.<\/p>\n<p>(And as all of these are defined in simple YAML files, it&#8217;s simple for you to define additional custom benchmarks.)<\/p>\n<p>To illustrate the huge difference that your choice makes, I picked a half-dozen example combinations and ran them against my simple three-broker Kafka cluster.<\/p>\n<p>I&#8217;ve only picked out a couple of metrics for each of my benchmarks (messasges per second and MB per second) but the benchmark framework collects much much more than this.<\/p>\n<p>Click on the &#8220;results&#8221; link in each row to see the full detail (<em>scroll to the right if you don&#8217;t see it<\/em>)<\/p>\n<div style=\"max-width: -moz-fit-content; max-width: fit-content; margin: 0 auto; overflow-x: auto; white-space: nowrap; font-size: 0.8em;\">\n<table style=\"border-collapse: collapse;\" cellpadding=6 border=1>\n<tr>\n<th rowspan=2>driver<\/th>\n<th rowspan=2>workload<\/th>\n<th colspan=2>produce<\/th>\n<th colspan=2>consume<\/th>\n<th rowspan=2 colspan=2> <\/th>\n<\/tr>\n<tr>\n<th style=\"font-size: 0.9em;\">msg\/s<\/th>\n<th style=\"font-size: 0.9em;\">MB\/s<\/th>\n<th style=\"font-size: 0.9em;\">msg\/s<\/th>\n<th style=\"font-size: 0.9em;\">MB\/s<\/th>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/github.com\/dalelane\/benchmark\/blob\/master\/driver-kafka\/kafka-compression-gzip.yaml\">compression-gzip<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/dalelane\/benchmark\/blob\/master\/workloads\/max-rate-20-topics-1-partition-100b.yaml\">max-rate-20-topics-1-partition-100b<\/a><\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">1578603<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">151<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">1578423<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">151<\/td>\n<td><a href=\"https:\/\/gist.github.com\/dalelane\/3e1aab7d997f6226f5dc32d351a17b19#file-kafka-compression-gzip-max-rate-20-topics-1-partition-100b-txt\">log<\/a><\/td>\n<td><a href=\"https:\/\/gist.github.com\/dalelane\/3e1aab7d997f6226f5dc32d351a17b19#file-kafka-compression-gzip-max-rate-20-topics-1-partition-100b-json\">results<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/github.com\/dalelane\/benchmark\/blob\/master\/driver-kafka\/kafka-throughput.yaml\">throughput<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/dalelane\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-10-partitions-1p-1c-100b.yaml\">max-rate-1-topic-10-partitions-1p-1c-100b<\/a><\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">418847<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">40<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">418781<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">40<\/td>\n<td><a href=\"https:\/\/gist.github.com\/dalelane\/5c58b64c70f23820f1f504289eacea42#file-kafka-throughput-max-rate-1-topic-10-partitions-1p-1c-100b-txt\">log<\/a><\/td>\n<td><a href=\"https:\/\/gist.github.com\/dalelane\/5c58b64c70f23820f1f504289eacea42#file-kafka-throughput-max-rate-1-topic-10-partitions-1p-1c-100b-json\">results<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/github.com\/dalelane\/benchmark\/blob\/master\/driver-kafka\/kafka-big-batches-gzip.yaml\">big-batches-gzip<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/dalelane\/benchmark\/blob\/master\/workloads\/max-rate-1-topic-10-partitions-10p-10c-1kb.yaml\">max-rate-1-topic-10-partitions-10p-10c-1kb<\/a><\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">109381<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">107<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">109385<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">107<\/td>\n<td><a href=\"https:\/\/gist.github.com\/dalelane\/f476b6802116df0e5dc032ff9961831d#file-kafka-big-batches-gzip-max-rate-1-topic-10-partitions-10p-10c-1kb-txt\">log<\/a><\/td>\n<td><a href=\"https:\/\/gist.github.com\/dalelane\/f476b6802116df0e5dc032ff9961831d#file-kafka-big-batches-gzip-max-rate-1-topic-10-partitions-10p-10c-1kb-json\">results<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/github.com\/dalelane\/benchmark\/blob\/master\/driver-kafka\/kafka-big-batches.yaml\">big-batches<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/dalelane\/benchmark\/blob\/master\/workloads\/1-topic-16-partition-100b.yaml\">1-topic-16-partition-100b<\/a><\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">50029<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">5<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">50021<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">5<\/td>\n<td><a href=\"https:\/\/gist.github.com\/dalelane\/f42730c8e7065166ac60e456dd3a7ff4#file-kafka-big-batches-1-topic-16-partition-100b-txt\">log<\/a><\/td>\n<td><a href=\"https:\/\/gist.github.com\/dalelane\/f42730c8e7065166ac60e456dd3a7ff4#file-kafka-big-batches-1-topic-16-partition-100b-json\">results<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/github.com\/dalelane\/benchmark\/blob\/master\/driver-kafka\/kafka-throughput.yaml\">throughput<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/dalelane\/benchmark\/blob\/master\/workloads\/1-topic-16-partitions-1kb.yaml\">1-topic-16-partitions-1kb<\/a><\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">46408<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">45<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">46414<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">45<\/td>\n<td><a href=\"https:\/\/gist.github.com\/dalelane\/b2323142df6df4fe67bed867c15738e9#file-kafka-throughput-1-topic-16-partitions-1kb-txt\">log<\/a><\/td>\n<td><a href=\"https:\/\/gist.github.com\/dalelane\/b2323142df6df4fe67bed867c15738e9#file-kafka-throughput-1-topic-16-partitions-1kb-json\">results<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/github.com\/dalelane\/benchmark\/blob\/master\/driver-kafka\/kafka-exactly-once.yaml\">exactly-once<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/dalelane\/benchmark\/blob\/master\/workloads\/1-topic-1-partition-1kb.yaml\">1-topic-1-partition-1kb<\/a><\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">21778<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">21<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">21777<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">21<\/td>\n<td><a href=\"https:\/\/gist.github.com\/dalelane\/86850d4efdc74632b9c4e97e243b36e3#file-kafka-exactly-once-1-topic-1-partition-1kb-txt\">log<\/a><\/td>\n<td><a href=\"https:\/\/gist.github.com\/dalelane\/86850d4efdc74632b9c4e97e243b36e3#file-kafka-exactly-once-1-topic-1-partition-1kb-json\">results<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/github.com\/dalelane\/benchmark\/blob\/master\/driver-kafka\/kafka-compression-lz4.yaml\">compression-lz4<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/dalelane\/benchmark\/blob\/master\/workloads\/max-rate-10-topics-1-partition-64kb.yaml\">max-rate-10-topics-1-partition-64kb<\/a><\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">2092<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">131<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">2093<\/td>\n<td style=\"font-family: monospace; text-align: right; font-size: 1.2em;\">131<\/td>\n<td><a href=\"https:\/\/gist.github.com\/dalelane\/201f22fc79d78569a79f8dd40ff76f5a#file-kafka-compression-lz4-max-rate-10-topics-1-partition-64kb-txt\">log<\/a><\/td>\n<td><a href=\"https:\/\/gist.github.com\/dalelane\/201f22fc79d78569a79f8dd40ff76f5a#file-kafka-compression-lz4-max-rate-10-topics-1-partition-64kb-json\">results<\/a><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>How to use a benchmark<\/h3>\n<p>The point I&#8217;m highlighting here is that there isn&#8217;t a single benchmark that gives you a definitive single result for how fast your Kafka cluster can go.<\/p>\n<p><strong>Different benchmarks will give you an indication of how your Kafka cluster could perform to support different types of workloads. By choosing (or writing) an appropriate driver and workload, you can get a tailored benchmark that reflects your own use case.<\/strong><\/p>\n<p>This can be useful in an absolute way (validating how your Kafka cluster will support your expected workload). It can be particularly useful in a relative way, by comparing the results from running the same benchmark in two different environments (such as comparing a dev\/test environment with a prod environment, or comparing an old environment with a new environment ahead of a migration).<\/p>\n<h3>Running a benchmark<\/h3>\n<p>Finally, I&#8217;ll end with a more detailed walkthrough for how to run a benchmark &#8211; by showing you how I got the results I linked to above.<\/p>\n<h4>step 0 &#8211; you need a Kafka cluster<\/h4>\n<p>I did this both using <a href=\"https:\/\/strimzi.io\/\">Strimzi<\/a> and <a href=\"https:\/\/www.ibm.com\/products\/event-streams\">IBM Event Streams<\/a>. If you want to repeat what I&#8217;ve done below, you can use <a href=\"https:\/\/gist.github.com\/dalelane\/824b2ea59ae1b668bf92abe339eca2ab#file-strimzi-yaml\">my Strimzi specification<\/a>, or <a href=\"https:\/\/gist.github.com\/dalelane\/824b2ea59ae1b668bf92abe339eca2ab#file-event-streams-yaml\">my Event Streams specification<\/a>.<\/p>\n<h4>step 1 &#8211; clone the benchmark repository<\/h4>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">git clone https:\/\/github.com\/openmessaging\/benchmark.git\ncd benchmark<\/pre>\n<h4>step 2 &#8211; update as needed<\/h4>\n<p>I made two tweaks:<\/p>\n<p>I updated the version of Java from Java 8 to Java 17 (<a href=\"https:\/\/github.com\/dalelane\/benchmark\/commit\/c3c19ff6f909edd5a5a810cadd57d22b42acb8a5\">commit<\/a>).<\/p>\n<p>I updated the bootstrap.servers address in all of the <code style=\"font-weight: bold;\">driver-kafka<\/code> files to point at my Kafka cluster (<a href=\"https:\/\/github.com\/dalelane\/benchmark\/commit\/db97d8e90b9463c473dd996cc5fd1765907d5889\">commit<\/a>). If you need to add any additional config to connect to your Kafka cluster (e.g. configure authentication with <code style=\"font-weight: bold;\">sasl.jaas.config<\/code>) then you should do that as well.<\/p>\n<h4>step 3 &#8211; build the benchmark applications<\/h4>\n<p>I used Java 17 for this, too.<\/p>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">export JAVA_HOME=$(\/usr\/libexec\/java_home -v 17)\nexport PATH=$JAVA_HOME\/bin:$PATH\nmvn install -DskipTests<\/pre>\n<h4>step 4 &#8211; build a container image with the benchmark applications<\/h4>\n<p>You need an image registry to host the image. This could be a public registry like quay or dockerhub, but I hosted my container image on the OpenShift cluster where I ran the benchmark.<\/p>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">oc login ...\noc new-project openmessaging\nexport REGISTRY=`oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}'`\ndocker login -u `oc whoami` -p `oc whoami --show-token` ${REGISTRY}<\/pre>\n<p>Wherever you put your image, set the <code style=\"font-weight: bold; color: #770000;\">REGISTRY<\/code> environment variable to match for the commands below.<\/p>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">export BENCHMARK_TARBALL=package\/target\/openmessaging-benchmark-0.0.1-SNAPSHOT-bin.tar.gz\ndocker build --platform linux\/amd64 --build-arg BENCHMARK_TARBALL . -f docker\/Dockerfile -t ${REGISTRY}\/openmessaging\/benchmark:latest\ndocker push ${REGISTRY}\/openmessaging\/benchmark:latest<\/pre>\n<h4>step 5 &#8211; deploy the benchmark pods<\/h4>\n<p>You will need to update the benchmark Helm chart to point at the image you built in step 4. (<a href=\"https:\/\/github.com\/dalelane\/benchmark\/commit\/46c904a4ab57b7f786f27a288ea7aba3cc30652a\">commit<\/a>)<\/p>\n<p>Once you&#8217;ve done this, it&#8217;s just a <code style=\"font-weight: bold; color: #770000;\">helm install<\/code> command to get the benchmark pods ready.<\/p>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">cd deployment\/kubernetes\/helm\nhelm install --namespace openmessaging benchmark benchmark<\/pre>\n<h4>step 6 &#8211; run your benchmark<\/h4>\n<p>You can exec into the driver pod to start your benchmark.<\/p>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">oc exec -n openmessaging -it benchmark-driver -- bash<\/pre>\n<p>For example, I ran:<\/p>\n<hr \/>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">bin\/benchmark \\\n    --workers $WORKERS \\\n    --drivers driver-kafka\/kafka-throughput.yaml \\\n    workloads\/1-topic-16-partitions-1kb.yaml<\/pre>\n<p>and <a href=\"https:\/\/gist.github.com\/dalelane\/b2323142df6df4fe67bed867c15738e9\">copied the results to a gist<\/a><br \/>\n<\/p>\n<hr \/>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">bin\/benchmark \\\n    --workers $WORKERS \\\n    --drivers driver-kafka\/kafka-compression-zstd.yaml \\\n    workloads\/max-rate-20-topics-1-partition-100b.yaml<\/pre>\n<p>and <a href=\"https:\/\/gist.github.com\/dalelane\/3e1aab7d997f6226f5dc32d351a17b19\">copied the results to a gist<\/a><br \/>\n<\/p>\n<hr \/>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">bin\/benchmark \\\n    --workers $WORKERS \\\n    --drivers driver-kafka\/kafka-big-batches-gzip.yaml \\\n    workloads\/max-rate-1-topic-10-partitions-10p-10c-1kb.yaml<\/pre>\n<p>and <a href=\"https:\/\/gist.github.com\/dalelane\/f476b6802116df0e5dc032ff9961831d\">copied the results to a gist<\/a><br \/>\n<\/p>\n<hr \/>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">bin\/benchmark \\\n    --workers $WORKERS \\\n    --drivers driver-kafka\/kafka-big-batches.yaml \\\n    workloads\/1-topic-16-partition-100b.yaml<\/pre>\n<p>and <a href=\"https:\/\/gist.github.com\/dalelane\/f42730c8e7065166ac60e456dd3a7ff4\">copied the results to a gist<\/a><br \/>\n<\/p>\n<hr \/>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">bin\/benchmark \\\n    --workers $WORKERS \\\n    --drivers driver-kafka\/kafka-throughput.yaml \\\n    workloads\/max-rate-1-topic-10-partitions-1p-1c-100b.yaml<\/pre>\n<p>and <a href=\"https:\/\/gist.github.com\/dalelane\/5c58b64c70f23820f1f504289eacea42\">copied the results to a gist<\/a><br \/>\n<\/p>\n<hr \/>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">bin\/benchmark \\\n    --workers $WORKERS \\\n    --drivers driver-kafka\/kafka-exactly-once.yaml \\\n    workloads\/1-topic-1-partition-1kb.yaml<\/pre>\n<p>and <a href=\"https:\/\/gist.github.com\/dalelane\/86850d4efdc74632b9c4e97e243b36e3\">copied the results to a gist<\/a><br \/>\n<\/p>\n<hr \/>\n<pre style=\"border: 1px solid #AA0000; color: #770000; background-color: #FFFFC0; padding: 1em; overflow-y: scroll; overflow-x: scroll; font-size: 1em; white-space: pre; max-height: 600px; margin-bottom: 0\">bin\/benchmark \\\n    --workers $WORKERS \\\n    --drivers driver-kafka\/kafka-compression-lz4.yaml \\\n    workloads\/max-rate-10-topics-1-partition-64kb.yaml<\/pre>\n<p>and <a href=\"https:\/\/gist.github.com\/dalelane\/201f22fc79d78569a79f8dd40ff76f5a\">copied the results to a gist<\/a><br \/>\n<\/p>\n<hr \/>\n<p>\nYou get the idea&#8230; Now try it for yourself!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The OpenMessaging Benchmark Framework is typically used to benchmark messaging systems in the cloud, but in this post I want to show how useful it can also be for Kafka clusters that you run yourself in Kubernetes (whether that is using the open source Strimzi operator, or IBM&#8217;s Event Streams). From openmessaging.cloud: The OpenMessaging Benchmark [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,4],"tags":[593,583,584],"class_list":["post-5505","post","type-post","status-publish","format-standard","hentry","category-code","category-ibm","tag-apachekafka","tag-ibmeventstreams","tag-kafka"],"_links":{"self":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5505"}],"version-history":[{"count":0,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5505\/revisions"}],"wp:attachment":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}