« Return to Thread: short update on performance and Red5

Re: short update on performance and Red5

by Walter Tak :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.
Changes in Italic since original message was a bit sloppy.
 
For those that are a little interested in the performance of Red5 and VOD (video on demand e.g. no live-streams) then here are some measured timings:
 
I executed a few times 10 threads that each downloads as fast as possible 1 single VOD file ( 60 Mb ) via RTMP.
The downloading client is a dedicated quad-core xeon @ 2.13 ghz (X3210) on a 100 mbit link , hosted in a datacentre.
 
The Red5-server serving the files has the same configuration and had a load of 17% CPU (or 75% on one CPU) during the process while outputting at maximum network-capable speed (e.g. 100 mbit , 11 Mbytes). Before and after the process the cpu dropped to a around 0%.
 
10 threads each downloading a different VOD file (each between 30-60 Mb each) didn't differ at all ; same speed (max network) and same load.
 
Based on that very short test one could say that the same configuration , with a 1 gbit NIC instead of 100 mbit, could serve around 5 times that output (e.g. 500 mbit) before maxing out with CPU.
 
With a faster CPU (newer Xeons) that run around 3 Ghz and faster FSB's that value might even be increased with 50 to 100%. You might hit 750-900 Mbit per server,
in theory. 100 mbit continous streaming with a few streams didn't make my server sweat for sure.
 
So if you want to calculate "how many ppl can watch my videos before my servers are maxxed out" then just divide bandwidth by bitrate. If your box is powerful enough (simple dual core should be able to handle 100 mbit without problems) and you have the 100 mbit really dedicated uplink then you could serve 100 streams of 1 mbit each, or 1000 streams of 100 kbit each. (Or a mix ofcourse).
 
With a real 1 gbit connection (make sure you have someone paying the bills for that) you could increase that per box with a factor 5-8.
 
With a video of 1 mbit bitrate you can show decent H.264 content,near fullscreen, with a faster server and a 1 gbit NIC , you could do around 500-800 per box. Let's assume 800 VODs, each 1mbit, fast quad-xeon with a 1gbit NIC.
 
Someone asked for 2 million viewers (right?) ; if those were simultaneous you'd need 2.000.000 / 800 = 2500 servers. Each pumping out a massive 800-900 Mbit. Pricing for 1gbit flatfee bandwidth could approach 500-2000 usd per server so you're talking about 1.2 to 5 million USD a month. Perhaps you can make a better deal with that many servers ofcourse.
 
No need to say that's quite an enterprise job. If the viewers aren't simultaneous but just 2 million visitors per month, each viewing one video then you can
count how many servers you need with bitrate and length of the video.
 
E.g. 800 ppl can watch simultaneous on your server. Your videos have an average length of 10 minutes (youtube concept). You can serve 800 users * ( 60 minutes per hour / 10 minutes length) = 4800 videos per hour. If you visitors would be spread out over 10 hours of a day (instead of 24 hours a day) you could serve 4800 * 10 = 48.000 videos per day. Let's reserve some days and say 25 active days per month and your server would do 48.000 * 25 = 1.2 million video-views each month.
 
You could increase the maximum amount of simultaneous viewers by adding multiple 1 gbit nics in one server but even a fast quad core CPU will be your bottleneck.
 
My 2 cents,
 
Walter

_______________________________________________
Red5 mailing list
Red5@...
http://osflash.org/mailman/listinfo/red5_osflash.org

 « Return to Thread: short update on performance and Red5