Ballpark calculation of CPU usage per stream

Is there some formula of how many video+audio streams/how much overall bitrate (since there is no transcodings, things like codec are irrelevant right) should a single core be able to pump through? Something like “if your bandwidth is unlimited and ram is too, and your CPU is AXV2 (256-bit word), you should get around X megabits per second per GHz of clock rate on a maxed out core”?

Essentially, i am trying to understand if the throughput i am experiencing is normal or “kinda normal”, or there is a bug limiting it in my code which i should look for.

Mediasoup v3, and if it is important, VP8.


mediasoup is essentially a packet router. You can measure the CPU usage for a single producer and single consumer. Then add more consumers to the scenario and see how the CPU usage increases, the usage increase should be linear for each new consumer.

That way you can have a basic estimation of how many streams one of your CPU cores can handle, or how much percent of CPU core each outgoing stream takes.

In real life there are many other factors to consider like retransmission, NACK, PLI generation…, so expect this numbers to vary depending on your testing scenario.

This is exactly why i ask. I want to find out “is this a normal CPU load or am i doing something badly wrong resulting it being highly elevated”?

Can you give me a practical example with numbers please?

… and well not a packet router, it does AES decryption and encryption for each stream… because WebRTC is always encrypted and every user has it’s own set of encryption keys… and this is where CPU mainly goes into as i understand

I’m afraid we do not have those numbers.

I remarked: essentially a packet router :slight_smile: