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
=== RUN TestSampleBuilderPacketUnreference
--- PASS: TestSampleBuilderPacketUnreference (0.05s)
all popped packets are unreferenced.
On v4.0.0-beta.14,
=== RUN TestSampleBuilderPacketUnreference
samplebuilder_test.go:570:
Error Trace: /home/at-wat/go/src/github.com/pion/webrtc/pkg/media/samplebuilder/samplebuilder_test.go:570
Error: Not equal:
expected: 1
actual : 65536
Test: TestSampleBuilderPacketUnreference
--- FAIL: TestSampleBuilderPacketUnreference (0.08s)
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 to v4.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.
Also, the new SampleBuilder doesn't unreference the input RTP packets and causes kind of memory leak.
Created a PR to add a test to check that the input RTP packets are unreferenced after all samples are popped. #2781
at-wat
changed the title
Performance regression in SampleBuilder@v4
Performance regression and memory leak in SampleBuilder@v4
May 31, 2024
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: