php mysql mysqli php7性能测试

测试命令为:ab -c 10 -n 300 http://192.168.6.170/order/1.php

结果是:

php5.4 mysql:

[root@localhost www]# ab -c 10 -n 300 http://192.168.6.170/order/1.php 
This is ApacheBench, Version 2.3 <$Revision: 1430300 $> 
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ 
Licensed to The Apache Software Foundation, http://www.apache.org/ 
  
Benchmarking 192.168.6.170 (be patient) 
Completed 100 requests 
Completed 200 requests 
Completed 300 requests 
Finished 300 requests 
  
  
Server Software:        Apache/2.4.6 
Server Hostname:        192.168.6.170 
Server Port:            80 
  
Document Path:          /order/1.php 
Document Length:        663178 bytes 
  
Concurrency Level:      10 
Time taken for tests:   21.091 seconds 
Complete requests:      300 
Failed requests:        50 
   (Connect: 0, Receive: 0, Length: 50, Exceptions: 0) 
Write errors:           0 
Total transferred:      198918455 bytes 
HTML transferred:       198805355 bytes 
Requests per second:    14.22 [#/sec] (mean) 
Time per request:       703.020 [ms] (mean) 
Time per request:       70.302 [ms] (mean, across all concurrent requests) 
Transfer rate:          9210.56 [Kbytes/sec] received 
  
Connection Times (ms) 
              min  mean[+/-sd] median   max 
Connect:        0    0   0.1      0       0 
Processing:   535  685  67.4    684     953 
Waiting:      211  293  35.9    291     447 
Total:        535  685  67.4    684     953 
  
Percentage of the requests served within a certain time (ms) 
  50%    684 
  66%    706 
  75%    726 
  80%    737 
  90%    759 
  95%    791 
  98%    859 
  99%    913 
 100%    953 (longest request) 
[root@localhost www]# ab -c 10 -n 300 http://192.168.6.170/order/1.php 
This is ApacheBench, Version 2.3 <$Revision: 1430300 $> 
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ 
Licensed to The Apache Software Foundation, http://www.apache.org/ 
  
Benchmarking 192.168.6.170 (be patient) 
Completed 100 requests 
Completed 200 requests 
Completed 300 requests 
Finished 300 requests 
  
  
Server Software:        Apache/2.4.6 
Server Hostname:        192.168.6.170 
Server Port:            80 
  
Document Path:          /order/1.php 
Document Length:        548516 bytes 
  
Concurrency Level:      10 
Time taken for tests:   19.419 seconds 
Complete requests:      300 
Failed requests:        259 
   (Connect: 0, Receive: 0, Length: 259, Exceptions: 0) 
Write errors:           0 
Total transferred:      164676156 bytes 
HTML transferred:       164563056 bytes 
Requests per second:    15.45 [#/sec] (mean) 
Time per request:       647.305 [ms] (mean) 
Time per request:       64.730 [ms] (mean, across all concurrent requests) 
Transfer rate:          8281.34 [Kbytes/sec] received 
  
Connection Times (ms) 
              min  mean[+/-sd] median   max 
Connect:        0    0   0.1      0       1 
Processing:   491  632  71.1    615     901 
Waiting:      210  289  34.4    289     548 
Total:        491  632  71.1    615     901 
  
Percentage of the requests served within a certain time (ms) 
  50%    615 
  66%    659 
  75%    685 
  80%    697 
  90%    728 
  95%    752 
  98%    803 
  99%    835 
 100%    901 (longest request) 

php5.4 mysqli:
<

[root@localhost www]# ab -c 10 -n 300 http://192.168.6.170/order/1.php
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
 
Benchmarking 192.168.6.170 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Finished 300 requests
 
 
Server Software:        Apache/2.4.6
Server Hostname:        192.168.6.170
Server Port:            80
 
Document Path:          /order/1.php
Document Length:        509356 bytes
 
Concurrency Level:      10
Time taken for tests:   18.850 seconds
Complete requests:      300
Failed requests:        273
   (Connect: 0, Receive: 0, Length: 273, Exceptions: 0)
Write errors:           0
Total transferred:      153783987 bytes
HTML transferred:       153670887 bytes
Requests per second:    15.92 [#/sec] (mean)
Time per request:       628.338 [ms] (mean)
Time per request:       62.834 [ms] (mean, across all concurrent requests)
Transfer rate:          7967.04 [Kbytes/sec] received
 
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       0
Processing:   461  614  70.0    603    1004
Waiting:      207  282  36.8    278     485
Total:        461  614  70.0    603    1004
 
Percentage of the requests served within a certain time (ms)
  50%    603
  66%    635
  75%    650
  80%    660
  90%    701
  95%    747
  98%    790
  99%    816
 100%   1004 (longest request)
[root@localhost www]# ab -c 10 -n 300 http://192.168.6.170/order/1.php
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
 
Benchmarking 192.168.6.170 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Finished 300 requests
 
 
Server Software:        Apache/2.4.6
Server Hostname:        192.168.6.170
Server Port:            80
 
Document Path:          /order/1.php
Document Length:        511342 bytes
 
Concurrency Level:      10
Time taken for tests:   18.715 seconds
Complete requests:      300
Failed requests:        282
   (Connect: 0, Receive: 0, Length: 282, Exceptions: 0)
Write errors:           0
Total transferred:      153389584 bytes
HTML transferred:       153276484 bytes
Requests per second:    16.03 [#/sec] (mean)
Time per request:       623.834 [ms] (mean)
Time per request:       62.383 [ms] (mean, across all concurrent requests)
Transfer rate:          8003.97 [Kbytes/sec] received
 
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       0
Processing:   477  607  71.0    596    1053
Waiting:      215  281  38.4    279     623
Total:        477  607  71.0    596    1053
 
Percentage of the requests served within a certain time (ms)
  50%    596
  66%    618
  75%    642
  80%    657
  90%    697
  95%    728
  98%    789
  99%    869
 100%   1053 (longest request)

php7 mysqli:
<

[root@localhost www]# ab -c 10 -n 300 http://192.168.6.170/order/1.php
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
 
Benchmarking 192.168.6.170 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Finished 300 requests
 
 
Server Software:        Apache/2.4.6
Server Hostname:        192.168.6.170
Server Port:            80
 
Document Path:          /order/1.php
Document Length:        570534 bytes
 
Concurrency Level:      10
Time taken for tests:   15.957 seconds
Complete requests:      300
Failed requests:        215
   (Connect: 0, Receive: 0, Length: 215, Exceptions: 0)
Write errors:           0
Total transferred:      159496425 bytes
HTML transferred:       159391425 bytes
Requests per second:    18.80 [#/sec] (mean)
Time per request:       531.911 [ms] (mean)
Time per request:       53.191 [ms] (mean, across all concurrent requests)
Transfer rate:          9760.93 [Kbytes/sec] received
 
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   376  519  65.1    509     952
Waiting:      158  210  28.0    207     420
Total:        376  519  65.1    509     952
 
Percentage of the requests served within a certain time (ms)
  50%    509
  66%    534
  75%    551
  80%    563
  90%    594
  95%    621
  98%    687
  99%    747
 100%    952 (longest request)
[root@localhost www]# ab -c 10 -n 300 http://192.168.6.170/order/1.php
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
 
Benchmarking 192.168.6.170 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Finished 300 requests
 
 
Server Software:        Apache/2.4.6
Server Hostname:        192.168.6.170
Server Port:            80
 
Document Path:          /order/1.php
Document Length:        506815 bytes
 
Concurrency Level:      10
Time taken for tests:   15.555 seconds
Complete requests:      300
Failed requests:        299
   (Connect: 0, Receive: 0, Length: 299, Exceptions: 0)
Write errors:           0
Total transferred:      152157322 bytes
HTML transferred:       152052322 bytes
Requests per second:    19.29 [#/sec] (mean)
Time per request:       518.490 [ms] (mean)
Time per request:       51.849 [ms] (mean, across all concurrent requests)
Transfer rate:          9552.81 [Kbytes/sec] received
 
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   362  507  55.4    496     696
Waiting:      150  207  23.5    206     296
Total:        362  507  55.4    496     696
 
Percentage of the requests served within a certain time (ms)
  50%    496
  66%    521
  75%    538
  80%    550
  90%    586
  95%    611
  98%    647
  99%    680
 100%    696 (longest request)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值