question about cpu usage, connections quantity and small delay

Arsen G.

Member
Dear Max,
I have a few questions -
1. we have 8 streams connected to Flashphoner and we have big CPU usage (about 500%) ath this same time. We are going to connect about 50 streams and I think we'll have a trouble. How can we fix it?
2. sometimes we are having small delay on WebRTC stream. How can we investigate and find the reason?
3. on the stat page of our Flashphoner (http://server:8081/?action=stat) we have 8 streams_viewers, but connections=16. Can you explain how is it possible

Thank you for you assistance.
Regards,
Arsen.
 

Max

Administrator
Staff member
For example
5 RTSP streams, each 640x360, H.264 AAC
5 players, Chrome 59, Windows 10
Load 70% of 1 core 1800 Hz.
Available 2 cores (200%).
 

Max

Administrator
Staff member
What is playback devices and browsers?
Could you list browser versions and OS where you test playback?
 

Max

Administrator
Staff member
we have 12 cores. What about higher resolution like HD or Full HD ?
We have similar results with 5 Full HD streams 1920x1080
About 70% of 1 core CPU.
 

Max

Administrator
Staff member
Try to change codec priority to h264,vp8
Code:
codecs=opus,alaw,ulaw,g729,speex16,g722,mpeg4-generic,telephone-event,h264,vp8,flv,mpv
then update to latest available version
Code:
service webcallserver update
You have such load on WebRTC tests because WCS transcodes H.264 to VP8 in Full HD resolution.
Such transcoding may take a lot of CPU.
Please try with H.264 priority codec. It should decrease CPU usage.
 

Max

Administrator
Staff member
sometimes we are having small delay on WebRTC stream. How can we investigate and find the reason?
Please check if you have the same delay if you switch to H.264.
The latency can be added by transcoding of Full HD stream.
 

Max

Administrator
Staff member
on the stat page of our Flashphoner (http://server:8081/?action=stat) we have 8 streams_viewers, but connections=16. Can you explain how is it possible
Each WSPlayer in iOS Safari holds 2 websocket connections to WCS server.
1 - signaling connection - play/stop
2 - streaming connection - binary data streaming over Websocket protocol
Therefore if you have 8 viewers on iOS Safari, you will see 16 open websocket connections.

Each WebRTC player holds 1 websocket connection.
So you will see 8 open websocket connections for 8 WebRTC viewers (i.e on Chrome browser).
 

Arsen G.

Member
Try to change codec priority to h264,vp8
Code:
codecs=opus,alaw,ulaw,g729,speex16,g722,mpeg4-generic,telephone-event,h264,vp8,flv,mpv
then update to latest available version
Code:
service webcallserver update
You have such load on WebRTC tests because WCS transcodes H.264 to VP8 in Full HD resolution.
Such transcoding may take a lot of CPU.
Please try with H.264 priority codec. It should decrease CPU usage.
yes, you were right. After upgrading we have less CPU usage than before.
 

Max

Administrator
Staff member
We have two versions of WS Player
1. Version 2.0, built-in into Player.
https://wcs5-eu.flashphoner.com/client2/examples/demo/streaming/player/player.html
2. Version 1.0, standalone Websocket player.
https://wcs5-eu.flashphoner.com/client/examples/demo/vow-player/vow-player.html

Version 1.0 is optimized for low latency.
Version 2.0 is optimized for CPU load.

So, to improve latency, you can try previous 1.0 version of player for iOS Safari.
Paths:
2.0 WCS_HOME/client2/examples/demo/streaming/player/player.html
1.0 WCS_HOME/client/examples/demo/vow-player/vow-player.html
 
Last edited:
Top