level 8
同样的环境,大小差不了几个字节的页面,
Nginx的worker_connections 1024;
Apache的MaxClients 150,worker模式;
照理说压Nginx如果用1024个并发压效果是最好的,同样压apache并发150的话效果也是最好的。
Nginx的测试结果:
Java代码
[root@localhost nginx-0.7.19]# ab -t 60 -c 1024 http://192.168.1.101:8080/
)
Nginx5000个请求只花费了28秒就搞定。
Apache的测试结果:
Java代码
[root@localhost nginx-0.7.19]# ab -t 60 -c 150 http://192.168.1.101/
Apache一分钟只搞定了4000个请求。
再试试,Nginx的并发150时候的速度:
Java代码
[root@localhost nginx-0.7.19]# ab -t 60 -c 150 http://192.168.1.101:8080/
此次和上次Nginx1024个并发相比快了一秒钟,27秒搞定50000个请求
再试试,Apache的并发1024时候的速度:
我估计会被压死,先把帖子发出去,没压死再修改。。。
Java代码
[root@localhost nginx-0.7.19]# ab -t 60 -c 1024 http://192.168.1.101/
[root@localhost nginx-0.7.19]# ab -t 60 -c 1024 http://192.168.1.101/
居然没有死机! 结论:在我本机当前环境下,Nginx处理高并发小请求的速度要快于Apache。
2014年09月04日 07点09分
1
Nginx的worker_connections 1024;
Apache的MaxClients 150,worker模式;
照理说压Nginx如果用1024个并发压效果是最好的,同样压apache并发150的话效果也是最好的。
Nginx的测试结果:
Java代码
[root@localhost nginx-0.7.19]# ab -t 60 -c 1024 http://192.168.1.101:8080/
)
Nginx5000个请求只花费了28秒就搞定。
Apache的测试结果:
Java代码
[root@localhost nginx-0.7.19]# ab -t 60 -c 150 http://192.168.1.101/
Apache一分钟只搞定了4000个请求。
再试试,Nginx的并发150时候的速度:
Java代码
[root@localhost nginx-0.7.19]# ab -t 60 -c 150 http://192.168.1.101:8080/
此次和上次Nginx1024个并发相比快了一秒钟,27秒搞定50000个请求
再试试,Apache的并发1024时候的速度:
我估计会被压死,先把帖子发出去,没压死再修改。。。
Java代码
[root@localhost nginx-0.7.19]# ab -t 60 -c 1024 http://192.168.1.101/
[root@localhost nginx-0.7.19]# ab -t 60 -c 1024 http://192.168.1.101/
居然没有死机! 结论:在我本机当前环境下,Nginx处理高并发小请求的速度要快于Apache。