-
Notifications
You must be signed in to change notification settings - Fork 662
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
Consumer much slower than producer #1307
Comments
I was able to make the consumer almost as fast as the producer by setting various configuration properties specified by librdkafka (most importantly This is my fixed setup: https://github.com/bichselb/confluent-kafka-go-performance/tree/fast |
Note - your start time us inclusive of the time to actually connect and configure the client, so it'll be higher than a true msg/s number |
Thanks @OneCricketeer for the hint. However, this is not the reason for the slowness (the client configuration time is negligible compared to sending 1 million messages). |
I am leaving this issue open in case someone knows how to close the remaining gap between the producer (~1 million messages/sec) and the consumer (~800k messages/sec). Feel free to close if this remaining gap is expected. |
Have you tried ZSTD compression? https://blog.cloudflare.com/squeezing-the-firehose/ Used tools like iperf3 to check max network speeds? Monitored cpu/memory/disk/IO rates while consuming? There's not much information to go on, only from the shown code Besides, Kafka has a builtin consumer perf script that'll use Java, but it'll still give you a theoretical limit of how fast you could consume. |
Description
In my very simple implementation, I can easily produce 1 million messages per second, but can only consume around 100k messages per second. How can I speed up the consumer to be as fast as the producer? I would like to avoid parallelization, as this is also not needed for good producer performance.
Both my producer and consumer follow the README examples very closely.
How to reproduce
I put my whole experimental setup here: https://github.com/bichselb/confluent-kafka-go-performance/tree/slow
My consumer is a straight-forward adaptation of the README example:
Checklist
Please provide the following information:
v2.5.4
confluentinc/cp-kafka:7.7.1
kafka.ConfigMap{"bootstrap.servers": "kafka:29092"}
and consumer:kafka.ConfigMap{"bootstrap.servers": "kafka:29092", "group.id": "myGroup", "auto.offset.reset": "earliest"}
The text was updated successfully, but these errors were encountered: