jmeter压测
测下来
hyperf
表现最好,而且hyperf
也是类laravel
框架,写起来也很简单
ab压测
框架 | 服务器 | 命令(并发500,总请求1万) | CPU使用率 | Requests per second(吞吐率) | 用户平均请求等待时间(ms) | 请求详情 |
---|---|---|---|---|---|---|
laravel | 16核32G | ab -c 500 -n 10000 | 100% | 1415 | 353 | 1 |
laravels | 16核32G | ab -c 500 -n 10000 | 40% | 1833 | 54 | 2 |
hyperf | 8核16G | ab -c 500 -n 10000 | 13% | 1798 | 55 | 3 |
1
Server Software: nginx
Server Hostname: xxx
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
Document Path: /xxx
Document Length: 3 bytes
Concurrency Level: 500
Time taken for tests: 7.065 seconds
Complete requests: 10000
Failed requests: 9021
(Connect: 0, Receive: 0, Length: 9021, Exceptions: 0)
Write errors: 0
Non-2xx responses: 9021
Total transferred: 3657495 bytes
HTML transferred: 1356087 bytes
Requests per second: 1415.38 [#/sec] (mean)
Time per request: 353.262 [ms] (mean)
Time per request: 0.707 [ms] (mean, across all concurrent requests)
Transfer rate: 505.54 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 30 126 65.1 107 457
Processing: 8 170 387.6 41 2477
Waiting: 8 166 387.9 36 2477
Total: 43 296 388.4 164 2589
Percentage of the requests served within a certain time (ms)
50% 164
66% 212
75% 239
80% 258
90% 459
95% 1476
98% 1592
99% 1671
100% 2589 (longest request)
2
Server Software: nginx
Server Hostname: xxx
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
Document Path: xxxx
Document Length: 3 bytes
Concurrency Level: 100
Time taken for tests: 5.455 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 8306866 bytes
HTML transferred: 30000 bytes
Requests per second: 1833.07 [#/sec] (mean)
Time per request: 54.553 [ms] (mean)
Time per request: 0.546 [ms] (mean, across all concurrent requests)
Transfer rate: 1487.02 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 26 38 5.1 37 85
Processing: 8 16 7.4 14 113
Waiting: 8 15 7.3 13 112
Total: 38 53 9.6 51 151
Percentage of the requests served within a certain time (ms)
50% 51
66% 54
75% 56
80% 58
90% 62
95% 67
98% 83
99% 95
100% 151 (longest request)
3
Server Software:
Server Hostname: xxxx
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
Document Path: xxx
Document Length: 5 bytes
Concurrency Level: 100
Time taken for tests: 5.561 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 2890000 bytes
HTML transferred: 50000 bytes
Requests per second: 1798.25 [#/sec] (mean)
Time per request: 55.610 [ms] (mean)
Time per request: 0.556 [ms] (mean, across all concurrent requests)
Transfer rate: 507.51 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 27 40 11.7 38 201
Processing: 9 15 6.0 14 158
Waiting: 9 14 5.7 13 152
Total: 37 54 13.5 52 216
Percentage of the requests served within a certain time (ms)
50% 52
66% 55
75% 57
80% 58
90% 63
95% 68
98% 92
99% 118
100% 216 (longest request)