Does APC not make any performance gains for Symfony1.4 / Doctrine?

I am working on an application (Symfony 1.4 / Doctrine) that has some pages that are pretty heavy to load. One of these pages contains a very complex form with a lot of relationships (built-in forms). The page does something like this: get all the objects, create forms (with objects), visualize the forms.

This results in a load of approximately 1.5 seconds per page. MySQL does not seem to be a bottleneck, so queries take about 0.01 seconds. However, moistening the results takes much longer: about 0.3 seconds. The creation and implementation of all subforms also takes a lot of time (0.5 s). The rest of the time is spent in the usual Symfony / Doctrine method. All of these times were found with Symfony and / or xdebug timers.

I was hoping I could speed up the process on my production server using APC to cache the operation code. So I installed APC, made some settings (cache size = 400 MB, maximum file size = 20 MB to be sure), and finally checked the application.

Without APC:

$ ab -n 100
Requests per second:    0.72 [#/sec] (mean)
Time per request:       1392.142 [ms] (mean)
Time per request:       1392.142 [ms] (mean, across all concurrent requests)
Transfer rate:          130.62 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        4    5   3.6      4      32
Processing:  1301 1387 258.0   1338    3549
Waiting:     1229 1315 258.2   1267    3475
Total:       1305 1392 258.0   1342    3553

With APC:

$ ab -n 100
Requests per second:    0.86 [#/sec] (mean)
Time per request:       1160.666 [ms] (mean)
Time per request:       1160.666 [ms] (mean, across all concurrent requests)
Transfer rate:          156.67 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        4    4   0.7      4       9
Processing:  1071 1156 164.1   1121    2337
Waiting:     1024 1104 164.3   1065    2286
Total:       1075 1161 164.1   1125    2341

, . , APC , Drupal, . / Drupal ( 4 / 8 )! , APC .

- , ? - Symfony / APC? , /, .

+3
1

Opcode . , , APC .

Doctrine , APC . . URL: http://readthedocs.org/docs/doctrine/en/latest/en/manual/caching.html

, apc_add . , , , .

, , XDebug.

+4

All Articles