我正在为我的硕士论文进行性能测试,并且Symfony2简单应用程序的性能很差。这是简单的应用程序,一个查询和一些数学。性能差
的命令测试结果:
AB-C10 -t60 http://sf2.cities.localhost/app.php
Server Software: Apache/2.2.20
Server Hostname: sf2.cities.localhost
Server Port: 80
Document Path: /app.php
Document Length: 2035 bytes
Concurrency Level: 10
Time taken for tests: 60.162 seconds
Complete requests: 217
Failed requests: 68
(Connect: 0, Receive: 0, Length: 68, Exceptions: 0)
Write errors: 0
Non-2xx responses: 68
Total transferred: 393876 bytes
HTML transferred: 321102 bytes
Requests per second: 3.61 [#/sec] (mean)
Time per request: 2772.458 [ms] (mean)
Time per request: 277.246 [ms] (mean, across all concurrent requests)
Transfer rate: 6.39 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 2.1 0 11
Processing: 230 2641 2493.1 1778 17146
Waiting: 230 2641 2493.1 1778 17146
Total: 230 2642 2492.9 1778 17146
测试之前,我启动了两个命令:
PHP应用程序/控制台--env = prod cache:clear php app/console --env = prod cache:warmup
Symfony检查页面告诉我,我只有intl扩展名,所以apc可能没问题。
我的PHP版本是:
用了Suhosin贴片PHP 5.3.6-13ubuntu3.6
可能有人给我说说还有什么我应该在ENV检查的建议吗?
你应该看看/ POST“连接时报”。在那里你可以看到哪一部分需要最多的时间。 – Darcara
这是ab功能吗? – keram
是的,整个输出应该看起来像[this](http://imgur.com/Fwek5) – Darcara