Hello!
My apologies if this has been addressed before (searched the forum but did not find anything).
I am noticing what seems like a strange phenomenon: after creating receive transports for peers and calling consume on them, the CPU usage of the worker on which these are created remains elevated even after closing all consumers. For example, I put 200 150kbps video consumers (1 producer) on one worker and the CPU usage goes from 0 to around 40%. After closing the producer and all the consumers, the CPU usage drops to 15-20% and stays there. The transports continue sending some data back and forth (much less than when streaming but still ~200-300kbps total). Closing the transports returns the CPU usage to 0.
When I create 200 audio consumers (40kpbs), the CPU usage goes up to ~10% and then drops to 4-5% when they are closed (the idle bitrate of the transports is also significantly less than with video). If transports have nominal overhead when idle, shouldn’t that be consistent regardless of what has been streamed?
In general, shouldn’t an idle transport consume very little? Am I doing something wrong, or is this behavior expected? Do you recommend closing idle transports?
BTW, I am new to this library and very much appreciate the work that went into it–very impressive!
Thank you!
-Igor