You are here

PERFORMANCE_NOTES.txt in Advertisement 7.3

- the script tries to serve ads without using a database connection, so you'll need to set variables in settings.php only
- you need to set drupal_private_key in your settings.php

- it's either DRUPAL_BOOTSTRAP_CONFIGURATION or DRUPAL_BOOTSTRAP_PAGE_HEADER, the other phases in between take very little from DRUPAL_BOOTSTRAP_PAGE_HEADER; but the difference between DRUPAL_BOOTSTRAP_PAGE_HEADER and DRUPAL_BOOTSTRAP_FULL (in a separate, light environment) are not worth it, see below:

- queues: http://www.hashbangcode.com/blog/drupal-7-queues-api


**** FULL_BOOTSTRAP ****
[scripts@Marcos-MBP-2.lan master ⚡] $ ./benchmark.sh
This is ApacheBench, Version 2.3 <$Revision: 1554214 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking ad.local (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Finished 300 requests


Server Software:        Apache
Server Hostname:        ad.local
Server Port:            80

Document Path:          /ad/get
Document Length:        502 bytes

Concurrency Level:      10
Time taken for tests:   8.997 seconds
Complete requests:      300
Failed requests:        173
   (Connect: 0, Receive: 0, Length: 173, Exceptions: 0)
Total transferred:      311919 bytes
Total body sent:        114300
HTML transferred:       151119 bytes
Requests per second:    33.35 [#/sec] (mean)
Time per request:       299.888 [ms] (mean)
Time per request:       29.989 [ms] (mean, across all concurrent requests)
Transfer rate:          33.86 [Kbytes/sec] received
                        12.41 kb/s sent
                        46.26 kb/s total

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.2      0       2
Processing:    51  298 302.4    113     931
Waiting:       51  298 302.4    113     931
Total:         51  299 302.4    113     931

Percentage of the requests served within a certain time (ms)
  50%    113
  66%    290
  75%    661
  80%    679
  90%    864
  95%    868
  98%    872
  99%    874
 100%    931 (longest request)


**** DRUPAL_BOOTSTRAP_PAGE_HEADER ****
[scripts@Marcos-MBP-2.lan master ⚡] $ ./benchmark_hp.sh
This is ApacheBench, Version 2.3 <$Revision: 1554214 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking ad.local (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Finished 300 requests


Server Software:        Apache
Server Hostname:        ad.local
Server Port:            80

Document Path:          /ad_high_performance.php
Document Length:        361 bytes

Concurrency Level:      10
Time taken for tests:   6.339 seconds
Complete requests:      300
Failed requests:        0
Total transferred:      262500 bytes
Total body sent:        119400
HTML transferred:       108300 bytes
Requests per second:    47.32 [#/sec] (mean)
Time per request:       211.314 [ms] (mean)
Time per request:       21.131 [ms] (mean, across all concurrent requests)
Transfer rate:          40.44 [Kbytes/sec] received
                        18.39 kb/s sent
                        58.83 kb/s total

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       1
Processing:    16  203 251.8     27     686
Waiting:       16  203 251.8     27     686
Total:         16  203 251.8     28     686

Percentage of the requests served within a certain time (ms)
  50%     28
  66%    223
  75%    425
  80%    622
  90%    625
  95%    626
  98%    627
  99%    629
 100%    686 (longest request)


**** DRUPAL_BOOTSTRAP_CONFIGURATION ****
[scripts@Marcos-MBP-2.lan master ⚡] $ ./benchmark_hp.sh
This is ApacheBench, Version 2.3 <$Revision: 1554214 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking ad.local (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Finished 300 requests


Server Software:        Apache
Server Hostname:        ad.local
Server Port:            80

Document Path:          /ad_high_performance.php
Document Length:        361 bytes

Concurrency Level:      10
Time taken for tests:   2.049 seconds
Complete requests:      300
Failed requests:        0
Total transferred:      159300 bytes
Total body sent:        119400
HTML transferred:       108300 bytes
Requests per second:    146.41 [#/sec] (mean)
Time per request:       68.300 [ms] (mean)
Time per request:       6.830 [ms] (mean, across all concurrent requests)
Transfer rate:          75.92 [Kbytes/sec] received
                        56.91 kb/s sent
                        132.83 kb/s total

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.2      0       1
Processing:     8   67  88.6     12     262
Waiting:        8   67  88.6     12     262
Total:          8   68  88.6     12     263

Percentage of the requests served within a certain time (ms)
  50%     12
  66%     16
  75%    210
  80%    210
  90%    212
  95%    213
  98%    213
  99%    214
 100%    263 (longest request)

File

PERFORMANCE_NOTES.txt
View source
  1. - the script tries to serve ads without using a database connection, so you'll need to set variables in settings.php only
  2. - you need to set drupal_private_key in your settings.php
  3. - it's either DRUPAL_BOOTSTRAP_CONFIGURATION or DRUPAL_BOOTSTRAP_PAGE_HEADER, the other phases in between take very little from DRUPAL_BOOTSTRAP_PAGE_HEADER; but the difference between DRUPAL_BOOTSTRAP_PAGE_HEADER and DRUPAL_BOOTSTRAP_FULL (in a separate, light environment) are not worth it, see below:
  4. - queues: http://www.hashbangcode.com/blog/drupal-7-queues-api
  5. **** FULL_BOOTSTRAP ****
  6. [scripts@Marcos-MBP-2.lan master ⚡] $ ./benchmark.sh
  7. This is ApacheBench, Version 2.3 <$Revision: 1554214 $>
  8. Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  9. Licensed to The Apache Software Foundation, http://www.apache.org/
  10. Benchmarking ad.local (be patient)
  11. Completed 100 requests
  12. Completed 200 requests
  13. Completed 300 requests
  14. Finished 300 requests
  15. Server Software: Apache
  16. Server Hostname: ad.local
  17. Server Port: 80
  18. Document Path: /ad/get
  19. Document Length: 502 bytes
  20. Concurrency Level: 10
  21. Time taken for tests: 8.997 seconds
  22. Complete requests: 300
  23. Failed requests: 173
  24. (Connect: 0, Receive: 0, Length: 173, Exceptions: 0)
  25. Total transferred: 311919 bytes
  26. Total body sent: 114300
  27. HTML transferred: 151119 bytes
  28. Requests per second: 33.35 [#/sec] (mean)
  29. Time per request: 299.888 [ms] (mean)
  30. Time per request: 29.989 [ms] (mean, across all concurrent requests)
  31. Transfer rate: 33.86 [Kbytes/sec] received
  32. 12.41 kb/s sent
  33. 46.26 kb/s total
  34. Connection Times (ms)
  35. min mean[+/-sd] median max
  36. Connect: 0 0 0.2 0 2
  37. Processing: 51 298 302.4 113 931
  38. Waiting: 51 298 302.4 113 931
  39. Total: 51 299 302.4 113 931
  40. Percentage of the requests served within a certain time (ms)
  41. 50% 113
  42. 66% 290
  43. 75% 661
  44. 80% 679
  45. 90% 864
  46. 95% 868
  47. 98% 872
  48. 99% 874
  49. 100% 931 (longest request)
  50. **** DRUPAL_BOOTSTRAP_PAGE_HEADER ****
  51. [scripts@Marcos-MBP-2.lan master ⚡] $ ./benchmark_hp.sh
  52. This is ApacheBench, Version 2.3 <$Revision: 1554214 $>
  53. Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  54. Licensed to The Apache Software Foundation, http://www.apache.org/
  55. Benchmarking ad.local (be patient)
  56. Completed 100 requests
  57. Completed 200 requests
  58. Completed 300 requests
  59. Finished 300 requests
  60. Server Software: Apache
  61. Server Hostname: ad.local
  62. Server Port: 80
  63. Document Path: /ad_high_performance.php
  64. Document Length: 361 bytes
  65. Concurrency Level: 10
  66. Time taken for tests: 6.339 seconds
  67. Complete requests: 300
  68. Failed requests: 0
  69. Total transferred: 262500 bytes
  70. Total body sent: 119400
  71. HTML transferred: 108300 bytes
  72. Requests per second: 47.32 [#/sec] (mean)
  73. Time per request: 211.314 [ms] (mean)
  74. Time per request: 21.131 [ms] (mean, across all concurrent requests)
  75. Transfer rate: 40.44 [Kbytes/sec] received
  76. 18.39 kb/s sent
  77. 58.83 kb/s total
  78. Connection Times (ms)
  79. min mean[+/-sd] median max
  80. Connect: 0 0 0.1 0 1
  81. Processing: 16 203 251.8 27 686
  82. Waiting: 16 203 251.8 27 686
  83. Total: 16 203 251.8 28 686
  84. Percentage of the requests served within a certain time (ms)
  85. 50% 28
  86. 66% 223
  87. 75% 425
  88. 80% 622
  89. 90% 625
  90. 95% 626
  91. 98% 627
  92. 99% 629
  93. 100% 686 (longest request)
  94. **** DRUPAL_BOOTSTRAP_CONFIGURATION ****
  95. [scripts@Marcos-MBP-2.lan master ⚡] $ ./benchmark_hp.sh
  96. This is ApacheBench, Version 2.3 <$Revision: 1554214 $>
  97. Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  98. Licensed to The Apache Software Foundation, http://www.apache.org/
  99. Benchmarking ad.local (be patient)
  100. Completed 100 requests
  101. Completed 200 requests
  102. Completed 300 requests
  103. Finished 300 requests
  104. Server Software: Apache
  105. Server Hostname: ad.local
  106. Server Port: 80
  107. Document Path: /ad_high_performance.php
  108. Document Length: 361 bytes
  109. Concurrency Level: 10
  110. Time taken for tests: 2.049 seconds
  111. Complete requests: 300
  112. Failed requests: 0
  113. Total transferred: 159300 bytes
  114. Total body sent: 119400
  115. HTML transferred: 108300 bytes
  116. Requests per second: 146.41 [#/sec] (mean)
  117. Time per request: 68.300 [ms] (mean)
  118. Time per request: 6.830 [ms] (mean, across all concurrent requests)
  119. Transfer rate: 75.92 [Kbytes/sec] received
  120. 56.91 kb/s sent
  121. 132.83 kb/s total
  122. Connection Times (ms)
  123. min mean[+/-sd] median max
  124. Connect: 0 0 0.2 0 1
  125. Processing: 8 67 88.6 12 262
  126. Waiting: 8 67 88.6 12 262
  127. Total: 8 68 88.6 12 263
  128. Percentage of the requests served within a certain time (ms)
  129. 50% 12
  130. 66% 16
  131. 75% 210
  132. 80% 210
  133. 90% 212
  134. 95% 213
  135. 98% 213
  136. 99% 214
  137. 100% 263 (longest request)