You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Case 1 :When we publish messages(50000) synchronously to kafka using kafka-net producer client , Throughput looks good.
var task = producer.SendMessageAsync(topic, new Message[] { kafkaMessage }); Task.WaitAll(new Task[] { task }, ts);
Case 2 : When we publish messages(50000) messages asynchronously with multiple kafka-net producer clients(5 client , 10000 msg/client synchronously) , Throughput reduces to 1/5 fold from case1.
we analysed the kafka-net Producer flow , whenever we increase producer clients ,there is some time delay in acknowledgement for every TCP request and sometimes it process the dummy acknowledgment requests ,write request waits in the queue during this time which causes the performance.
So , we modified the Kafka-net code to have separate thread for Write and Acknowledgment and then we ran the test case . Now Throughput(results) looks similar in both Case 1 and Case 2.
Can we have separate thread for Read and Acknowledgment , will it lead to any issue?
kindly share your thoughts .
The text was updated successfully, but these errors were encountered:
I'm experiencing this issue as well. When I processing data-sets asynchronously, the performance decreases significantly. Almost identical code as the gentlemen above.
@Parthiban-P Are you using the producer code from the sample? I noticed that the using statement that disposes the client was causes this for me because I was standing up the client in a loop (embarassing because that's appdev 101). Once I created a single instance and reused it, my performance issues went away completely.
@wmccullough : When I reuse the single Instance performance is okay , it doesn't meet for our expectation. Obviously when we use multiple instance and async request processing we should have performance improvement but its not happening here !!!!!!!
Case 1 :When we publish messages(50000) synchronously to kafka using kafka-net producer client , Throughput looks good.
var task = producer.SendMessageAsync(topic, new Message[] { kafkaMessage }); Task.WaitAll(new Task[] { task }, ts);
Case 2 : When we publish messages(50000) messages asynchronously with multiple kafka-net producer clients(5 client , 10000 msg/client synchronously) , Throughput reduces to 1/5 fold from case1.
we analysed the kafka-net Producer flow , whenever we increase producer clients ,there is some time delay in acknowledgement for every TCP request and sometimes it process the dummy acknowledgment requests ,write request waits in the queue during this time which causes the performance.
Task sendDataReady = Task.WhenAll(writeTask, _sendTaskQueue.OnHasDataAvailable(_disposeToken.Token)); Task readDataReady = Task.WhenAll(readTask, _readTaskQueue.OnHasDataAvailable(_disposeToken.Token)); Task.WaitAny(sendDataReady, readDataReady);
So , we modified the Kafka-net code to have separate thread for Write and Acknowledgment and then we ran the test case . Now Throughput(results) looks similar in both Case 1 and Case 2.
Can we have separate thread for Read and Acknowledgment , will it lead to any issue?
kindly share your thoughts .
The text was updated successfully, but these errors were encountered: