Jump to content
  • 0

Performance is almost half of what was expected according to the FAQ


dmitry027
 Share

Question

Hi everyone,

I have set up Ant Media Server 2.5.3 from the Linode marketplace on Dedicated 4CPU 8GB RAM instance. Then I set up another Linode instance and tried to run load test on it using official load testing tool (webrtctest-release-2.4.3.zip). Here are the commands I used:

./run.sh -u false -s <IP_ADDRESS> -p 5080 -m publisher -f test.mp4 -r true -i test -n 1 # Publish 1 stream
./run.sh -u false -s <IP_ADDRESS> -p 5080 -m player -i test -n <N> # Play N streams

I use test.mp4 file from the official webrtctest-release-2.4.3.zip distribution.

I got the following results:

- For watchers number <= 115 it works fine, CPU load is about 80%

- For watchers number > 115 I am started to receive "highResourceUsage" errors

According to the FAQ: "On 4 Core CPU Server, you can have either 50 broadcasts or 200 viewers", but what I have is 1 broadcast and max 115 viewers.

Do you know what might be the reason for this?

I do not use adaptive bitrate, please see attached red5-web.properties

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 1
On 3/30/2023 at 10:15 PM, dmitry027 said:

Hi everyone,

I have set up Ant Media Server 2.5.3 from the Linode marketplace on Dedicated 4CPU 8GB RAM instance. Then I set up another Linode instance and tried to run load test on it using official load testing tool (webrtctest-release-2.4.3.zip). Here are the commands I used:

./run.sh -u false -s <IP_ADDRESS> -p 5080 -m publisher -f test.mp4 -r true -i test -n 1 # Publish 1 stream
./run.sh -u false -s <IP_ADDRESS> -p 5080 -m player -i test -n <N> # Play N streams

I use test.mp4 file from the official webrtctest-release-2.4.3.zip distribution.

I got the following results:

- For watchers number <= 115 it works fine, CPU load is about 80%

- For watchers number > 115 I am started to receive "highResourceUsage" errors

According to the FAQ: "On 4 Core CPU Server, you can have either 50 broadcasts or 200 viewers", but what I have is 1 broadcast and max 115 viewers.

Do you know what might be the reason for this?

I do not use adaptive bitrate, please see attached red5-web.properties

WebRTC media server don’t follow a linear equation for capacity to resource usage ratio.  It will depend on many things such as resolution, bitrate etc. best thing to do is to do a load test and determine the handling capacity.

  • Like 1
Link to comment
Share on other sites

  • 1

@dmitry027

As @Connessione mentioned, WebRTC does not follow a linear equation, and these numbers can vary depending on the resources and stream parameters.

On a 360p/480p stream, one broadcast with 200 viewers was tested. According to your calculations, you must be using 720p or 1080p.

  • Like 2
Link to comment
Share on other sites

  • 0
12 hours ago, Yash said:

@dmitry027

As @Connessione mentioned, WebRTC does not follow a linear equation, and these numbers can vary depending on the resources and stream parameters.

On a 360p/480p stream, one broadcast with 200 viewers was tested. According to your calculations, you must be using 720p or 1080p.

@Connessione@Yash, thank you for the reply.

The video file from webrtc-test tool distribution which I used for testing has resolution 640x360 and bitrate is 876 kb/s which seems quite modest:
 

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:02:26.41, start: 0.000000, bitrate: 876 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 777 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: opus (Opus / 0x7375704F), 48000 Hz, stereo, fltp, 90 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

 

Link to comment
Share on other sites

  • 0

I performed additional tests with the streams recorded to my webcam and got the following results on Linode:

4 CPU 8 GB Dedicated:

1280x720x30fps 2.5 Mbps: 90 plays, 18 broadcasts

640x480x30fps 1.7 Mbps: 100 plays, 19 broadcasts

320x240x30fps 0.4 Mbps: 140 plays, 20 broadcasts

8 CPU 16 GB Dedicated:

1280x720x30fps 2.5 Mbps: 180 plays, 35 broadcasts

640x480x30fps 1.7 Mbps: 220 plays, 37 broadcasts

320x240x30fps 0.4 Mbps: 280 plays, 42 broadcasts

Link to comment
Share on other sites

  • 0
Posted (edited)
19 minutes ago, Yash said:

Hi @dmitry027
It appears to be expected with multiple broadcasts and players running at the same time. Have you tested 1 broadcast and players with 720p?

Hello @Yash, thank you for the answer.

I used only one broadcasting stream and multiple players to measure how many plays the server can handle (same Ant Media instance was used to ingest the test stream and play it to multiple players).

I used multiple broadcasting streams and no players to measure how many broadcasts the server can handle.

In other words, I used two different setups to measure maximum broadcasts capacity and maximum plays capacity.

So it was exactly 1 broadcast and multiple players for 720p and other dimensions.

Edited by dmitry027
Link to comment
Share on other sites

 Share

×
×
  • Create New...