[ https://issues.apache.org/jira/browse/KAFKA-6763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16574742#comment-16574742 ]
Leonardo Freitas Gomes commented on KAFKA-6763: ----------------------------------------------- Hi [~ijuma], The idea here is to replace the ByteBuffer.allocate(..) calls with .allocateDirect(..), have some sort of configuration to manage that and then perform some benchmark? How would you usually approach this kind of benchmark? Start with JMH or something similar and then move to end-to-end? I'm trying to get familiar with Kafka codebase and perf approach. Could be interested in helping out :) Cheers, Leo. > Consider using direct byte buffers in SslTransportLayer > ------------------------------------------------------- > > Key: KAFKA-6763 > URL: https://issues.apache.org/jira/browse/KAFKA-6763 > Project: Kafka > Issue Type: Improvement > Reporter: Ismael Juma > Priority: Minor > Labels: performance, tls > > We use heap byte buffers in SslTransportLayer. For netReadBuffer and > netWriteBuffer, it means that the NIO layer has to copy to/from a native > buffer before it can write/read to the socket. It would be good to test if > switching to direct byte buffers improves performance. We can't be sure as > the benefit of avoiding the copy could be offset by the specifics of the > operations we perform on netReadBuffer, netWriteBuffer and appReadBuffer. > We should benchmark produce and consume performance and try a few > combinations of direct/heap byte buffers for netReadBuffer, netWriteBuffer > and appReadBuffer (the latter should probably remain as a heap byte buffer, > but no harm in testing it too). -- This message was sent by Atlassian JIRA (v7.6.3#76005)