peerjs icon indicating copy to clipboard operation
peerjs copied to clipboard

Peerjs Using Too Much CPU

Open fenomen5389 opened this issue 4 years ago • 4 comments

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.

fenomen5389 avatar Mar 04 '21 21:03 fenomen5389

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

lucastwong avatar Mar 05 '21 04:03 lucastwong

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

fenomen5389 avatar Mar 05 '21 19:03 fenomen5389

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

lmangani avatar Mar 11 '21 17:03 lmangani

+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.

VladSalat666 avatar Nov 15 '21 19:11 VladSalat666