Hartigan

Results 13 comments of Hartigan

What you think about replacing json by protobuf? This way we can save CPU/RAM and generate types for typescript/c++/rust.

@nazar-pc I start mediasoup with ```valgrind --tool=massif ``` and found leak of rtp packets. [Massif data](https://gist.github.com/Hartigan/b77568249e1f5b0f95c0e5db7df5bc97) You can visualize it with ```ms_print ``` or ```massif-visualizer ```

@nazar-pc It's custom service written on rust. I created 4 echo participants((1 router + 1 webrtc transport + 2 producer + 2 consumer) * 4) and collect valgrind dump.

@nazar-pc I run locally in docker. Number of router no matter. I knew that there was a leak and started several routers to speed up the leak.

1. Chromium Version 98.0.4758.80 (Official Build) Arch Linux (64-bit) 2. Single transport on send and receive in echo room 3. We don't use mediasoup's client libs. 4. Media: vp8 with...

@jmillan yes, it's same problem

@nazar-pc I prepared draft version of ```StorageItemBuffer``` based on ```std::array``` with reusable buckets. Size of bucket based on sqrt-decomposition practice. My estimation: 256 packets ~ 1 sec 720p vp8 video....

@nazar-pc 1. std::deque implementation based on fixed-size buffers allocations :D 2. I wanna provide solution with reusable(pooled) buffers and simple navigation(without ```this->startSeq``` calculations) 3. In my case ```Insert```, ```Remove```, ```Get```...

@nazar-pc I create pull request https://github.com/nazar-pc/mediasoup/pull/6 with changes for retransmission buffer. I collected new [massif dump](https://gist.github.com/Hartigan/020a8029e7aac9e4ae9f1c9f250ba208): 4 echo rooms with 720p VP8 simulcast + opus and 8 hours Leak of...

@nazar-pc @jmillan I think I figured out problems: 1. https://github.com/nazar-pc/mediasoup/blob/memory-optimizations/worker/src/RTC/RtpStreamSend.cpp#L459 In long test cause wrong comparsion of timestamps => buffer not cleaned when its needed. 2. https://github.com/nazar-pc/mediasoup/blob/memory-optimizations/worker/src/RTC/RtpStreamSend.cpp#L41 https://github.com/nazar-pc/mediasoup/blob/memory-optimizations/worker/src/RTC/RtpStreamSend.cpp#L59 https://github.com/nazar-pc/mediasoup/blob/memory-optimizations/worker/src/RTC/RtpStreamSend.cpp#L70 https://github.com/nazar-pc/mediasoup/blob/memory-optimizations/worker/src/RTC/RtpStreamSend.cpp#L74...