HTTP/HLS/RTMP超级负载测试工具
这个负载测试工具是网游分享的工具,可以在http://blog.csdn.net/win_lin/article/details/11835011 或者https://github.com/winlinvip/st-load 找到非常详细的介绍,包括如何安装,如何使用。
服务器负载测试工具(st-load):
- 模拟huge并发:2G内存就可以开300k连接。基于states-threads的协程。
- 支持HLS解析和测试,下载ts片后等待一个切片长度,模拟客户端。支持HLS点播和直播。
- 支持HTTP负载测试,所有并发重复下载一个http文件。可将80Gbps带宽测试的72Gbps。
- 支持RTMP流测试,一个进程支持5k并发。使用nginx-rtmp的协议直接将chunk流解析为messgae。
流媒体相关补充
rtmp://10.169.0.66/rtmp/live 这样的格式,我们称之为一个rtmp流。通用格式为 rtmp://ip_addr/application_name/stream_name(id)
使用方法
将工具下载下来:git clone https://github.com/winlinvip/st-load.git
编译:
- cd st-load
- ./configure
- make
使用:./objs/sb_rtmp_load -c 1 -r rtmp://127.0.0.1:1935/live/livestream
更多使用方法
Usage: ./sb_rtmp_publish <Options> <-u URL>
./sb_rtmp_publish base on st(state-threads), support huge concurrency.
Options:
-c CLIENTS, --clients CLIENTS The concurrency client to start to request. defaut: 1
-r URL, --url URL The load test url for each client to download/process.
-t REPEAT, --repeat REPEAT The repeat is the number for each client to download the url.
ie. rtmp://127.0.0.1:1935/live/livestream_{i}
default: 0. 0 means infinity.
-s STARTUP, --start STARTUP The start is the ramdom sleep when thread startup in seconds.
defaut: 5.00. 0 means no delay.
-d DELAY, --delay DELAY The delay is the ramdom sleep when success in seconds.
default: 1.00. 0 means no delay. -1 means to use HLS EXTINF duration(HLS only).
-e ERROR, --error ERROR The error is the sleep when error in seconds.
defaut: 3.00. 0 means no delay.
-m SUMMARY, --summary SUMMARY The summary is the sleep when report in seconds.
etasks is error_tasks, statks is sub_tasks, estatks is error_sub_tasks.
duration is the running time in seconds, tduration is the avarage duation of tasks.
nread/nwrite in Mbps, duration/tduration in seconds.
defaut: 30.00. 0 means no delay.
-v, --version Print the version and exit.
-h, --help Print this help message and exit.
Examples:1. start a client
./sb_rtmp_publish -i doc/source.200kbps.768x320.flv -c 1 -r rtmp://127.0.0.1:1935/live/livestream
2. start 1000 clients
./sb_rtmp_publish -i doc/source.200kbps.768x320.flv -c 1000 -r rtmp://127.0.0.1:1935/live/livestream_{i}
3. start 10000 clients
./sb_rtmp_publish -i doc/source.200kbps.768x320.flv -c 10000 -r rtmp://127.0.0.1:1935/live/livestream_{i}
4. start 100000 clients
./sb_rtmp_publish -i doc/source.200kbps.768x320.flv -c 100000 -r rtmp://127.0.0.1:1935/live/livestream_{i}
http负载:./objs/sb_http_load
hls负载: ./objs/sb_hls_load
rtmp收看负载: ./objs/sb_rtmp_load
rtmp创建直播流负载: ./objs/sb_rtmp_publish
如果不知道需要跟什么参数可以使用 ./objs/sb_http_load -help 查看
Report分析
[2015-06-01 17:00:06.981][0][trace] params url=rtmp://10.169.0.66/rtmp/live, threads=1, start=5.00, delay=1.00, error=3.00, report=30.00, count=0
[2015-06-01 17:00:06.981][0][trace] create thread for task #1 success
[2015-06-01 17:00:06.981] [report] [4391] threads:0 alive:0 duration:0 tduration:0 nread:0.00 nwrite:0.00 tasks:0 etasks:0 stasks:0 estasks:0
[2015-06-01 17:00:06.981][1][trace] start random sleep 4338ms
[2015-06-01 17:00:11.324][1][trace] start to process RTMP play task #1, schema=rtmp, host=10.169.0.66, port=1935, tcUrl=rtmp://10.169.0.66:1935/rtmp, stream=live, startup=5.00, delay=1.00, error=3.00, count=0
[2015-06-01 17:00:36.981] [report] [4391] threads:1 alive:1 duration:30 tduration:0 nread:2.62 nwrite:0.00 tasks:1 etasks:0 stasks:0 estasks:0
[2015-06-01 17:01:06.981] [report] [4391] threads:1 alive:1 duration:60 tduration:0 nread:2.88 nwrite:0.00 tasks:1 etasks:0 stasks:0 estasks:0
[2015-06-01 17:01:36.981] [report] [4391] threads:1 alive:1 duration:90 tduration:0 nread:2.96 nwrite:0.00 tasks:1 etasks:0 stasks:0 estasks:0
[2015-06-01 17:02:06.981] [report] [4391] threads:1 alive:1 duration:120 tduration:0 nread:3.01 nwrite:0.00 tasks:1 etasks:0 stasks:0 estasks:0
收看直播与创建直播只需要关注:nread与nwrite即可。其他内容有待进一步调查
HTTP/HLS/RTMP超级负载测试工具的更多相关文章
- HTTP/HLS/RTMP超级负载测试工具(转)
这个负载测试工具是网游分享的工具,可以在http://blog.csdn.net/win_lin/article/details/11835011 或者https://github.com/winli ...
- Locust分布式负载测试工具入门
忽略元数据末尾 回到原数据开始处 Locust简介 Locust是一个简单易用的分布式负载测试工具,主要用来对网站进行负载压力测试. 以下是github上的仓库地址 https://github.co ...
- 开源负载测试工具k6比JMeter更容易的5件事
k6是GitHub上提供的开源负载测试工具.它是用Go编写的,并运行用JavaScript编写的测试脚本.它受到了开发人员,测试人员和DevOps团队的强烈兴趣,并拥有超过4400名GitHub明星. ...
- loadrunner(预测系统行为和性能的负载测试工具)
LoadRunner,是一种预测系统行为和性能的负载测试工具.通过以模拟上千万用户实施并发负载及实时性能监测的方式来确认和查找问题,LoadRunner能够对整个企业架构进行测试.企业使用LoadRu ...
- Apache JMeter开源压力测试/负载测试工具 2.12 官方最新版
软件介绍 Jmeter是一款使用Java开发的,开源免费的,测试工具, 主要用来做功能测试和性能测试(压力测试/负载测试),而且用Jmeter 来测试 Restful API, 非常好用. 如何学 ...
- 网站压力负载测试工具:Web版已逝,只好送大伙单机版
前言: 最近老板资金周转出了点问题,工资好久没发了,于是暂闲置在家,静待老板弄到钱东山再起的消息: QQ群里,偶尔不时的会有人问,原来的分布式网站负载工具怎么下载不了啦?或者不能用啦?之类的问题. 我 ...
- 系统负载测试工具-LoadRunner
LoadRunner的主要作用是对系统压力测试进行分析 与之相类似的工具是:badboy:录制脚本工具+jmeter:分析结果工具
- apache 负载测试工具 ab
1.ab工具是apache自带的工具,可以测试服务器的负载能力 2.ab工具的参数 -v:版本 -c:并发数 -n:请求数 -t: 测试所进行的最大秒数 3.例子:ab -c 100 -n 100 - ...
- Web性能和负载测试工具补充
压力测试文档:https://yq.aliyun.com/articles/377543https://www.cnblogs.com/ahjxxy/archive/2012/09/17/268899 ...
随机推荐
- 陕西师范第七届K题----动态规划
ps: 自己的方法绝对是弱爆了 肯定存在更优的方法 O(n^3)复杂度 暴力求解的.. 链接:https://www.nowcoder.com/acm/contest/121/K来源:牛客网 柯怡最近 ...
- django的url分配和url捕获参数
django的url分配 一般视图模块(views.py)都放在自己所属的app目录下,在app目录下新建路径模块(urls.py),由app目录下的urls.py来分配当前app的路径. 在app目 ...
- 20165313 《Java程序设计》第八周学习总结
教材学习总结 线程常用方法 1.start() 2.run()定义线程线程对象被调度之后所执行的操作 3.sleep(int millsecond),必须在try-catch语句块中调用sleep方法 ...
- 《DSP using MATLAB》Problem 5.1
恰逢清明,这几天是清明时节雪纷纷,断崖式降温:又回到了老家,儿时上蹿下跳的核桃树,远去的故乡,远去的时代…… 用到的公式: 这里只放前两个小题的计算过程,都比较简单,细心就行.代码如下: %% --- ...
- hdu1358 Period KMP
给出一个字符串,找出所有可以作为它循环节的子串长度 利用kmp的失配数组的性质,可以直接做 #include<stdio.h> #include<string.h> ; cha ...
- Mybaits代码生成使用
https://jingyan.baidu.com/album/00a07f3869881082d028dc98.html PS:根据数据库中的表 生成代码
- 被卡住的2个问题:1.输入url不执行后台的java方法 2.改了jsp页面,再次请求还是以前的那个页面
1.问题 一个子项目,它的java代码都是打包到磁盘这个文件夹 D://commlib java代码改了之后,也是打包到这个文件夹里,刷新就可看见改了的. 要想子项目能运行,必须在主项目中从/com ...
- java中的Object类和其clone()
1.Object是所有类的父类,任何类都默认继承Object,即直接或间接的继承java.lang.Object类.由于所有的类都继承在Object类,因此省略了extends Object关键字. ...
- 使用k8s && minio 进行 postgres 数据库自动备份
通过k8s 的定时任务job,我们可以方便的进行定时任务应用的开发,通过minio s3 兼容的cloud native 存储 我们可以方便的通过http 请求进行数据文件的备份,以下简单演示下如 ...
- JSON数据的处理中的特殊字符
JSON现在是很常见的处理数据的方式了.但由于自己使用的是反射获取数据,必须自己处理特殊字符,但总是发现有一些看不见的字符在前台 var obj = jQuery.parseJSON(msg);会转换 ...