[ 
https://issues.apache.org/jira/browse/GEODE-6663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17171153#comment-17171153
 ] 

Alexander Murmann commented on GEODE-6663:
------------------------------------------

[~dschneider]Looks like you made a change, but it's unclear if it's merged and 
if it addresses the issue in its entirety. Can this be closed?

> conserve-sockets=false can cause buffer fragmentation
> -----------------------------------------------------
>
>                 Key: GEODE-6663
>                 URL: https://issues.apache.org/jira/browse/GEODE-6663
>             Project: Geode
>          Issue Type: Bug
>          Components: messaging
>            Reporter: Darrel Schneider
>            Priority: Major
>              Labels: performance
>
> When conserve-sockets is set to false it enables an optimization called 
> direct ack. This optimization allows the reply message to be sent directly 
> back to the requestor on the same socket it sent to request. But the way the 
> reply is read (see Connection.readAck) can cause small direct ByteBuffer 
> instances to be created and added to the queue in the Buffers class. These 
> small buffers can then cause future allocations from the queue to be slower 
> because the small ones are removed and and added back to the end of the queue.
> I think it would be better for readAck to allocate one of this fixed size: 
> "this.owner.getConduit().tcpBufferSize" instead of basing it off of the reply 
> message size.
> That would keep the all the ones in Buffers the same size.
> It is possible that the "inputBuffer" owned by Connection could be used. But 
> Bruce had this warning regard it: "Be careful about using the Connection's 
> input buffer.  I had so much trouble with multi-threaded access to that 
> buffer that I decided not to use it in MsgReader."



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to