[ 
https://issues.apache.org/jira/browse/THRIFT-265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erik Frey updated THRIFT-265:
-----------------------------

    Attachment: buffer_reset.patch

Makes TNonBlockingServer::TConnection reset its read/write buffers to default 
sizes every 512 read/writes.

There are still scenarios that could cause memory bloat, but they are less 
likely: a brief period of massive concurrent requests with large payloads cause 
many TConnections to be created, their buffers grown, then never used again.

But probably the most common scenario is cyclic activity, with daily high loads 
ensuring that TConnections will be reused often enough that their buffers will 
eventually be reset.  We're using this patch already on our high-load servers 
and it's addressing this scenario admirably.

> Buffer bloat in TNonblockingServer
> ----------------------------------
>
>                 Key: THRIFT-265
>                 URL: https://issues.apache.org/jira/browse/THRIFT-265
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Library (C++)
>            Reporter: Erik Frey
>            Assignee: Erik Frey
>            Priority: Minor
>         Attachments: buffer_reset.patch
>
>
> TNonBlockingServer never resets the lengths of the buffers it maintains for 
> reading and writing.  Servers with a long life and many concurrent 
> connections eventually generate an overhead that can reach into the 
> gigabytes, particularly in services that have varied message sizes.

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