Project Versions

Table Of Contents

Previous topic

Hello World Benchmark

Next topic

Installation

This Page

Micro Benchmark

How the benchmarks were performed?

We created a “Hello World” benchmark seeking to identify the smallest load overhead of each framework. Similar to the benchmark made with Frameworks.

Using a route for the HTTP method ‘GET’ we pass a parameter to a handler returning a “Hello $name” response.

What measurements were recorded?

These were the measurements we record to identify the overall performance of each framework:

  • Requests per second
  • Time across all concurrent requests
  • Number of included PHP files on a single request (measured using function get_included_files.
  • Memory Usage per request (measured using function memory_get_usage.

Pariticipant Frameworks

Results

Slim Framework

# ab -n 1000 -c 5 http://localhost/bench/micro/slim/say/hello/Sonny
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)


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

Document Path:          /bench/micro/slim/say/hello/Sonny
Document Length:        13 bytes

Concurrency Level:      5
Time taken for tests:   0.882 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      206000 bytes
HTML transferred:       13000 bytes
Requests per second:    1134.21 [#/sec] (mean)
Time per request:       4.408 [ms] (mean)
Time per request:       0.882 [ms] (mean, across all concurrent requests)
Transfer rate:          228.17 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    4   2.4      4      33
Processing:     0    0   0.5      0      11
Waiting:        0    0   0.5      0      11
Total:          2    4   2.4      4      33

Percentage of the requests served within a certain time (ms)
  50%      4
  66%      4
  75%      5
  80%      5
  90%      6
  95%      8
  98%     12
  99%     14
 100%     33 (longest request)

Silex

# ab -n 1000 -c 5 http://localhost/bench/micro/silex/say/hello/Sonny
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)


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

Document Path:          /bench/micro/silex/say/hello/Sonny
Document Length:        12 bytes

Concurrency Level:      5
Time taken for tests:   2.228 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      225000 bytes
HTML transferred:       12000 bytes
Requests per second:    448.75 [#/sec] (mean)
Time per request:       11.142 [ms] (mean)
Time per request:       2.228 [ms] (mean, across all concurrent requests)
Transfer rate:          98.60 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   11   5.1     10      44
Processing:     0    0   1.1      0      26
Waiting:        0    0   1.1      0      26
Total:          5   11   5.1     10      45

Percentage of the requests served within a certain time (ms)
  50%     10
  66%     12
  75%     13
  80%     14
  90%     17
  95%     20
  98%     25
  99%     29
 100%     45 (longest request)

Phalcon 0.5.0

# ab -n 1000 -c 5 http://localhost/bench/micro/phalcon/say/hello/Sonny
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)


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

Document Path:          /bench/micro/phalcon/say/hello/Sonny
Document Length:        12 bytes

Concurrency Level:      5
Time taken for tests:   0.397 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      205000 bytes
HTML transferred:       12000 bytes
Requests per second:    2516.74 [#/sec] (mean)
Time per request:       1.987 [ms] (mean)
Time per request:       0.397 [ms] (mean, across all concurrent requests)
Transfer rate:          503.84 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    2   0.9      2      11
Processing:     0    0   0.2      0       5
Waiting:        0    0   0.2      0       4
Total:          1    2   0.9      2      11

Percentage of the requests served within a certain time (ms)
  50%      2
  66%      2
  75%      2
  80%      2
  90%      3
  95%      4
  98%      5
  99%      5
 100%     11 (longest request)

Graphs

The first graph shows how many requests per second each framework was able to accept. The second shows the average time across all concurrent requests.

Conclusion

The compiled nature of Phalcon offers extraordinary performance that outperforms all other frameworks measured in these benchmarks.