分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 代码编程

Nginx-4:与apache性能对比

发布时间:2023-09-06 01:36责任编辑:郭大石关键词:apache
压力测试
修改httpd压力测试的配置文件添加到http.conf
<Location /server-status>
SetHandler server-status
#Order deny,allow
#Deny from all
#Allow from 124.192.11.16
</Location>
ExtendedStatus On
<Location /server-info>
SetHandler server-info
#Order deny,allow
#Deny from all
#Allow from 124.192.11.16
</Location>

重启服务
serveice httpd restart
http://192.168.56.20:8080/server-status
####################################################
测试
约定:1用户=1请求
测试的多次平均值
LoaderRunler

 ?总共请求多少 ?并发多少

-rw-r--r--. 1 root root 156K 1月 ?15 20:38 index.html

ab -n 10000 -c 100 http://192.168.56.20:8080/ ???(-n总请求数 -c并发)
Apache Server Status for 192.168.56.20

Server Version: Apache/2.2.15 (Unix) DAV/2
Server Built: Oct 19 2017 16:43:38

Current Time: Monday, 15-Jan-2018 20:46:38 CST
Restart Time: Monday, 15-Jan-2018 20:20:21 CST
Parent Server Generation: 0
Server uptime: 26 minutes 17 seconds
Total accesses: 43069 - Total Traffic: 143.1 MB
CPU Usage: u.75 s17.79 cu0 cs0 - 1.18% CPU load
27.3 requests/sec - 92.9 kB/second - 3483 B/request
2 requests currently being processed, 101 idle workers
apache当并发等于
1 ??2998 ?0.3
100 2533 ?0.3
150 2827 ?53
170 2599 ??65
190 ?2750 ?69
200 1583 ?157

400 ?748 ?553

nginx当并发等于
1 3760 0.2
100 3939 25
200 4756 53
300 3676 81
400 3518 113

总结nginx小文件更强

Nginx-4:与apache性能对比

原文地址:http://blog.51cto.com/13491150/2061090

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved