Eric Chang created KAFKA-21730:
----------------------------------

             Summary: Reuse the receive buffers of fetch responses in 
AsyncKafkaConsumer
                 Key: KAFKA-21730
                 URL: https://issues.apache.org/jira/browse/KAFKA-21730
             Project: Kafka
          Issue Type: Sub-task
          Components: clients, consumer
            Reporter: Eric Chang
            Assignee: Eric Chang


Every fetch response is read into a new byte array of several megabytes, and 
that adds GC work. We could keep these buffers in a small pool with a fixed 
upper bound and use them again. A buffer goes back to the pool only after every 
record of its response was handed to the application.

This depends on the prefetch sub-task, because the cost grows when the consumer 
holds more than one response.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to