ab Performance Testing
yum install httpd-tools
ab -n 100 -c 100 http://127.0.0.1/
#并发数量
Concurrency Level: 100
#整个测试花费的时间
Time taken for tests: 0.014 seconds
#完成请求的数量
Complete requests: 100
#失败请求的数量
Failed requests: 0
#写错误数量
Write errors: 0
#非200响应码数量
Non-2xx responses: 100
#总共传输字节
Total transferred: 37900 bytes
#html字节大小
HTML transferred: 18500 bytes
#每秒可以请求数量
Requests per second: 6914.67 [#/sec] (mean)
#客户端处理每个请求花费的时间
Time per request: 14.462 [ms] (mean)
#服务器端处理每个请求花费的时间
Time per request: 0.145 [ms] (mean, across all concurrent requests)
#传输速度
Transfer rate: 2559.24 [Kbytes/sec] received
Performance Optimization
- How To Optimize Nginx Configuration https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration
Read topics
- 1. Nginx advantage
- 2. Nginx installation and boot from Kai
- 3. Nginx configuration syntax and directories
- 4. Nginx module
- 5. Nginx handling the static resources
- 6. Nginx browser cache principle
- 7. Cross-domain access resources Nginx
- Anti-theft chain 8. Nginx resources
- 9. Nginx proxy
- 10. Nginx Load Balancing
- 11. Nginx cache
- 12. Nginx static and dynamic separation
- 13. Nginx Rewrite
- 14. Nginx Secure Link
- 15. Nginx Geo
- 16. Nginx HTTPS service
- 17. Nginx and development of Lua
- 18. Nginx release and gray Lua
- 19. Nginx common errors
- 20. Nginx performance optimization
- 21. Nginx Security Management