-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Performance regression and memory leak in SampleBuilder@v4 #2778
Comments
Also, the new SampleBuilder doesn't unreference the input RTP packets and causes kind of memory leak. |
@thatsnotright could you take a deeper look? |
kindly ping @thatsnotright @Sean-Der |
@at-wat gave a shot at investigating this one and I think I found at least one issue! See pion/interceptor#264 |
Memory unreference problem seems be fixed, but CPU usage is still twice expensive then
|
Whoops sorry! Referencing the issue and merging auto closed this |
I tested |
Should we revert that code for now? |
Can you give me a week I can look into perf regression. I don’t think we will ever fix it otherwise. No one is actively maintaining/improving this part |
Sure! |
Your environment.
v4.0.0-beta.14
and laterWhat did you do?
Updated pion/webrtc from
v4.0.0-beta.13
to later version.What did you expect?
SampleBuilder CPU/memory usage doesn't significantly increased.
What happened?
CPU usage is doubled in the existing benchmark, and input RTP packets aren't unreferenced after the corresponding samples are popped.
CPU
Full benchmark outputs
v4.0.0-beta.13
v4.0.0-beta.14
v4.0.0-beta.19
Memory
I created a test to check that the input RTP packets are unreferenced after all samples are popped.
On v4.0.0-beta.13,
all popped packets are unreferenced.
On v4.0.0-beta.14,
65536 packets aren't unreferenced.
Note
CPU and memory usage of my product software using SampleBuilder significantly increased after updating
v4.0.0-beta.13
tov4.0.0-beta.19
.I'll dig into the memory usage increase which doesn't appeared in the benchmark.Found the problem on input data unreference and updated above sections.Refs
The text was updated successfully, but these errors were encountered: