We’ve made a little test today with the latest version of AVChat (1059) which has some optimized media server file for Red5.
1) We’ve installed Red5 0.8 on an old Toshiba M70 laptop with these specs:
- Pentium M 1.7Ghz (FSB:400Mhz with 2Mb of 2nd level cache)
- 1G DDR2 RAM
- 60GB HDD @ 5400rpm
- 100Mbps Intel network card
- Ubuntu 10.04 LTS
which is connected to our LAN via wire.
2) Once Red5 was up and running on the laptop, we used an internal flash app named “AVChat Virtual User” to create load on the Red5 server! This app creates a lot of virtual users, once each user is created it connects to the avchat30 app on the media server. Once connected it starts generating the kind of load that a normal user would generate: sending text messages, changing status (idle, online), etc… . These virtual users are not able to stream/view video that’s why this quick test today covers AVChat 3 in text chat only mode.
We will release this app when we polsih it so that anyone can test their own servers!
3) With AVChat Virtual User we’ve gradually connected 550 users (100 -> 450 – >550) and observed the load on Red5.
To monitor Red5 we’ve used several tools:
- Java VisualVM: http://download.oracle.com/javase/6/docs/technotes/guides/visualvm/index.html
- top command on the laptop running Ubuntu/Red5 : http://manpages.ubuntu.com/manpages/lucid/man1/top.1.html
- Ubuntu System Monitor
4) The results: CPU usage
5) The results: Memory consumption
- a user connecting generates more CPU usage than a user that is already connected
- Red5/AVChat 3 uses about 6-7Mb of RAM for each 100 users (in addition to the memory used by Red5 by default)
- the cheapest VPS servers (256Mb of RAM) can hold a few hundred users online!
- this server would hold 1000 users (in text chat mode) before reaching 80-90% CPU usage!
- in a real world scenario you would not have the peak CPU usage caused by connecting 100 very ast ( AVChat Virtual User app connecs 1 user every second )
This is by no means an attempt to squeeze as much performance as we can out of this server! There are many ways one cand do that first being the choice of OS.
Note: this is not a clear reflection of real world usage as video creates a lot of load on the media server! The video usage on the server creates a lot more load than the number of users online!