Skip to main content

Symfony 7 Bench Tests

in category Diagnostics -> PHP Applications -> Symfony 7 Bench Tests. Updated at Wed, 21 Feb 2024 19:49:26 EST

Testing Symfony 7 with Apache Bench


These are the Apache bench test results for Symfony 7. I loaded the Symfony 7 Demo app. The demo app provides it's own sqlite db. This first scan is the front page:
$ ab -c1 -n50 http://symfony7.localnet/ 
This is ApacheBench, Version 2.3 <$Revision: 1903618 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking symfony1.localnet (be patient).....done


Server Software:        Apache
Server Hostname:        symfony7.localnet
Server Port:            80

Document Path:          /
Document Length:        75051 bytes

Concurrency Level:      1
Time taken for tests:   43.017 seconds
Complete requests:      50
Failed requests:        0
Total transferred:      3772400 bytes
HTML transferred:       3752550 bytes
Requests per second:    1.16 [#/sec] (mean)
Time per request:       860.340 [ms] (mean)
Time per request:       860.340 [ms] (mean, across all concurrent requests)
Transfer rate:          85.64 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       0
Processing:   851  860   6.0    859     878
Waiting:      692  696   3.7    695     709
Total:        851  860   6.0    859     878

Percentage of the requests served within a certain time (ms)
  50%    859
  66%    863
  75%    864
  80%    865
  90%    870
  95%    871
  98%    878
  99%    878
 100%    878 (longest request)

Only 1.16 requests per second. I ran the test again and pointed Apache bench to the demo blog page. These are the results:

$ ab -c1 -n50 http://symfony7.localnet/en/blog/ 
This is ApacheBench, Version 2.3 <$Revision: 1903618 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking symfony7.localnet (be patient).....done


Server Software:        Apache
Server Hostname:        symfony1.localnet
Server Port:            80

Document Path:          /en/blog/
Document Length:        98411 bytes

Concurrency Level:      1
Time taken for tests:   67.878 seconds
Complete requests:      50
Failed requests:        0
Total transferred:      4942950 bytes
HTML transferred:       4920550 bytes
Requests per second:    0.74 [#/sec] (mean)
Time per request:       1357.569 [ms] (mean)
Time per request:       1357.569 [ms] (mean, across all concurrent requests)
Transfer rate:          71.11 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       0
Processing:  1346 1357  15.2   1353    1417
Waiting:     1029 1036  12.2   1033    1097
Total:       1347 1357  15.2   1353    1418

Percentage of the requests served within a certain time (ms)
  50%   1353
  66%   1355
  75%   1356
  80%   1357
  90%   1371
  95%   1393
  98%   1418
  99%   1418
 100%   1418 (longest request)

I'm a bit disappointed. Symfony is a very pretty app. You be the judge on this one.

Keywords
Symfony framework, Symfony 7 performance, php frameworks performance