Jason Koch created KAFKA-13630:
----------------------------------

             Summary: Client producer reduce RecordAccumulator locks in 
producer thread
                 Key: KAFKA-13630
                 URL: https://issues.apache.org/jira/browse/KAFKA-13630
             Project: Kafka
          Issue Type: Improvement
          Components: clients, producer 
            Reporter: Jason Koch


Kafka Java client RecordAccumulator uses a thread to manage and send batches as 
they are ready. The algorithm in both ready() and drain() use slightly more 
locking than strictly necessary, which holds up the producer thread from 
writing to batch.

By reducing the code executed in the lock, we see a 11% reduction in spin-loop 
lock-related CPU in the producer threads (as they wait for an available batch 
to append).



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to