-
Notifications
You must be signed in to change notification settings - Fork 5
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
Investigate possible performance with Pion and compare it to LiveKit #23
Comments
UPD. So far the performance looks okayish, i.e. nothing particularly crazy in our code that would kill the performance, it seems like this performance is ok for Pion (after all, we're using a very weak machine and videos and screen-sharing of quite good quality and high FPS). The only thing that we might want to do is to compare it to the competition, e.g. to LiveKit. If the performance is more or less identical, then we can't do much about it. Since it's not a bug in our code, I've changed the tag from Defect to Enhancement. |
Hey @daniel-abramov i would love to help with this! Pion does some things that aren’t as performant as can be. If you are interested would love your help to fix that :) |
Ah, thanks @Sean-Der 🙂 I think It would be great to hear your expert opinion on the following: we're running an SFU on a very weak VM with a single 2.8 GHz core and 1.9 GB of RAM. Our SFU consumes about 30% CPU in a conference with 5 participants (each publishes video and audio) + 1 screen sharing track. When the screen sharing track is removed, then the CPU is about 23%. WIthout the screen sharing, a conference of about 6-7 participants (all sharing video and audio) consumes about 30% of CPU. I'm not really sure if it's actually that bad (provided we have a very weak machine and the quality of video and screen sharing, as well as the FPS, are all pretty good). Since we’re not decoding anything, the only expensive thing that Pion seems to be doing in such cases is encryption/decryption, right? Do you think that such a usage with our use case could be considered ok? (I believe that if/once we reduce the quality of videos and introduce simulcast, the CPU usage might drop) |
Looking at the element-call repo it seems like they prefer using LiveKit these days? What does this mean for the future of this very interesting cascading approach? @daniel-abramov are you still willing to work on this? Maybe as a more general SFU that systems other than Matrix could use as well? Would be a shame if this idea ends up being totally abandoned. |
As to my knowledge, the cascading approach is not abandoned (just postponed a bit) and I believe that it will be implemented eventually (I think not in the nearest future though). Note that the latest versions of the
Not in the context of
This is certainly a great approach! I think that it would be amazing to have a scalable and performant SFU that is similar to LiveKit yet also supports different flavors of signaling that allows the support of cascading. That being said, if I were to start with the design of such SFU, I would definitely go for a different (Rust-based) tech stack. As for Go/Pion SFU, IMHO LiveKit is the most performant, reliable and versatile open-source option one could get (truth being told, I have not checked any newer SFUs within the past couple of months). |
I see, thanks for the detailed answer! There seems to be a project reimplementing Pion in Rust in case you are interested in contributing a cascading mode: https://github.com/webrtc-rs/webrtc |
Indeed, I tried |
Currently, the SFU using a little too much CPU - we should fix that
The text was updated successfully, but these errors were encountered: