Magento并发测试

Magento的访问速度挺慢,单感觉上就有点不能接受。本人环境为:

引用
Windows XP sp2
Apache 2.2
PHP5.2.6
MySQL 5.0.54
并且开启了Magento的apc和数据缓存功能

使用ab测试结果如下:

引用

D:\programs\Apache2\bin>ab -n 1000 -c 260 http://localhost/magento
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.2.11
Server Hostname:        localhost
Server Port:            80

Document Path:          /magento
Document Length:        233 bytes

Concurrency Level:      260
Time taken for tests:   26.219 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Non-2xx responses:      1000
Total transferred:      467000 bytes
HTML transferred:       233000 bytes
Requests per second:    38.14 [#/sec] (mean)
Time per request:       6816.875 [ms] (mean)
Time per request:       26.219 [ms] (mean, across all concurrent requests)
Transfer rate:          17.39 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   26 114.1      0     609
Processing:    47 6773 2814.8   8438   10156
Waiting:       31 5978 2731.7   7047    9656
Total:         47 6799 2821.1   8438   10156

Percentage of the requests served within a certain time (ms)
  50%   8438
  66%   8656
  75%   9063
  80%   9141
  90%   9172
  95%   9641
  98%   9750
  99%   9750
100%  10156 (longest request)


这里并发数为260,再高就Failed. 如,我使用300并发数,运行结果为:
引用

D:\programs\Apache2\bin>ab -n 1000 -c 300 http://localhost/magento
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests

Test aborted after 10 failures

apr_socket_connect(): No connection could be made because the target machine actively refused it.   (730061)
Total of 286 requests completed


不太会使用ApacheBench

你可能感兴趣的:(apache,mysql,nginx,socket,XP)