Question around performance of the Producer #3998
Replies: 3 comments 5 replies
-
Hi, some detailing questions:
|
Beta Was this translation helpful? Give feedback.
-
My gut says we've set our linger.ms too high for the expected throughput. We might be one of the few cases where it being set to a higher number doesn't make as much sense since we're able to actually fill our queue in that time |
Beta Was this translation helpful? Give feedback.
-
We typically see performance improvements to drop off at a linger.ms above 500ms. As for the overall performance and CPU cost, there's a problem with the way librdkafka sends ProduceRequests to brokers in that it will only send batches for a single partition per request, while the protocol and Java producer will send batches for multiple partitions in the same request. |
Beta Was this translation helpful? Give feedback.
-
Hi,
My team and I have been using librdkafka in our C++ service quite happily and we've recently noticed something. We're doing stream processing at quite a large scale (anywhere from ~20 million messages a second) and we've noticed that no matter what we do we reach a point where the producer part of this library can't drain its outgoing queue fast enough. We've set the batch sizes and queue sizes quite large, but it just doesn't seem to be able to keep up and we end up receiving a ton of Queue full errors. The way we've gotten around this for now is creating multiple producers within a single library (I think we use 8 today since that seems to be able to keep up with a bit of leeway). This of course comes with the tradeoff of spawning many threads since we're now doing Num of brokers x Num of producers which is starting to get unwieldy (as you can imagine, the size of the Kafka cluster to keep up with that many messages a second at scale is quite large) My question is this:
What can we tune so that the outgoing queue on the producer can be drained faster? What we have now works, but there are limits to the number of threads a host can support and we would prefer to not hit that.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions