nginx - About using ab to test docker and problems caused by this machine
PHP中文网
PHP中文网 2017-05-24 11:31:48
0
1
747

First prove that it can be accessed

192.168.99.100 is docker’s
127.0.0.1:9889 is local

Test command ab -c 100 -n 100000 http://xxx

Test nginx display html
worker: 1 worker
cpu: one core
men:1G
Environment: docker (ubuntu 16)



The second time (nginx.conf is the same as above)
Test nginx to display html
worker: 1 worker
cpu: quad core
men:8G
Environment: local (Mac)


The third time (except worker_processes=4;nginx.conf configuration is the same as above)
Test nginx to display html
worker: 4 workers
cpu: quad core
men:8G
Environment :Local (Mac)


Change the number of commands to 1W

Why is the container's processing power higher than that of the local machine? Even if I open phpStorm, qq, chrome, etc. locally, the gap will not be that big. Can you analyze the reason? Another question is why the cpu is accessed Is it basically used by most kernels?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
伊谢尔伦

1.ab simulation is all about running threads and consuming system resources, most of which are used to run threads.
2. Why can’t I see which one has higher performance? Such test data are all misunderstandings.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!