7.3. 压测过程

先交替的各压一次热热身(可以预览一下性能)

  1. $ ab2 -kc 1000 -n 50000 -H "Accept-Encoding: gzip" http://192.168.6.111:9527/press.html
  2. This is ApacheBench, Version 2.3 <$Revision: 655654 $>
  3. Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  4. Licensed to The Apache Software Foundation, http://www.apache.org/
  5.  
  6. Benchmarking 192.168.6.111 (be patient)
  7. Completed 10000 requests
  8. Completed 20000 requests
  9. Completed 30000 requests
  10. Completed 40000 requests
  11. Completed 50000 requests
  12. Completed 60000 requests
  13. Completed 70000 requests
  14. Completed 80000 requests
  15. Completed 90000 requests
  16. Completed 100000 requests
  17. Finished 100000 requests
  18.  
  19.  
  20. Server Software: hetao/0.2.0
  21. Server Hostname: 192.168.6.111
  22. Server Port: 9527
  23.  
  24. Document Path: /press.html
  25. Document Length: 281 bytes
  26.  
  27. Concurrency Level: 1000
  28. Time taken for tests: 6.923 seconds
  29. Complete requests: 100000
  30. Failed requests: 0
  31. Write errors: 0
  32. Keep-Alive requests: 100000
  33. Total transferred: 41709990 bytes
  34. HTML transferred: 28242186 bytes
  35. Requests per second: 14445.19 [#/sec] (mean)
  36. Time per request: 69.227 [ms] (mean)
  37. Time per request: 0.069 [ms] (mean, across all concurrent requests)
  38. Transfer rate: 5883.87 [Kbytes/sec] received
  39.  
  40. Connection Times (ms)
  41. min mean[+/-sd] median max
  42. Connect: 0 13 198.9 0 3080
  43. Processing: 1 31 102.2 15 3456
  44. Waiting: 0 31 102.2 15 3456
  45. Total: 1 44 242.5 15 3479
  46.  
  47. Percentage of the requests served within a certain time (ms)
  48. 50% 15
  49. 66% 31
  50. 75% 36
  51. 80% 43
  52. 90% 64
  53. 95% 85
  54. 98% 108
  55. 99% 126
  56. 100% 3479 (longest request)
  57.  
  58. $ ab2 -kc 1000 -n 50000 -H "Accept-Encoding: gzip" http://192.168.6.111:9528/press.html
  59. This is ApacheBench, Version 2.3 <$Revision: 655654 $>
  60. Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  61. Licensed to The Apache Software Foundation, http://www.apache.org/
  62.  
  63. Benchmarking 192.168.6.111 (be patient)
  64. Completed 10000 requests
  65. Completed 20000 requests
  66. Completed 30000 requests
  67. Completed 40000 requests
  68. Completed 50000 requests
  69. Completed 60000 requests
  70. Completed 70000 requests
  71. Completed 80000 requests
  72. Completed 90000 requests
  73. Completed 100000 requests
  74. Finished 100000 requests
  75.  
  76.  
  77. Server Software: nginx/1.9.13
  78. Server Hostname: 192.168.6.111
  79. Server Port: 9528
  80.  
  81. Document Path: /press.html
  82. Document Length: 293 bytes
  83.  
  84. Concurrency Level: 1000
  85. Time taken for tests: 23.928 seconds
  86. Complete requests: 100000
  87. Failed requests: 0
  88. Write errors: 0
  89. Keep-Alive requests: 99004
  90. Total transferred: 54195020 bytes
  91. HTML transferred: 29300000 bytes
  92. Requests per second: 4179.19 [#/sec] (mean)
  93. Time per request: 239.281 [ms] (mean)
  94. Time per request: 0.239 [ms] (mean, across all concurrent requests)
  95. Transfer rate: 2211.83 [Kbytes/sec] received
  96.  
  97. Connection Times (ms)
  98. min mean[+/-sd] median max
  99. Connect: 0 23 268.2 0 3167
  100. Processing: 1 127 904.6 75 20671
  101. Waiting: 0 127 904.6 75 20670
  102. Total: 1 150 1058.7 75 23814
  103.  
  104. Percentage of the requests served within a certain time (ms)
  105. 50% 75
  106. 66% 86
  107. 75% 87
  108. 80% 87
  109. 90% 92
  110. 95% 96
  111. 98% 96
  112. 99% 2365
  113. 100% 23814 (longest request)
  114.  
  115. $ ab2 -kc 1000 -n 50000 -H "Accept-Encoding: gzip" http://192.168.6.111:9529/press.html
  116. This is ApacheBench, Version 2.3 <$Revision: 655654 $>
  117. Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  118. Licensed to The Apache Software Foundation, http://www.apache.org/
  119.  
  120. Benchmarking 192.168.6.111 (be patient)
  121. Completed 10000 requests
  122. Completed 20000 requests
  123. Completed 30000 requests
  124. Completed 40000 requests
  125. Completed 50000 requests
  126. Completed 60000 requests
  127. Completed 70000 requests
  128. Completed 80000 requests
  129. Completed 90000 requests
  130. Completed 100000 requests
  131. Finished 100000 requests
  132.  
  133.  
  134. Server Software: Apache/2.2.14
  135. Server Hostname: 192.168.6.111
  136. Server Port: 9529
  137.  
  138. Document Path: /press.html
  139. Document Length: 281 bytes
  140.  
  141. Concurrency Level: 1000
  142. Time taken for tests: 39.800 seconds
  143. Complete requests: 100000
  144. Failed requests: 0
  145. Write errors: 0
  146. Keep-Alive requests: 99119
  147. Total transferred: 65363814 bytes
  148. HTML transferred: 28101124 bytes
  149. Requests per second: 2512.58 [#/sec] (mean)
  150. Time per request: 397.998 [ms] (mean)
  151. Time per request: 0.398 [ms] (mean, across all concurrent requests)
  152. Transfer rate: 1603.83 [Kbytes/sec] received
  153.  
  154. Connection Times (ms)
  155. min mean[+/-sd] median max
  156. Connect: 0 1 48.4 0 3001
  157. Processing: 1 97 774.0 2 25875
  158. Waiting: 0 97 773.8 2 25875
  159. Total: 1 98 780.3 2 25897
  160.  
  161. Percentage of the requests served within a certain time (ms)
  162. 50% 2
  163. 66% 3
  164. 75% 3
  165. 80% 4
  166. 90% 6
  167. 95% 82
  168. 98% 1398
  169. 99% 2352
  170. 100% 25897 (longest request)
  171.  
  172. $ ab2 -kc 1000 -n 50000 -H "Accept-Encoding: gzip" http://192.168.6.111:9530/press.html
  173. This is ApacheBench, Version 2.3 <$Revision: 655654 $>
  174. Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  175. Licensed to The Apache Software Foundation, http://www.apache.org/
  176.  
  177. Benchmarking 192.168.6.111 (be patient)
  178. Completed 10000 requests
  179. Completed 20000 requests
  180. Completed 30000 requests
  181. Completed 40000 requests
  182. Completed 50000 requests
  183. Completed 60000 requests
  184. Completed 70000 requests
  185. Completed 80000 requests
  186. Completed 90000 requests
  187. Completed 100000 requests
  188. Finished 100000 requests
  189.  
  190.  
  191. Server Software: Tengine/2.1.2
  192. Server Hostname: 192.168.6.111
  193. Server Port: 9530
  194.  
  195. Document Path: /press.html
  196. Document Length: 293 bytes
  197.  
  198. Concurrency Level: 1000
  199. Time taken for tests: 25.203 seconds
  200. Complete requests: 100000
  201. Failed requests: 0
  202. Write errors: 0
  203. Keep-Alive requests: 99027
  204. Total transferred: 51895135 bytes
  205. HTML transferred: 29300000 bytes
  206. Requests per second: 3967.81 [#/sec] (mean)
  207. Time per request: 252.028 [ms] (mean)
  208. Time per request: 0.252 [ms] (mean, across all concurrent requests)
  209. Transfer rate: 2010.84 [Kbytes/sec] received
  210.  
  211. Connection Times (ms)
  212. min mean[+/-sd] median max
  213. Connect: 0 16 233.6 0 21003
  214. Processing: 1 91 485.5 33 21267
  215. Waiting: 1 91 485.5 33 21267
  216. Total: 1 107 637.0 33 24392
  217.  
  218. Percentage of the requests served within a certain time (ms)
  219. 50% 33
  220. 66% 101
  221. 75% 112
  222. 80% 112
  223. 90% 132
  224. 95% 182
  225. 98% 213
  226. 99% 337
  227. 100% 24392 (longest request)

然后交替压10次,取“Requests per second”的值。