Skip to main content
Version: 4.0 (Archived) 📦

Performance benchmark for SRS on RaspberryPi

SRS can running on armv6(RaspberryPi) or armv7(Android). The bellow data show the performance benchmark.

Install SRS

Download the binary for armv6 from Github or SRS Server

RaspberryPi

The hardware of raspberrypi:

  • RaspberryPi:Type B
  • SoC BroadcomBCM2835(CPU,GPU,DSP,SDRAM,USB)
  • CPU ARM1176JZF-S(ARM11) 700MHz
  • GPU Broadcom VideoCore IV, OpenGL ES 2.0, 1080p 30 h.264/MPEG-4 AVC decoder
  • RAM 512MByte
  • USB 2 x USB2.0
  • VideoOutput Composite RCA(PAL&NTSC), HDMI(rev 1.3&1.4), raw LCD Panels via DSI 14 HDMI resolution from 40x350 to 1920x1200 plus various PAL and NTSC standards
  • AudioOutput 3.5mm, HDMI
  • Storage SD/MMC/SDIO socket
  • Network 10/100 ethernet
  • Device 8xGPIO, UART, I2C, SPI bus, +3.3V, +5V, ground(nagetive)
  • Power 700mA(3.5W) 5V
  • Size 85.60 x 53.98 mm(3.370 x 2.125 in)
  • OS Debian GNU/linux, Fedora, Arch Linux ARM, RISC OS, XBMC

Software:

  • RaspberryPi img:2014-01-07-wheezy-raspbian.img
  • uname: Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l GNU/Linux
  • cpu: arm61
  • Server: srs 0.9.38
  • ServerType: raspberry pi
  • Clientsrs-bench
  • ClientType: Virtual Machine Centos6
  • Play: PC win7, flash
  • Network: 100Mbps

Stream information:

  • Video Bitrate: 200kbps
  • Resolution: 768x320
  • Audio Bitrate: 30kbps

For arm SRS: arm

OS settings

Login as root, set the fd limits:

  • Set limit: ulimit -HSn 10240
  • View the limit:
[root@dev6 ~]# ulimit -n
10240
  • Restart SRS:sudo /etc/init.d/srs restart

Publish and Play

Use centos to publish to SRS:

  • Start FFMPEG:
for((;;)); do \
    ./objs/ffmpeg/bin/ffmpeg \
        -re -i doc/source.flv \
        -acodec copy -vcodec copy \
        -f flv rtmp://192.168.1.105:1935/live/livestream; \
    sleep 1; 
done
  • Play RTMP: rtmp://192.168.1.105:1935/live/livestream
  • Online Play: Online Player

Client

The RTMP load test tool, read srs-bench

The sb_rtmp_load used to test RTMP load, support 800-3k concurrency for each process.

  • Build: ./configure && make
  • Start: ./objs/sb_rtmp_load -c 800 -r <rtmp_url>

Record Data

Record data before test:

  • The cpu for SRS:
pid=`ps aux|grep srs|grep objs|awk '{print $2}'` && top -p $pid
  • The cpu for srs-bench:
pid=`ps aux|grep load|grep rtmp|awk '{print $2}'` && top -p $pid
  • The connections:
for((;;)); do \
    srs_connections=`sudo netstat -anp|grep 1935|grep ESTABLISHED|wc -l`;  \
    echo "srs_connections: $srs_connections";  \
    sleep 5;  \
done
  • The bandwidth in NBps:
[winlin@dev6 ~]$ dstat 30
----total-cpu-usage---- -dsk/total- -net/lo- ---paging-- ---system--
usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw 
  0   0  96   0   0   3|   0     0 |1860B   58k|   0     0 |2996   465 
  0   1  96   0   0   3|   0     0 |1800B   56k|   0     0 |2989   463 
  0   0  97   0   0   2|   0     0 |1500B   46k|   0     0 |2979   461 
  • The table
ServerCPUMemConnENbpsANbpssbLat
SRS1.0%3MB3---0.8s

Memory(Mem): The memory usage for server.

Clients(Conn): The cocurrency connections to server.

ExpectNbps(ENbps): The expect network bandwidth in Xbps.

ActualNbps(ANbps): The actual network bandwidth in Xbps.

Benchmark SRS 0.9.38

Let's start performance benchmark.

  • The data for 10 clients:
./objs/sb_rtmp_load -c 10 -r rtmp://192.168.1.105:1935/live/livestream >/dev/null &
ServerCPUMemConnENbpsANbpssbLat
SRS17%1.4MB112.53Mbps2.6Mbps1.3%1.7s
  • The data for 20 clients:
ServerCPUMemConnENbpsANbpssbLat
SRS23%2MB214.83Mbps5.5Mbps2.3%1.5s
  • The data for 30 clients:
ServerCPUMemConnENbpsANbpssbLat
SRS50%4MB317.1Mbps8Mbps4%2s

The summary for RaspberryPi Type B, 230kbps performance:

ServerCPUMemConnENbpsANbpssbLat
SRS17%1.4MB112.53Mbps2.6Mbps1.3%1.7s
SRS23%2MB214.83Mbps5.5Mbps2.3%1.5s
SRS50%4MB317.1Mbps8Mbps4%2s

Benchmark SRS 0.9.72

The benchmark for RTMP SRS 0.9.72.

ServerCPUMemConnENbpsANbpssbLat
SRS5%2MB21Mbps1.2Mbps0%1.5s
SRS20%2MB126.9Mbps6.6Mbps2.8%2s
SRS36%2.4MB2212.7Mbps12.9Mbps2.3%2.5s
SRS47%3.1MB3218.5Mbps18.5Mbps5%2.0s
SRS62%3.4MB4224.3Mbps25.7Mbps9.3%3.4s
SRS85%3.7MB5230.2Mbps30.7Mbps13.6%3.5s

cubieboard benchmark

No data.

Winlin 2014.11