How VideoRoom threads working?

Hi guys. We are trying to use threads feature in VR and the main challenge here is to know how many of them to use, since of cause they are not working for free, and use a lot of CPU.

So, my question is, are they shared between all publishers? Randomly? Fifo? If publisher published only audio, did he get his thread, or is it only for video publishers? If publisher joins without streams, and will start media publishing later, did he get his thread, or only publishers with media gets threads? Thanks.

The last comment of the original PR answers your questions:

1 Like

Sorry, Lorenzo, it’s still not perfectly clear for me. Maybe we can do some exercise?

If I have 5 publishers in room, every publisher subscribes everyone, so, I have 5 * 4 = 20 subscribers, and I set up 5 helper threads, who gets it? Helper threads “helps” subscribers, right? So do I understand correctly, that 5 subscribers does get threads, and other 15 doesn’t?

No. The same helper thread will serve more subscribers. That’s exactly how it works in the Streaming plugin too.

1 Like