Bandwidth cost modeling

Do anyone have any Excel spreadsheet model to model bandwidth costs to run a Jitsi SFU?

For example, I’d like to understand how much it costs on bandwidth on AWS ($0.09/GB) to do a 5-person Jitsi call for 1 hour.

Any help much appreciated!

1 Like

Hey, this really depends on a lot of factors. Here is a very rough estimate:

5 x Chrome with simulcast in 720p:
in: 5*4=20 Mbit/s
out: 5+4*0.2=5.8 Mbit/s (one person on large and 4 thumbnails)
approximately 26Mbit/s so for an hour ~12GB * 0.09 = $1

5 x Firefox (no simulcast), this changes only what goes out of the server it will be same as input so 40 Mbit/s, and for an hour ~18GB * 0.09 = $1.6

And these are very rough (if correct) and in best conditions. If you change the UI to Brady bunch everything changes when using simulcast (to lower values).
Here are the values for the bandwidth used by different layers
https://chromium.googlesource.com/external/webrtc/+/master/media/engine/simulcast.cc#61

5 Likes

thank you damencho
what did you mean by $?
can we know for instance if i’m having a multipart conference of 15 people? any specific CPU requirements?
take care

These are US dollars, these are AWS prices.
No specific CPU requirements that I can come up, the idea here is that bandwidth is the most important part, for 15 people you will need as a max to have in of 60Mbit/s and out around 80 Mbit/s this is with simulcast, if let’s say no simulcast on all participants, then you need out of around 120 Mbit/s. These values are for optimal conditions where all participants can send 720p up to 4 Mbits.

1 Like

@damencho
Hi Damian, is it possible to force a particular resolution in the url as an option ?
say CIF or VGA ?
What is the AWS VP server one should go if 4-5 participants streaming at 720 ?

You need to pass in URL correct params for:


and

Something with 8GB of RAM and good network.

2 Likes

thanks for your input Damian.
vinod

Hi Damian,

You had mentioned about the bandwidth needed at the server side in one of the posts. Is it with H.264 ? Does jitsi support VP9 ?

If yes, how to enable it ?

Regards

Vinod

The codec does not change the bandwidth so much. It is the simulcast that makes the big difference and it is described above with an example.

VP9 claims to offer 50% savings in bandwidth for the same video quality. Is it possible to to enable it in place of H.264?

1 Like

I cannot answer that question, look around there were some issues or threads discussing that, I’m also not sure what is the state of the codec in the browsers.

Hi, I would like you to explain more this figures.
1 single user with 720 p produce 4Mb/sc
5 users connected to JVB, at a ratio of 4 Mb persecond you have 5 input strimings of video, which means 20Mb/sc. Right
In the output, I understand JVB emits one person on large and 4 thumbnails, which means,
1 Usr *4 Mb/s + (4 Usr * 4 Mb *0.2) = 7.2 Mb/s. I guess the 0.2 is because of the thumbnail size reduction.

If you could explain your formula out: 5+4*0.2=5.8 Mbit/s , I’t would be appreciated.

Thank you very much, Daniel

This is the output from the bridge to one participant. Sending one HD stream (5) and four thumbnails (40.2). So If you have 10 participants it will be 10(5+4*0.2) in total output. This is output from jvb.

Ok, then , that one dolar (12GB *0.09) is the cost for each user connected to the room.

approximately 26Mbit/s so for an hour ~12GB * 0.09 = $1

