设置当前的scoke 设置的大小
ulimit -n 20000 重启服务器后失效
1、abr软件安装步骤
which ab : 查看是否安装了软件
在任意目录下执行该命令:yum -y install httpd-tools
1、abr软件安装步骤
which ab : 查看是否安装了软件
在任意目录下执行该命令:yum -y install httpd-tools
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
2、 测压命令:ab -n1000 -c10 http[s]://www.51fugui.net.a.html
2-1) : 测压的详细参数:
[xufugui@MiWiFi-R1CM-srv ~]$ ab -n1000 -c10 http://www.51fugui.net/a.html
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking www.51fugui.net (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software: nginx/1.8.0
Server Hostname: www.51fugui.net
Server Port: 80
Document Path: /a.html
Document Length: 16 bytes # 请求http[s]的中文的长度
Concurrency Level: 10 # 当前的级别,与-c 的参数的一致
Time taken for tests: 0.156 seconds # 表示这些请求处理完后的所消耗的时间
Complete requests: 1000 # 表示总请求数,与-n 的熟练一样
Failed requests: 0 # 表示失败的次数
Write errors: 0 # 表示错误的个数
Total transferred: 246000 bytes # 表示请求的相应的总和
HTML transferred: 16000 bytes # 表示请求相应正文的数据量的总和
Requests per second: 6398.94 [#/sec] (mean) # 表示吐吞量 ( Complete requests/ Time taken for tests)
Time per request: 1.563 [ms] (mean) # 用户平均等待请求时间,越小越好 (Complete requests / Complete Level)
Time per request: 0.156 [ms] (mean, across all concurrent requests) # 服务器平均请求处理时间,越小越好 ( Time taken for tests / Complete requests)
Transfer rate: 1537.24 [Kbytes/sec] received # 表示这些请求在单位时间内从服务器获取的数据长度,(Total transferred / Time taken for tests )这个统计项可以很好的说明服务器在处理能力达到限制时,其出口带宽的需求量。
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 0.5 0 5
Processing: 0 1 0.6 1 5
Waiting: 0 1 0.6 1 5
Total: 1 2 0.8 1 6
ERROR: The median and mean for the initial connection time are more than twice the standard
deviation apart. These results are NOT reliable.
WARNING: The median and mean for the total time are not within a normal deviation
These results are probably not that reliable.
Percentage of the requests served within a certain time (ms)
50% 1
66% 2
75% 2
80% 2
90% 3
95% 3
98% 3
99% 4
100% 6 (longest request)
这部分数据用于描述每个请求处理时间的分布情况,比如在以上测试结果中,80%请求的处理时间都不超过2ms,而99%的请求都不超过4ms。注意这里的处理时间,是指前面的Time per request,即对于单个用户而言,平均每个请求处理的时间。