Skip to content

Latest commit

 

History

History
72 lines (44 loc) · 3.39 KB

README.md

File metadata and controls

72 lines (44 loc) · 3.39 KB

Kafka Client Benchmarks

Benchmarks of kafka client libraries for Golang.

Execute Benchmark

go test -timeout=5h -bench=Producer -benchmem -count 5 -benchtime=10000x > results/producer.out
go test -timeout=5h -bench=Consumer -benchmem -count 5 -benchtime=100000x > results/consumer.out

Docker File

docker-compose -p kafka -f docker-compose.yml up

Results

All the benchmarks are performed in the Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz machine with a standalone Kafka running in the docker.

Producer

All the benchmarks are performed with 10K samples size and 5 iterations.

Microsecond / Operation

Sync Producer Async Producer
SyncProducerTime.png AsyncProducerTime.png

Memory Allocation / Operation

Sync Producer Async Producer
SyncProducerMemoryAllocations.png AsyncProducerMemoryAllocations.png

Bytes / Operation

Sync Producer Async Producer
SyncProducerBytes.png AsyncProducerBytes.png

Consumer

All the benchmarks are performed with 10K samples size and 5 iterations.

Nenosecond / Operation

ConsumerTime.png

Memory Allocation / Operation

ConsumerAllocation.png

Bytes / Operation

ConsumerBytes.png

Libraries

⚠️ Please note that these libraries are benchmarked against storage of sample payloads (i.e. 1, 5, and 10 KB). You are encouraged to benchmark with your custom payloads.

Credits