You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, memory is added to a free list manually with malloc but never freed.
During spikes in traffic or latency or large requests, entries get added, growing twemproxy's memory usage.
If there are too many free list entries, some should be removed from the singly linked list.
Maybe do this in the main loop, select() with 0 timeout before the select() with sleep (if sufficient time passed since last cleanup) and do cleanup if there are no events to process.
Maintain some minimum free list size so that low traffic use cases don't call free/malloc too often during bursts of traffic. Make it configurable to raise?
Keep track of how many were in use the last N times, sampling, and allow something like max() * 3 + C for some C value
Limit maximum freed in a single call to avoid impacting p99 latency too much
Currently, memory is added to a free list manually with malloc but never freed.
During spikes in traffic or latency or large requests, entries get added, growing twemproxy's memory usage.
If there are too many free list entries, some should be removed from the singly linked list.
Related to #664 and #553
The text was updated successfully, but these errors were encountered: