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

Erik Frey commented on THRIFT-357:
----------------------------------

Looks good to me as well.

Anthony, as a separate patch would it make sense that your reset idle 
connection would also resize the output buffer?  I can imagine that scribe has 
large input buffers and small output buffers, but for many servers it's the 
other way around.

I could modify TMemoryBuffer.resetBuffer() to take an optional size parameter 
instead of a bool.

> Buffer and Connection bloat in TNonBlockingServer
> -------------------------------------------------
>
>                 Key: THRIFT-357
>                 URL: https://issues.apache.org/jira/browse/THRIFT-357
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Library (C++)
>            Reporter: Anthony Giardullo
>            Priority: Minor
>         Attachments: buffer_limit.patch
>
>
> This patch helps to reduce the amount of memory allocated by 
> TNonBlockingServer.   It uses a configurable limit on the number of idle 
> connections to keep around, and has a configurable limit on the amount of 
> memory to keep allocated in the readBuffer when the connection is closed.  
> This fix is in use at Facebook and has significantly reduced the amount of 
> memory used by Scribe (https://sourceforge.net/projects/scribeserver/).
> See THRIFT-265 for another memory usage fix which reallocates input/output 
> buffers every 512 reads/writes.  THRIFT-265(and THRIFT-354) and this patch 
> can be used together to tune the amount of memory used.  The buffer_limit 
> patch is especially useful for the case when there are many idle TConnections 
> with large buffers allocated.

-- 
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