WebRTC: Server Concurrent Performance Configuration Adjustment #3206
Labels
Discussion
Discussion or questions.
TransByAI
Translated by AI/GPT.
WebRTC
WebRTC, RTC2RTMP or RTMP2RTC.
Won't fix
We won't fix it.
Description (描述)
SRS Version (版本):
4.0.257
Make sure to maintain the markdown structure.
SRS Log (日志):
Make sure to maintain the markdown structure.
Make sure to maintain the markdown structure.
Replay (重现)
Make sure to maintain the markdown structure.
I would like to understand the factors affecting the concurrent performance of WebRTC multi-stream playback:
Push a 1080p FLV stream with H264+AAC codecs to an RTMP port using FFmpeg, with a bitrate of approximately 4Mbps. Check the server resource usage, which occupies around 6.3% of the CPU. Then, simultaneously pull 9 WebRTC streams and observe that the CPU usage increases to nearly 30%. Calculating it, each stream consumes approximately 2.5% of the CPU.
Push a 480p FLV stream with H264+AAC codecs to an RTMP port using FFmpeg, with a bitrate of approximately 1Mbps. Check the server resource usage, which occupies around 4% of the CPU. Then, simultaneously pull 9 WebRTC streams and observe that the CPU usage increases to approximately 12%. Calculating it, each stream consumes approximately 1% of the CPU.
Use the built-in WebRTC streaming feature of SRS (https://localhost/demos/room.html?autostart=true) to directly push a stream from the camera. The resolution should be 320x240. Check the server resource usage, which occupies around 1.7% of the CPU. Then, simultaneously pull 9 WebRTC streams and observe that the CPU usage increases to approximately 6.7%, peaking at 8%. Each stream consumes approximately 0.5% of the CPU.
The server used for the experiment has the following CPU: Intel(R) Xeon(R) Silver 4210R CPU @ 2.40GHz.
I would like to ask the following questions. Thank you very much!
Is it a mechanism of WebRTC itself that requires a fixed amount of CPU consumption for each stream, regardless of whether it is pushing or pulling? From the experiments, it seems to be related to the resolution and bitrate of the pushed stream. Is the main consumption in the protocol transcoding from RTMP to WebRTC (including AAC to Opus transcoding)?
If using WebRTC directly, does it also involve transcoding? Is it possible to achieve no transcoding at all, or do you have any optimization suggestions? I have tried setting TWCC to "off," but there was no significant difference.
Expect (Expected Behavior)
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: