trunk/3rdparty/srs-docs/doc/raspberrypi.md
SRS can running on armv6(RaspberryPi) or armv7(Android). The bellow data show the performance benchmark.
Download the binary for armv6 from Github or SRS Server
The hardware of raspberrypi:
Software:
Stream information:
For arm SRS: arm
Login as root, set the fd limits:
ulimit -HSn 10240[root@dev6 ~]# ulimit -n
10240
sudo /etc/init.d/srs restartUse centos to publish to SRS:
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
rtmp://192.168.1.105:1935/live/livestreamThe RTMP load test tool, read srs-bench
The sb_rtmp_load used to test RTMP load, support 800-3k concurrency for each process.
./configure && make./objs/sb_rtmp_load -c 800 -r <rtmp_url>Record data before test:
pid=`ps aux|grep srs|grep objs|awk '{print $2}'` && top -p $pid
pid=`ps aux|grep load|grep rtmp|awk '{print $2}'` && top -p $pid
for((;;)); do \
srs_connections=`sudo netstat -anp|grep 1935|grep ESTABLISHED|wc -l`; \
echo "srs_connections: $srs_connections"; \
sleep 5; \
done
[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
| Server | CPU | Mem | Conn | ENbps | ANbps | sb | Lat |
|---|---|---|---|---|---|---|---|
| SRS | 1.0% | 3MB | 3 | - | - | - | 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.
Let's start performance benchmark.
./objs/sb_rtmp_load -c 10 -r rtmp://192.168.1.105:1935/live/livestream >/dev/null &
| Server | CPU | Mem | Conn | ENbps | ANbps | sb | Lat |
|---|---|---|---|---|---|---|---|
| SRS | 17% | 1.4MB | 11 | 2.53Mbps | 2.6Mbps | 1.3% | 1.7s |
| Server | CPU | Mem | Conn | ENbps | ANbps | sb | Lat |
|---|---|---|---|---|---|---|---|
| SRS | 23% | 2MB | 21 | 4.83Mbps | 5.5Mbps | 2.3% | 1.5s |
| Server | CPU | Mem | Conn | ENbps | ANbps | sb | Lat |
|---|---|---|---|---|---|---|---|
| SRS | 50% | 4MB | 31 | 7.1Mbps | 8Mbps | 4% | 2s |
The summary for RaspberryPi Type B, 230kbps performance:
| Server | CPU | Mem | Conn | ENbps | ANbps | sb | Lat |
|---|---|---|---|---|---|---|---|
| SRS | 17% | 1.4MB | 11 | 2.53Mbps | 2.6Mbps | 1.3% | 1.7s |
| SRS | 23% | 2MB | 21 | 4.83Mbps | 5.5Mbps | 2.3% | 1.5s |
| SRS | 50% | 4MB | 31 | 7.1Mbps | 8Mbps | 4% | 2s |
The benchmark for RTMP SRS 0.9.72.
| Server | CPU | Mem | Conn | ENbps | ANbps | sb | Lat |
|---|---|---|---|---|---|---|---|
| SRS | 5% | 2MB | 2 | 1Mbps | 1.2Mbps | 0% | 1.5s |
| SRS | 20% | 2MB | 12 | 6.9Mbps | 6.6Mbps | 2.8% | 2s |
| SRS | 36% | 2.4MB | 22 | 12.7Mbps | 12.9Mbps | 2.3% | 2.5s |
| SRS | 47% | 3.1MB | 32 | 18.5Mbps | 18.5Mbps | 5% | 2.0s |
| SRS | 62% | 3.4MB | 42 | 24.3Mbps | 25.7Mbps | 9.3% | 3.4s |
| SRS | 85% | 3.7MB | 52 | 30.2Mbps | 30.7Mbps | 13.6% | 3.5s |
No data.
Winlin 2014.11