#压力测试
>[info] 4核8G SSD盘 腾讯云高IO型I2服务器压测
worker_num = 4
ESD框架 ab压测输出hello 平均 3.6万QPS
SD框架 ab压测输出hello 平均 1.3万QPS
压测数据来自:A-Smile
## 测试命令
~~~
测试命令
ab -c 100 -n 1000000 -k http://172.27.0.7/Index/index
~~~
## sd2
压力测试:1W3
![](https://box.kancloud.cn/1a88baeac5c3eb206c19849d1f550bad_1422x1708.jpg)
## ESD 3w2
压力测试:3W6
~~~
[root@VM_0_4_centos esd]# ab -c 100 -n 1000000 -k http://172.27.0.13/index/index
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 172.27.0.13 (be patient)
Completed 100000 requests
Completed 200000 requests
Completed 300000 requests
Completed 400000 requests
Completed 500000 requests
Completed 600000 requests
Completed 700000 requests
Completed 800000 requests
Completed 900000 requests
Completed 1000000 requests
Finished 1000000 requests
Server Software: swoole-http-server
Server Hostname: 172.27.0.13
Server Port: 80
Document Path: /index/index
Document Length: 7 bytes
Concurrency Level: 100
Time taken for tests: 27.154 seconds
Complete requests: 1000000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 1000000
Total transferred: 166000000 bytes
HTML transferred: 7000000 bytes
Requests per second: 36827.40 [#/sec] (mean)
Time per request: 2.715 [ms] (mean)
Time per request: 0.027 [ms] (mean, across all concurrent requests)
Transfer rate: 5970.07 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 3
Processing: 0 3 0.7 3 36
Waiting: 0 3 0.7 3 36
Total: 0 3 0.7 3 36
Percentage of the requests served within a certain time (ms)
50% 3
66% 3
75% 3
80% 3
90% 3
95% 4
98% 4
99% 5
100% 36 (longest request)
[root@VM_0_4_centos esd]# ab -c 100 -n 1000000 -k http://172.27.0.13/index/index
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 172.27.0.13 (be patient)
Completed 100000 requests
Completed 200000 requests
Completed 300000 requests
Completed 400000 requests
Completed 500000 requests
Completed 600000 requests
Completed 700000 requests
Completed 800000 requests
Completed 900000 requests
Completed 1000000 requests
Finished 1000000 requests
Server Software: swoole-http-server
Server Hostname: 172.27.0.13
Server Port: 80
Document Path: /index/index
Document Length: 7 bytes
Concurrency Level: 100
Time taken for tests: 27.181 seconds
Complete requests: 1000000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 1000000
Total transferred: 166000000 bytes
HTML transferred: 7000000 bytes
Requests per second: 36790.07 [#/sec] (mean)
Time per request: 2.718 [ms] (mean)
Time per request: 0.027 [ms] (mean, across all concurrent requests)
Transfer rate: 5964.01 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 5
Processing: 0 3 0.6 3 22
Waiting: 0 3 0.6 3 21
Total: 0 3 0.6 3 22
Percentage of the requests served within a certain time (ms)
50% 3
66% 3
75% 3
80% 3
90% 3
95% 4
98% 4
99% 5
100% 22 (longest request)
[root@VM_0_4_centos esd]# ab -c 100 -n 1000000 -k http://172.27.0.13/index/index
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 172.27.0.13 (be patient)
\^HCompleted 100000 requests
Completed 200000 requests
Completed 300000 requests
Completed 400000 requests
Completed 500000 requests
Completed 600000 requests
Completed 700000 requests
Completed 800000 requests
Completed 900000 requests
Completed 1000000 requests
Finished 1000000 requests
Server Software: swoole-http-server
Server Hostname: 172.27.0.13
Server Port: 80
Document Path: /index/index
Document Length: 7 bytes
Concurrency Level: 100
Time taken for tests: 26.845 seconds
Complete requests: 1000000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 1000000
Total transferred: 166000000 bytes
HTML transferred: 7000000 bytes
Requests per second: 37250.78 [#/sec] (mean)
Time per request: 2.685 [ms] (mean)
Time per request: 0.027 [ms] (mean, across all concurrent requests)
Transfer rate: 6038.70 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 4
Processing: 0 3 0.5 3 14
Waiting: 0 3 0.5 3 14
Total: 0 3 0.5 3 14
Percentage of the requests served within a certain time (ms)
50% 3
66% 3
75% 3
80% 3
90% 3
95% 3
98% 4
99% 4
100% 14 (longest request)
[root@VM_0_4_centos esd]# ab -c 100 -n 1000000 -k http://172.27.0.13/index/index
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 172.27.0.13 (be patient)
Completed 100000 requests
Completed 200000 requests
Completed 300000 requests
Completed 400000 requests
Completed 500000 requests
Completed 600000 requests
Completed 700000 requests
Completed 800000 requests
Completed 900000 requests
Completed 1000000 requests
Finished 1000000 requests
Server Software: swoole-http-server
Server Hostname: 172.27.0.13
Server Port: 80
Document Path: /index/index
Document Length: 7 bytes
Concurrency Level: 100
Time taken for tests: 27.019 seconds
Complete requests: 1000000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 1000000
Total transferred: 166000000 bytes
HTML transferred: 7000000 bytes
Requests per second: 37010.32 [#/sec] (mean)
Time per request: 2.702 [ms] (mean)
Time per request: 0.027 [ms] (mean, across all concurrent requests)
Transfer rate: 5999.72 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 3
Processing: 0 3 0.6 3 31
Waiting: 0 3 0.6 3 31
Total: 0 3 0.6 3 33
Percentage of the requests served within a certain time (ms)
50% 3
66% 3
75% 3
80% 3
90% 3
95% 3
98% 4
99% 5
100% 33 (longest request)
[root@VM_0_4_centos apps]# ab -c 100 -n 1000000 -k http://172.27.0.13/index/index
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 172.27.0.13 (be patient)
Completed 100000 requests
Completed 200000 requests
Completed 300000 requests
Completed 400000 requests
Completed 500000 requests
Completed 600000 requests
Completed 700000 requests
Completed 800000 requests
Completed 900000 requests
Completed 1000000 requests
Finished 1000000 requests
Server Software: swoole-http-server
Server Hostname: 172.27.0.13
Server Port: 80
Document Path: /index/index
Document Length: 7 bytes
Concurrency Level: 100
Time taken for tests: 27.210 seconds
Complete requests: 1000000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 1000000
Total transferred: 166000000 bytes
HTML transferred: 7000000 bytes
Requests per second: 36751.58 [#/sec] (mean)
Time per request: 2.721 [ms] (mean)
Time per request: 0.027 [ms] (mean, across all concurrent requests)
Transfer rate: 5957.78 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 3
Processing: 0 3 0.6 3 17
Waiting: 0 3 0.6 3 17
Total: 0 3 0.6 3 17
Percentage of the requests served within a certain time (ms)
50% 3
66% 3
75% 3
80% 3
90% 3
95% 4
98% 4
99% 5
100% 17 (longest request)
~~~
## swoole 4.3
swoole 原生 5.9W
![](https://box.kancloud.cn/0367bf124c61eb052ed8b719facee0fb_1502x1710.jpg)
- 前言
- 捐赠ESD项目
- 使用篇-通用
- 环境
- 安装
- 规范
- 压力测试
- 配置
- 如何设置YML配置
- server配置
- 端口配置
- 项目结构
- 事件派发
- 日志
- 注解
- DI容器
- 自定义进程
- 并发及协程池
- Console插件
- Scheduled插件
- Redis插件
- AOP插件
- Saber插件
- Mysql插件
- mysql事务
- Actuator插件
- Whoops插件
- Cache插件
- PHPUnit插件
- Security插件
- Session插件
- EasyRoute插件
- http路由
- ProcessRpc插件
- AutoReload插件
- AnnotationsScan插件
- Tracing-plugin插件
- MQTT插件
- Pack插件
- AMQP插件
- Validate插件
- Uid插件
- Topic插件
- Blade插件
- CsvReader插件
- hashed-wheel-timer-plugin插件
- 使用篇-HTTP
- 路由
- 静态文件
- 路由定义
- 修饰方法
- 路由分组
- 资源路由
- 端口作用域
- 异常处理
- 跨域请求
- 路由缓存
- 控制器
- 控制器初始化
- 前置操作
- 跳转和重定向
- 异常处理
- 请求
- 请求对象
- 请求信息
- request消息
- response消息
- stream消息
- url接口
- 验证器
- 内置验证器
- 内置过滤器
- 使用篇-WS
- 如何使用
- 路由
- 使用篇-TCP
- 插件篇-PluginSystem
- 微服务篇-ESDCloud
- CircuitBreaker插件
- SaberCloud插件
- 分布式链路追踪系统
- Consul插件