The example is for 5 simulcast participants for one hour in and out. Yeah the estimation is not correct … it is more like 20 + 29 = 49 … or I’m wrong again…

  1. I’ve made 2 tests without bandwidth limitation (JVB2):
    (leaving default constraints{video{height{}}} at /etc/jitsi/meet/*.js )
    A) 10 participants with full video results in server input 4.5mbps, server output 15mbps.
    B) 20 participants with full video results in server input 9mbps, server output 50mbps.

Question: Can this result in a quarter bandwidth usage (video fraction) if I set {ideal,max,min} resolutions to the half of defaults (720,720,240 -> 360,360,120) ?

  1. Are these values right for constraints{video{height{}}} at /etc/jitsi/meet/*.js ?

    constraints: {
    video: {
    aspectRatio: 16 / 9,
    height: {
    ideal: 360,
    max: 576,
    min: 180
    }
    }
    },

Will this have the effect to participants be limited to this max resolution? And will these values set the low,standard,high resolutions at UI quality settings?

  1. In a server’s total bandwidth limitation scenario: Does JVB and/or participants really detect maximum is reached and select slower simulcast streams per each participant?
    And what happens to conference if there is not enough bandwidth for all participants streams?

  2. Does the number of participants be limited by the slowest participant’s internet connection?

With my question nr.2 about constraints{video{height{}}} I first meantif those numbers (and the previous “resolution”) can be completely arbitrary, such as v.resolutions of 200, 256 or 503, and if ideal can be under max.

Hi, @damencho @Vinod @Daniel_Gimeno @narcisgarcia
I did a rough estimation with all possible minor details with explanation for jitsi server bandwidth requirements in the following google docs for our deployment and I am sharing with u guys and pardon for any mistakes.


The area I confuse is, low quality videos (u said thumbnails) need 0.28Mbit/s for (180p with H.264) each? yeah I calculated 0.216Mbit/s for 180p with 30fps(with H.265 codec). Is it possible to set all 3 video quality(any?) for simulcasting (min/ideal/max?)? is my OUT correct where simulcasting is disabled because it becomes horrible comparing to when enabled ?

Main Part of the calculation, With 10 person conference server needs :

IN = 4 [per person HD stream] * 10 [persons] = 40 Mbit/s = 5 MByte/s and

OUT = (4 [one person HD stream] + 9 [ nine other] * 0.28 [poor quality stream]) * 10 [sending to all ten participant] = 65.2 Mbit/s = 8.15 MByte/s [simulcast enabled] ; TOTAL = 13.15 MByte/s

OUT = ( 4 [HD stream] * 10 [ten persons]) * 10 [sending to all 10 participants] = 400 Mbit/s = 50MByte/s [simulcast disabled] ; TOTAL = 55 MByte/s

isn’t this correct? I explained the things in following docs but I think @damencho, u calculated less ?

please correct me if I am wrong…!!
Thanx in advance :heart:

3 Likes

Hi

This is very useful info.

We are deploying to AWS in an auto scale group - so theoretically we should not run out of bandwidth as we should be scaling appropriately?

I plan to have 100 rooms x 5 participants a room - any sort of idea on EC2 instances I should have running etc?

Thanks in advance all!

For 5 participants in each room with simulcasting enabled (assuming 30fps and H.264 codec) :
server IN = 4 Mbit/s * 5 = 20 Mbit/s = 2.5 MByte/s
server OUT = ( 4 + 0.28 * 4 ) * 5 = 25.6 Mbit/s = 3.2 MByte/s
server TOTAL = 2.5 + 3.2 = 5.7 MByte/s
so, for 100 concurrent conference of each having 5 participants , server Total = 5.7 * 100 = 570 MByte/s
So, U will need atleast 570 MByte/s (if u want 100 concurrent conferences) server bandwidth to handle ur environment from my calculation.

and these 100 conference with duration of 1 hr, it will cost
=> 570 MByte * 60 * 60 = 2052 GByte or 2.052 TByte of data usage
that means whether the 100 conference of 5 participants are concurrent or not it will cost u 2.052 TByte of data and aws server bandwidth may not be an issue (I am not really pro in this area).

Within Total of 2.052 TB data usage, server In data is 0.9 TByte and server out data is 1.152TB.
and u will need atleast around 600MByte/s if u need concurrent conferences or less if each conference on random times (just calculate highest number of target concurrent conference for highest required bandwidth)

Now just choose a perfect plan on aws (with which I am not that familiar yet…!!) which will be cost effective for u. pardon if I did any mistakes. and remember to set highest data usage and take proper steps to prevent unwanted conferences otherwise u may have to suffer in the long run.
Thanx,
Fuji

1 Like