[ 
https://issues.apache.org/jira/browse/THRIFT-963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932866#action_12932866
 ] 

Bjørn Borud commented on THRIFT-963:
------------------------------------

I had a quick look at the code and there seemed to be a mechanism for extending 
the buffer, but not to shrink it.  I think we should try the simplest possible 
solution first, ie. throw away buffers that are above some threshold size and 
instrument the code so we can get some statistics on this.

It would also be helpful if we created a small set of tests (mini-benchmarks) 
that represent various (size) workloads to have a quick way of trying out 
different alternatives.

> Reuse buffers in TNonblockingServer
> -----------------------------------
>
>                 Key: THRIFT-963
>                 URL: https://issues.apache.org/jira/browse/THRIFT-963
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>             Fix For: 0.6
>
>
> Right now, we reallocate buffers all the time (twice per request!). We should 
> be able to reuse these buffers quite easily. The only downside to reusing 
> buffers is that each connection will hold as much memory as the biggest 
> request they ever saw, which can be wasteful. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to