公司有一台Apache+Php+Mysql的应用服务器,用作开发测试用,前几天配置了另外一台服务器使用Nginx+Fast Cgi php+Mysql,因两台服务器虽都在内网,但之间相隔了一个路由器,为了公平起见我使用了另外一台同在内网的服务器来做测试,先检测一下测试服务器与两台应用服务器的访问速度,然后再用webbench测试php的解析速度。
一、PING的速度
1、Nginx服务器
第1次:
--- ping statistics ---
30 packets transmitted, 30 received, 0% packet loss, time 29019ms
rtt min/avg/max/mdev = 0.100/0.153/0.179/0.021 ms
第2次:
--- ping statistics ---
30 packets transmitted, 30 received, 0% packet loss, time 29018ms
rtt min/avg/max/mdev = 0.085/0.137/0.176/0.020 ms
第3次:
--- ping statistics ---
30 packets transmitted, 30 received, 0% packet loss, time 29019ms
rtt min/avg/max/mdev = 0.115/0.155/0.441/0.054 ms
三次均速:(0.153+0.137+0.155)/3 = 0.148 ms
2、Apache服务器
第1次:
--- ping statistics ---
30 packets transmitted, 30 received, 0% packet loss, time 29027ms
rtt min/avg/max/mdev = 0.400/0.411/0.437/0.027 ms
第2次:
--- ping statistics ---
30 packets transmitted, 30 received, 0% packet loss, time 29027ms
rtt min/avg/max/mdev = 0.392/0.410/0.423/0.016 ms
第3次:
--- ping statistics ---
30 packets transmitted, 30 received, 0% packet loss, time 29027ms
rtt min/avg/max/mdev = 0.386/0.404/0.435/0.026 ms
三次均速:(0.411+0.410+0.404)/3 = 0.408 ms
测试服务器访问Nginx服务器的速度是访问Apache服务器的2.5倍左右
二、webbench测试
为了能让测试数据对比强烈,在两台应用服务器上面安装了同一套Magento系统的网站来测试php解析的速度
1、Apache服务器
第1次:
100 clients, running 30 sec.
Speed=96 pages/min, 23800 bytes/sec.
Requests: 48 susceed, 0 failed.
第2次:
100 clients, running 30 sec.
Speed=82 pages/min, 22501 bytes/sec.
Requests: 41 susceed, 0 failed.
第3次:
100 clients, running 30 sec.
Speed=86 pages/min, 21320 bytes/sec.
Requests: 43 susceed, 0 failed.
30秒内100个并发,页面访问均速为88 页/分钟,22540byte/秒,平均成功44次
阅读(1638) | 评论(0) | 转发(1) |