Need help testing significant memory optimizations

I was working on some memory optimizations and got exciting results, but since changes are very invasive I’d like for more people to test them.

The results are 3x decrease in calls to system allocator (35x decrease in temporary allocations), 6x decrease in memory consumption by worker and slight improvement in CPU usage too.
Most of remaining allocations are coming from bandwidth estimation code of libwebrtc which I decided to skip for now.

With that in Rust videoroom example a room with 5 participants, each of which has audio and 720p@30 video sent to everyone else, the whole application (WebSocket server, worker, everything) consumes roughly 6.5 MiB of residential memory.

Please test it in your projects if possible and I’d like to know any feedback about issues you may encounter.

Branch to use: GitHub - nazar-pc/mediasoup at memory-optimizations

UPD: Halved memory consumption again (savings on audio packets)!

1 Like

Sounds great Nazar, congrats!!

What’s the easiest way to install your branch on a server? Could you provide some instructions?

Standard way you install something from GitHub, just replace mediasoup version with github:nazar-pc/mediasoup#memory-optimizations and it should pull the right version.

Did you have a chance to test yet?

I’ll test it next week