Low performance

I am performing performance tests for my master's thesis and I am getting very low performance Symfony2 applications. This is a simple application, one query and some math.

Test results for the team:

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

Before testing, I ran two commands:

php app / console --env = prod cache: clear php app / console --env = prod cache: warmup

The symfony validation page tells me that I just don't have the intl extension, so apc is probably fine.

My PHP version:

PHP 5.3.6-13ubuntu3.6 with Suhosin-Patch

Can someone give me advice on what else should I check in my env?

+3
source share
1 answer

, , . , .

Failed requests: 68. apache, . , , , . VirtualHost -

 LogLevel debug
 CustomLog /var/log/apache2/access-localhost.log vhost_combined
 ErrorLog /var/log/apache2/error-localhost.log

LogLevel debug . warn error .

php.ini php .

, apache2.conf , mpm. , :

<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

<IfModule mpm_worker_module>
    StartServers          2
    MaxClients          150
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadsPerChild      25
    MaxRequestsPerChild   0
</IfModule>

, , 1 apache2 ( , Linux)

( 2 ) , . <? php echo 'Hello World!' ?>, PHP- . , apache . , .

, - concurrency , . concurrency .

ab -c1 -t60 http://sf2.cities.localhost/app.php

, google apache performance tuning ( MySQL ) mysql performance tuning

+5

All Articles