apache bench性能测试linux中性能测试ab test

Posted 这个蛋有点白

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache bench性能测试linux中性能测试ab test相关的知识,希望对你有一定的参考价值。


Linux中下载安装ab:yum install -y httpd-tools

-p file(请求的文件)

ab -n 800 -c 800 http://192.168.0.10/(-n发出800个请求,-c模拟800并发)
输入ab查看它的参数使用说明
-n requests Number of requests to perform
-c concurrency Number of multiple requests to make at a time(并发数吧)
-t timelimit Seconds to max. to spend on benchmarking
This implies -n 50000
-s timeout Seconds to max. wait for each response
Default is 30 seconds
-b windowsize Size of TCP send/receive buffer, in bytes
-T content-type Content-type header to use for POST/PUT data, eg.
‘application/x-www-form-urlencoded‘
Default is ‘text/plain‘
-v verbosity How much troubleshooting info to print

-x attributes String to insert as table attributes
-y attributes String to insert as tr attributes
-z attributes String to insert as td or th attributes
-C attribute Add cookie, eg. ‘Apache=1234‘. (repeatable)
-H attribute Add Arbitrary header line, eg. ‘Accept-Encoding: gzip‘
Inserted after all normal header lines. (repeatable)
-P attribute Add Basic Proxy Authentication, the attributes
are a colon separated username and password.
-d Do not show percentiles served table.
-S Do not show confidence estimators and warnings.
-q Do not show progress when doing more than 150 requests
-g filename Output collected data to gnuplot format file.
-e filename Output CSV file with percentages served

以上是关于apache bench性能测试linux中性能测试ab test的主要内容,如果未能解决你的问题,请参考以下文章

转:PHP性能:序——谈ab(Apache Bench)压力测试工具

Windows 7环境下网站性能测试小工具 Apache Bench 和 Webbench使用和下载

ab(Apache Bench)压力测试工具

性能工具之 Apache Bench 入门使用

apache bench Web压力测试

利用Apache Bench进行压力测试(安装篇)