Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The details of the calculation can be provided per request.

Appendix: Performance Data

Configuration

Cluster: 3 brokers

Topic perf_cloud_native: 2-way replicated, one leader (AZ: use1-az4) writes to cloud storage, one reader (AZ: use1-az6) reads from cloud storage (uses KIP-1176 code)

Topic perf_local_disk: 2-way replicated (for fair comparison), standard replication path, leader (AZ: use1-az4) writes to local disk, follower (AZ: use1-az6) reads via cross AZ-transfer

Each topic has 1 partition.

Results

End to End Latency

A custom script was run to determine end-to-end-latency, which is defined here as the difference between system time when a record is consumed and system time when a record is created in memory on the producer side. The other producer/consumer metrics are all standard.

Workload

100 records, 1.6 KB avg record size, max batch size 32kb, acks=1, consumer client.rack=use1-az6 (read from follower)

Metrics

Metricperf_local_disk

perf_cloud_native

Producer Metrics

batch-size-avg3101931479
batch-size-max3256931481
record-queue-time-avg8.48.2
record-queue-time-max1010
record-send-total100100
record-size-avg16251648
record-size-max16251648
records-per-request-avg2020
request-latency-avg76.6
request-latency-max99
byte-total155095157395
Consumer Metrics

bytes-consumed-total154790157090
fetch-latency-avg470.5294118470.3125
fetch-latency-max507505
fetch-size-avg38697.552363.33333
fetch-size-max97514157090
fetch-total1716
records-consumed-total100100
records-per-request-avg2533.33333333

End-to-End Latency Statistics (ms)



Mean (Average)708.9731919.7159
Min Latency523.6274915.0023
Max Latency1020.9279942.0901
p50 (Median)528.1985919.2508
p751019.5718921.7726
p901020.3517924.0798
p991020.9279942.0901
p99.91020.9279942.0901

Kafka Producer/Consumer Perf Test Scripts

Workload

Used kafka/bin/kafka-producer-perf-test.sh and kafka/bin/kafka-consumer-perf-test.sh.

Producer: --num-records 100000 --record-size 2000 --throughput -1 --producer-props acks=1 retries=2 linger.ms=20 delivery.timeout.ms=300000 request.timeout.ms=30000

Consumer: --messages 100000 --timeout 240000 --consumer.config consumer.properties
The consumer.properties file contained client.rack=use1-az6 (the rack of the follower broker, so we consumed from the follower).

Metrics

Metricperf_local_disk

perf_cloud_native

Producer Metrics



Records sent100,000100,000
Records/sec20,542.3220,772.75
Throughput (MB/sec)39.1839.62
Avg Latency (ms)638.39635.4
Max Latency (ms)817760
50th Percentile667666
95th Percentile745710
99th Percentile802746
99.9th Percentile815758

Consumer Metrics



Data Consumed (MB)190.73190.73
Throughput (MB/sec)44.5640.83
Records Consumed100,000100,000
Records/sec23,364.4921,404.11
Rebalance Time (ms)3,6353,961
Fetch Time (ms)645711
Fetch MB/sec295.71268.26
Fetch Records/sec155,038.76140,646.98

Analysis

Overall we see comparable performance between a standard topic and KIP-1176 for both producer & consumer metrics, in particular throughput and latency. The producer path is near identical performance, i.e., an ack to the producer is returned in the same time. Consumer performance is slightly slower as data must travel an additional hop to/from S3E1Z. There are additional tunings we are aware of that could further boost performance (e.g., tuning the interval that the leader/follower remote WAL tasks run).

For latency, there are two latency metrics. E2E latency measures when the consumer sees the data. Producer's request-latency measures when the producer can move on after a message is sent. We can see the request-latency number is very small (<10ms) on both cloud-native and local-disk cases, this is where acks=1 setting excels at and this is also the niche of our KIP.