如题,我在做压测的时候,发现无论如何都提高不了 ECS 的 cpu 运行负载。每次 cpu 占用率都只在 5%左右,而我在本地压测时候, cpu 占用率都能达到快 100%。是 ECS 对 CPU 有保护措施吗?
另: 本人的 ECS 规格为 1 vCPU,2G RAM,1M 带宽。服务器应用用 docker 下的 openresty 开发,openresty 内没有对客户端请求做限制。
-------------------------
➜ ~ ab -c 10 -n 300 http://101.xx.xx.xx:84/
This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 101.xx.xx.xx (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Finished 300 requests
Server Software: Apache/2.4.18
Server Hostname: 101.xx.xx.xx
Server Port: 84
Document Path: /
Document Length: 6184 bytes
Concurrency Level: 10
Time taken for tests: 15.848 seconds
Complete requests: 300
Failed requests: 0
Total transferred: 1912800 bytes
HTML transferred: 1855200 bytes
Requests per second: 18.93 [#/sec] (mean)
Time per request: 528.282 [ms] (mean)
Time per request: 52.828 [ms] (mean, across all concurrent requests)
Transfer rate: 117.86 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 10 16 58.9 12 1032
Processing: 16 438 1125.1 128 13828
Waiting: 15 152 581.2 51 7172
Total: 28 454 1126.5 143 13843
Percentage of the requests served within a certain time (ms)
50% 143
66% 322
75% 377
80% 561
90% 816
95% 1381
98% 3294
99% 7235
100% 13843 (longest request)
➜ ~ ab -c 10 -n 300 http://101.xx.xx.xx:8001/
This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 101.xx.xx.xx (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Finished 300 requests
Server Software: openresty
Server Hostname: 101.xx.xx.xx
Server Port: 8001
Document Path: /
Document Length: 6776 bytes
Concurrency Level: 10
Time taken for tests: 15.974 seconds
Complete requests: 300
Failed requests: 0
Total transferred: 2106900 bytes
HTML transferred: 2032800 bytes
Requests per second: 18.78 [#/sec] (mean)
Time per request: 532.472 [ms] (mean)
Time per request: 53.247 [ms] (mean, across all concurrent requests)
Transfer rate: 128.80 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 11 51 172.3 15 1064
Processing: 12 460 536.2 294 3384
Waiting: 11 148 316.7 42 3358
Total: 24 510 554.3 324 3398
Percentage of the requests served within a certain time (ms)
50% 324
66% 512
75% 771
80% 961
90% 1249
95% 1655
98% 2163
99% 2268
100% 3398 (longest request)
-------------------------
-------------------------
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。