How many connections can one web call server handle?

phil

New Member
There's noticeable delay or latency when there are more than 100 connections.

My server has a 16-core CPU, so I think it's not a performance issue.

What I'm trying to say is: is "100 connections" something web call server cannot handle?
 

Max

Administrator
Staff member
Did you play this on 100 playback devices?
Each playback requires client-side video decoding. So if you try to play 100 video files on the same PC, you will encounter a performance issue on client.
The same if you play to many streams on the same PC. Network stack performance will fall and you will get a latency or other performance issues.
 

phil

New Member
Did you play this on 100 playback devices?
Each playback requires client-side video decoding. So if you try to play 100 video files on the same PC, you will encounter a performance issue on client.
The same if you play to many streams on the same PC. Network stack performance will fall and you will get a latency or other performance issues.
I played it on four different devices.
Afterwards, I tried to play it on another device that is in an entirely different network and this "another device" has the same latency issue.
Therefore, I'm pretty sure it is a Web Call Server issue. I also tried this with https://wcs5-eu.flashphoner.com:8888/login.xhtml , same issue happened.
 

Max

Administrator
Staff member
Please describe your test in detail, step by step. What is stream source, codecs, resolution, etc? What is player? What is latency? We need to reproduce this on our server.
 

phil

New Member
Please describe your test in detail, step by step. What is stream source, codecs, resolution, etc? What is player? What is latency? We need to reproduce this on our server.
My stream source: A looping video that is sent to Flash Media Encoder which is the encoder.
Resolution: 320*180
Player: wsPlayer that uses flashphoner.js
Latency: When there's heavy load, the latency starts to appear which increases as time goes on. This means: after an hour, the latency is very high. For example, one second delay for each second, then there's a 60-second delay after a minute.

In a sentence: You send/push/publish your video source via Flash Media Encoder, and play the video with 100 browser tabs.
 

Max

Administrator
Staff member
What is audio and video codec and version of FMLE? Could you attach a screenshot?
 

Max

Administrator
Staff member
1. It is not a clear test to play many-many streams on the same PC / device.
When you play many streams on the same PC, you can encounter network stack and CPU performance issues on this particular device.
You can play many-many streams on the same PC just to ensure load on server-side.
But you have to measure latency on another 'clean' device under a normal load.
2. You set resolution 1920x1080
WsPlayer works on low resolution. So you have transcoding and rescaling 1920x1080 > 320x180
Try to reduce incoming resolution to the same value to reduce transcoding overhead.
3. Add heap memory
Edit the file /usr/local/FlashphonerWebCallServer/bin/setenv.sh
Replace
Code:
WCS_JAVA_OPTS="-Xmx1024M"
with
Code:
WCS_JAVA_OPTS="-Xmx8000M -Xms2000M"
Then do
Code:
service webcallserver restart
Make sure you have enough physical memory on server to place about 8Gb in the heap. Or adjust -Xmx and -Xms settings according your physical memory.
4. Please check our test results.
We have conducted similar test with Wirecast streamer H.264+AAC streams.
According our results we have latency about 10 seconds if we test many playback streams on the same PC.
When we connect from iPad Safari, latency is not changing, it is about 3-4 seconds.
So in our tests, load on other PCs does not affect the device under normal load.

Wirecast_Encoder_Presets.jpg.png

We will check it also with FMLE. I will report about results.
 

phil

New Member
1. It is not a clear test to play many-many streams on the same PC / device.
When you play many streams on the same PC, you can encounter network stack and CPU performance issues on this particular device.
You can play many-many streams on the same PC just to ensure load on server-side.
But you have to measure latency on another 'clean' device under a normal load.
2. You set resolution 1920x1080
WsPlayer works on low resolution. So you have transcoding and rescaling 1920x1080 > 320x180
Try to reduce incoming resolution to the same value to reduce transcoding overhead.
3. Add heap memory
Edit the file /usr/local/FlashphonerWebCallServer/bin/setenv.sh
Replace
Code:
WCS_JAVA_OPTS="-Xmx1024M"
with
Code:
WCS_JAVA_OPTS="-Xmx8000M -Xms2000M"
Then do
Code:
service webcallserver restart
Make sure you have enough physical memory on server to place about 8Gb in the heap. Or adjust -Xmx and -Xms settings according your physical memory.
4. Please check our test results.
We have conducted similar test with Wirecast streamer H.264+AAC streams.
According our results we have latency about 10 seconds if we test many playback streams on the same PC.
When we connect from iPad Safari, latency is not changing, it is about 3-4 seconds.
So in our tests, load on other PCs does not affect the device under normal load.

View attachment 70

We will check it also with FMLE. I will report about results.


Thanks Max, you are being very helpful. I'd like to point out that I did test it on another "clean" machine that is in an entirely separate network. It is good you have pointed out all these possible issues, but I would like to say that the test I mentioned has been proven at least five times. I am pretty sure you will see noticeable latency when there are 200 machines connecting to the server and play the live video.

If you have proven this latency issue does not exist, please let me know what configurations I need to know in order to make my WCS latency-free. Thanks.
 

Max

Administrator
Staff member
Hello
Currently we are working on automatic stress-test. Therefore you will be able to imitate the real load and check the latency.
I will let you know about our results.
 

Max

Administrator
Staff member
Hello
We have done a set of optimizations in the latest server build 2019
On our synthetic stress tests we have successfully placed about 1000 concurrent streams on 12 core server.
Please check on your end.
 
Top