forked from memcached/memcached
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
proxy: allow early freeing rcontexts
Any allocated request context would stay in memory attached to its function generator until the next reload, which would replace the function generators. A replaced fgen would eventually run out of attach references and cleanup itself, removing all rcontexts. A one-time burst of concurrent request contexts would thus take up memory forever. With this change we use an easing function to slowly free unneeded request contexts. This can help for both memory usage scenarios and instances where the GC is still used in the request path and tail latency can become poor.
- Loading branch information
Showing
2 changed files
with
103 additions
and
85 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