-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finagle+scrooge: Pass a factory to create TReusableBuffer as the para…
…meter of a finagle client Problem Currently every instance of finagle client holds its own TReusableBuffer. The purpose of this object is to hold an instance of temporary buffer for every io thread. A typical size of the buffer is around 16k. This means that if, for example, there are 128 i/o threads then one client uses at least two megabytes of heap. If the app creates multiple instances of the client then the memory allocated for these buffers is just wasted because the thread can use only one buffer at any given time and the number of threads is limited. Solution Pass a shared instance of TReusableBuffer to the client's ctor. Result Significantly decreased memory usage JIRA Issues: GRAPH-9650 Differential Revision: https://phabricator.twitter.biz/D378466
- Loading branch information
Showing
8 changed files
with
8 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters