peers / peerjs

Simple peer-to-peer with WebRTC.
https://peerjs.com
MIT License
12.38k stars 1.43k forks source link

Peerjs Using Too Much CPU #795

Open fenomen5389 opened 3 years ago

fenomen5389 commented 3 years ago

Hi, thanks for this incredible work. I'm using Peerjs for my 15-20 person video meetings. But CPU usage is too much for someone's computers. How can i reduce it? Please help me. Thanks.

lucastwong commented 3 years ago

How did you set up these multiple-person meetings? An array of connections?

fenomen5389 commented 3 years ago

Using socket servers. When someone joins it sends peerId to clients also when disconnects.

lmangani commented 3 years ago

peerJs is doing nothing CPU wise, the actual load comes from encoding/decoding all the concurrent streams. You need an SFU.

VladSalat666 commented 2 years ago

+1 I'm using few peers on each side for connecting of a two computers. After each connecting CPU usage increases for 10-15% After closing connections it does not cleaning up so after few iteration CPU usage reaches 100% And if I destroy all the peers CPU usage becomes normal.