Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak when using proxy #51

Closed
ivan4th opened this issue Dec 28, 2020 · 2 comments
Closed

Memory leak when using proxy #51

ivan4th opened this issue Dec 28, 2020 · 2 comments

Comments

@ivan4th
Copy link
Contributor

ivan4th commented Dec 28, 2020

There's a memory leak in UPG when using proxy, possibly mostly for non-stitched TCP connections.
The leak is not visible in show memory, but vpp RSS keeps increasing.
It is likely related to SVM FIFOs being not properly freed.

Below is a flame graph constructed from page fault tracing with perf (based on [1]).
Flame Graph

[1] http://www.brendangregg.com/FlameGraphs/memoryflamegraphs.html

@RoadRunnr
Copy link
Member

I'm not convinced that the memory is indeed leaking. In order to archive decent performance, the socket buffers per connection have to be quite large. Some megabyte per connection are reasonable. The total memory required for all sockets on a medium load can easily top multiple gigabytes.

ivan4th added a commit that referenced this issue Jan 6, 2021
Related to #51 (but also need to kill proxy sessions together with
flows)
ivan4th added a commit that referenced this issue Jan 6, 2021
Related to #51 (but also need to kill proxy sessions together with
flows)
ivan4th added a commit that referenced this issue Jan 14, 2021
Some flows could take a long time to expire if there wasn't a packet
every second for 10 minutes.

Fixes #61
May also improve the situation wrt #51
sergeymatov pushed a commit that referenced this issue Jan 15, 2021
Some flows could take a long time to expire if there wasn't a packet
every second for 10 minutes.

Fixes #61
May also improve the situation wrt #51
@ivan4th
Copy link
Contributor Author

ivan4th commented Feb 17, 2021

The leak is no longer observed as of v1.1.4 (after #67 was merged before an earlier release)

@ivan4th ivan4th closed this as completed Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants