holamendi
11/7/2012 - 5:08 PM

HAML vs ERB vs SLIM on JRuby 1.7.0 Showdown!

HAML vs ERB vs SLIM on JRuby 1.7.0 Showdown!

/=============================================================================\
|                                                                             |
|                           _____ _     ________  ___                         |
|                          /  ___| |   |_   _|  \/  |                         |
|                          \ `--.| |     | | | .  . |                         |
|                           `--. \ |     | | | |\/| |                         |
|                          /\__/ / |_____| |_| |  | |                         |
|                          \____/\_____/\___/\_|  |_/                         |
|                                                                             |
\=============================================================================/

cmiller@cmiller-iMac [09:14:21] [~]
-> % ab -n 1000 -c 1 http://localhost:3000/slim
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        WEBrick/1.3.1
Server Hostname:        localhost
Server Port:            3000

Document Path:          /slim
Document Length:        6086 bytes

Concurrency Level:      1
Time taken for tests:   13.962 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      6460000 bytes
HTML transferred:       6086000 bytes
Requests per second:    71.62 [#/sec] (mean)
Time per request:       13.962 [ms] (mean)
Time per request:       13.962 [ms] (mean, across all concurrent requests)
Transfer rate:          451.84 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    12   14   5.2     13     170
Waiting:       12   14   5.2     13     170
Total:         12   14   5.2     13     170

Percentage of the requests served within a certain time (ms)
  50%     13
  66%     14
  75%     14
  80%     15
  90%     16
  95%     16
  98%     17
  99%     18
 100%    170 (longest request)

cmiller@cmiller-iMac [09:25:53] [~] 
-> % ab -n 1000 -c 1 http://localhost:3000/slim
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        WEBrick/1.3.1
Server Hostname:        localhost
Server Port:            3000

Document Path:          /slim
Document Length:        6086 bytes

Concurrency Level:      1
Time taken for tests:   12.881 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      6460000 bytes
HTML transferred:       6086000 bytes
Requests per second:    77.63 [#/sec] (mean)
Time per request:       12.881 [ms] (mean)
Time per request:       12.881 [ms] (mean, across all concurrent requests)
Transfer rate:          489.77 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    11   13   1.1     12      17
Waiting:       11   13   1.1     12      17
Total:         11   13   1.1     12      17

Percentage of the requests served within a certain time (ms)
  50%     12
  66%     13
  75%     13
  80%     13
  90%     15
  95%     15
  98%     16
  99%     16
 100%     17 (longest request)

cmiller@cmiller-iMac [09:26:07] [~] 
-> % ab -n 1000 -c 1 http://localhost:3000/slim
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        WEBrick/1.3.1
Server Hostname:        localhost
Server Port:            3000

Document Path:          /slim
Document Length:        6086 bytes

Concurrency Level:      1
Time taken for tests:   12.915 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      6460000 bytes
HTML transferred:       6086000 bytes
Requests per second:    77.43 [#/sec] (mean)
Time per request:       12.915 [ms] (mean)
Time per request:       12.915 [ms] (mean, across all concurrent requests)
Transfer rate:          488.46 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:    11   13   1.2     12      19
Waiting:       11   13   1.2     12      19
Total:         11   13   1.2     13      19

Percentage of the requests served within a certain time (ms)
  50%     13
  66%     13
  75%     13
  80%     13
  90%     15
  95%     16
  98%     16
  99%     16
 100%     19 (longest request)

/=============================================================================\
|                                                                             |
|                           _____ _     ________  ___                         |
|                          /  ___| |   |_   _|  \/  |                         |
|                          \ `--.| |     | | | .  . |                         |
|                           `--. \ |     | | | |\/| |                         |
|                          /\__/ / |_____| |_| |  | |                         |
|                          \____/\_____/\___/\_|  |_/                         |
|                                                                             |
|      jruby 1.7.0 + puma -t 4:8 on a 4-core Intel i7 + ab -n 1000 -c 4       |
|                                                                             |
\=============================================================================/

cmiller@cmiller-iMac [10:55:35] [~/Desktop/hamlerbslim] [master *]
-> % ab -n 1000 -c 4 http://localhost:9292/slim
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /slim
Document Length:        4624 bytes

Concurrency Level:      4
Time taken for tests:   1.500 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      4957000 bytes
HTML transferred:       4624000 bytes
Requests per second:    666.59 [#/sec] (mean)
Time per request:       6.001 [ms] (mean)
Time per request:       1.500 [ms] (mean, across all concurrent requests)
Transfer rate:          3226.83 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     4    6   2.1      5      20
Waiting:        3    5   1.0      5      10
Total:          4    6   2.1      5      20

Percentage of the requests served within a certain time (ms)
  50%      5
  66%      6
  75%      6
  80%      6
  90%      8
  95%      9
  98%     13
  99%     18
 100%     20 (longest request)
cmiller@cmiller-iMac [10:55:49] [~/Desktop/hamlerbslim] [master *]
-> % ab -n 1000 -c 4 http://localhost:9292/slim
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /slim
Document Length:        4624 bytes

Concurrency Level:      4
Time taken for tests:   1.361 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      4957000 bytes
HTML transferred:       4624000 bytes
Requests per second:    735.01 [#/sec] (mean)
Time per request:       5.442 [ms] (mean)
Time per request:       1.361 [ms] (mean, across all concurrent requests)
Transfer rate:          3558.07 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     3    5   2.1      5      24
Waiting:        3    4   1.1      4       8
Total:          3    5   2.1      5      24

Percentage of the requests served within a certain time (ms)
  50%      5
  66%      5
  75%      5
  80%      6
  90%      7
  95%      9
  98%     13
  99%     16
 100%     24 (longest request)
cmiller@cmiller-iMac [10:55:52] [~/Desktop/hamlerbslim] [master *]
-> % ab -n 1000 -c 4 http://localhost:9292/slim
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /slim
Document Length:        4624 bytes

Concurrency Level:      4
Time taken for tests:   1.310 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      4961957 bytes
HTML transferred:       4628624 bytes
Requests per second:    763.51 [#/sec] (mean)
Time per request:       5.239 [ms] (mean)
Time per request:       1.310 [ms] (mean, across all concurrent requests)
Transfer rate:          3699.70 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     3    5   1.7      5      17
Waiting:        3    4   1.1      4      11
Total:          3    5   1.7      5      17

Percentage of the requests served within a certain time (ms)
  50%      5
  66%      5
  75%      5
  80%      5
  90%      8
  95%      8
  98%      9
  99%     14
 100%     17 (longest request)
/=============================================================================\
|                                                                             |
|                           _____ _     ________  ___                         |
|                          /  ___| |   |_   _|  \/  |                         |
|                          \ `--.| |     | | | .  . |                         |
|                           `--. \ |     | | | |\/| |                         |
|                          /\__/ / |_____| |_| |  | |                         |
|                          \____/\_____/\___/\_|  |_/                         |
|                                                                             |
|      jruby 1.7.0 + puma -t 4:8 on a 4-core Intel i7 + ab -n 1000 -c 4       |
|                                                                             |
\=============================================================================/

config.threadsafe! on: ========================================================

cmiller@cmiller-iMac [09:57:24] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/slim
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /slim
Document Length:        6086 bytes

Concurrency Level:      4
Time taken for tests:   3.314 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      6353000 bytes
HTML transferred:       6086000 bytes
Requests per second:    301.74 [#/sec] (mean)
Time per request:       13.256 [ms] (mean)
Time per request:       3.314 [ms] (mean, across all concurrent requests)
Transfer rate:          1872.04 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:     9   13   2.4     13      21
Waiting:        8   12   2.4     12      20
Total:          9   13   2.4     13      21

Percentage of the requests served within a certain time (ms)
  50%     13
  66%     14
  75%     15
  80%     15
  90%     17
  95%     17
  98%     18
  99%     19
 100%     21 (longest request)
cmiller@cmiller-iMac [09:57:28] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/slim
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /slim
Document Length:        6086 bytes

Concurrency Level:      4
Time taken for tests:   3.330 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      6353000 bytes
HTML transferred:       6086000 bytes
Requests per second:    300.29 [#/sec] (mean)
Time per request:       13.320 [ms] (mean)
Time per request:       3.330 [ms] (mean, across all concurrent requests)
Transfer rate:          1863.06 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     8   13   2.5     13      20
Waiting:        8   13   2.5     13      19
Total:          8   13   2.5     13      20

Percentage of the requests served within a certain time (ms)
  50%     13
  66%     14
  75%     15
  80%     15
  90%     17
  95%     17
  98%     18
  99%     19
 100%     20 (longest request)
cmiller@cmiller-iMac [09:57:32] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/slim
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /slim
Document Length:        6086 bytes

Concurrency Level:      4
Time taken for tests:   3.201 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      6353000 bytes
HTML transferred:       6086000 bytes
Requests per second:    312.37 [#/sec] (mean)
Time per request:       12.805 [ms] (mean)
Time per request:       3.201 [ms] (mean, across all concurrent requests)
Transfer rate:          1937.99 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:     8   13   2.4     13      19
Waiting:        8   12   2.4     12      19
Total:          8   13   2.4     13      20

Percentage of the requests served within a certain time (ms)
  50%     13
  66%     14
  75%     14
  80%     15
  90%     16
  95%     17
  98%     18
  99%     18
 100%     20 (longest request)

config.threadsafe! off: =======================================================

cmiller@cmiller-iMac [09:49:12] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/slim
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /slim
Document Length:        6086 bytes

Concurrency Level:      4
Time taken for tests:   10.950 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      6353000 bytes
HTML transferred:       6086000 bytes
Requests per second:    91.32 [#/sec] (mean)
Time per request:       43.801 [ms] (mean)
Time per request:       10.950 [ms] (mean, across all concurrent requests)
Transfer rate:          566.57 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    12   44   2.9     43      60
Waiting:       12   43   2.9     43      59
Total:         13   44   2.9     44      60

Percentage of the requests served within a certain time (ms)
  50%     44
  66%     44
  75%     45
  80%     45
  90%     46
  95%     48
  98%     53
  99%     56
 100%     60 (longest request)
cmiller@cmiller-iMac [09:49:24] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/slim
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /slim
Document Length:        6086 bytes

Concurrency Level:      4
Time taken for tests:   10.805 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      6353000 bytes
HTML transferred:       6086000 bytes
Requests per second:    92.55 [#/sec] (mean)
Time per request:       43.219 [ms] (mean)
Time per request:       10.805 [ms] (mean, across all concurrent requests)
Transfer rate:          574.20 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    12   43   2.6     43      54
Waiting:       12   43   2.6     42      54
Total:         13   43   2.6     43      54

Percentage of the requests served within a certain time (ms)
  50%     43
  66%     44
  75%     44
  80%     44
  90%     46
  95%     48
  98%     51
  99%     52
 100%     54 (longest request)
cmiller@cmiller-iMac [09:49:35] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/slim
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /slim
Document Length:        6086 bytes

Concurrency Level:      4
Time taken for tests:   10.699 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      6353000 bytes
HTML transferred:       6086000 bytes
Requests per second:    93.47 [#/sec] (mean)
Time per request:       42.796 [ms] (mean)
Time per request:       10.699 [ms] (mean, across all concurrent requests)
Transfer rate:          579.88 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    12   43   2.3     43      57
Waiting:       12   42   2.3     42      56
Total:         12   43   2.3     43      57

Percentage of the requests served within a certain time (ms)
  50%     43
  66%     43
  75%     44
  80%     44
  90%     45
  95%     46
  98%     48
  99%     50
 100%     57 (longest request)
/=============================================================================\
|                                                                             |
|                         _   _   ___  ___  ___ _                             |
|                        | | | | / _ \ |  \/  || |                            |
|                        | |_| |/ /_\ \| .  . || |                            |
|                        |  _  ||  _  || |\/| || |                            |
|                        | | | || | | || |  | || |____                        |
|                        \_| |_/\_| |_/\_|  |_/\_____/                        |
|                                                                             |
\=============================================================================/

cmiller@cmiller-iMac [09:12:51] [~]
-> % ab -n 1000 -c 1 http://localhost:3000/haml
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        WEBrick/1.3.1
Server Hostname:        localhost
Server Port:            3000

Document Path:          /haml
Document Length:        10095 bytes

Concurrency Level:      1
Time taken for tests:   17.297 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      10470000 bytes
HTML transferred:       10095000 bytes
Requests per second:    57.81 [#/sec] (mean)
Time per request:       17.297 [ms] (mean)
Time per request:       17.297 [ms] (mean, across all concurrent requests)
Transfer rate:          591.12 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    14   17  10.6     16     331
Waiting:       14   17  10.6     16     331
Total:         14   17  10.6     16     331

Percentage of the requests served within a certain time (ms)
  50%     16
  66%     17
  75%     18
  80%     18
  90%     20
  95%     21
  98%     22
  99%     23
 100%    331 (longest request)

cmiller@cmiller-iMac [09:16:45] [~]
-> % ab -n 1000 -c 1 http://localhost:3000/haml
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        WEBrick/1.3.1
Server Hostname:        localhost
Server Port:            3000

Document Path:          /haml
Document Length:        10095 bytes

Concurrency Level:      1
Time taken for tests:   15.114 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      10470000 bytes
HTML transferred:       10095000 bytes
Requests per second:    66.16 [#/sec] (mean)
Time per request:       15.114 [ms] (mean)
Time per request:       15.114 [ms] (mean, across all concurrent requests)
Transfer rate:          676.50 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    13   15   1.2     15      20
Waiting:       13   15   1.2     14      20
Total:         13   15   1.2     15      21

Percentage of the requests served within a certain time (ms)
  50%     15
  66%     15
  75%     15
  80%     16
  90%     17
  95%     18
  98%     18
  99%     19
 100%     21 (longest request)

cmiller@cmiller-iMac [09:25:02] [~] 
-> % ab -n 1000 -c 1 http://localhost:3000/haml
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        WEBrick/1.3.1
Server Hostname:        localhost
Server Port:            3000

Document Path:          /haml
Document Length:        10095 bytes

Concurrency Level:      1
Time taken for tests:   14.898 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      10470000 bytes
HTML transferred:       10095000 bytes
Requests per second:    67.12 [#/sec] (mean)
Time per request:       14.898 [ms] (mean)
Time per request:       14.898 [ms] (mean, across all concurrent requests)
Transfer rate:          686.31 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    13   15   1.5     14      42
Waiting:       13   15   1.5     14      42
Total:         13   15   1.5     14      42

Percentage of the requests served within a certain time (ms)
  50%     14
  66%     15
  75%     15
  80%     16
  90%     17
  95%     17
  98%     18
  99%     19
 100%     42 (longest request)
/=============================================================================\
|                                                                             |
|                         _   _   ___  ___  ___ _                             |
|                        | | | | / _ \ |  \/  || |                            |
|                        | |_| |/ /_\ \| .  . || |                            |
|                        |  _  ||  _  || |\/| || |                            |
|                        | | | || | | || |  | || |____                        |
|                        \_| |_/\_| |_/\_|  |_/\_____/                        |
|                                                                             |
|      jruby 1.7.0 + puma -t 4:8 on a 4-core Intel i7 + ab -n 1000 -c 4       |
|                                                                             |
\=============================================================================/

cmiller@cmiller-iMac [10:53:01] [~/Desktop/hamlerbslim] [master *]
-> % ab -n 1000 -c 4 http://localhost:9292/haml
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /haml
Document Length:        4927 bytes

Concurrency Level:      4
Time taken for tests:   1.873 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      5260000 bytes
HTML transferred:       4927000 bytes
Requests per second:    534.03 [#/sec] (mean)
Time per request:       7.490 [ms] (mean)
Time per request:       1.873 [ms] (mean, across all concurrent requests)
Transfer rate:          2743.15 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:     5    7   1.8      7      22
Waiting:        4    7   1.4      6      12
Total:          5    7   1.8      7      22

Percentage of the requests served within a certain time (ms)
  50%      7
  66%      7
  75%      8
  80%      8
  90%     10
  95%     11
  98%     12
  99%     15
 100%     22 (longest request)
cmiller@cmiller-iMac [10:53:04] [~/Desktop/hamlerbslim] [master *]
-> % ab -n 1000 -c 4 http://localhost:9292/haml
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /haml
Document Length:        4927 bytes

Concurrency Level:      4
Time taken for tests:   1.836 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      5260000 bytes
HTML transferred:       4927000 bytes
Requests per second:    544.78 [#/sec] (mean)
Time per request:       7.342 [ms] (mean)
Time per request:       1.836 [ms] (mean, across all concurrent requests)
Transfer rate:          2798.40 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     5    7   1.7      7      17
Waiting:        4    7   1.4      6      11
Total:          5    7   1.7      7      17

Percentage of the requests served within a certain time (ms)
  50%      7
  66%      7
  75%      8
  80%      8
  90%     10
  95%     11
  98%     12
  99%     15
 100%     17 (longest request)
cmiller@cmiller-iMac [10:53:55] [~/Desktop/hamlerbslim] [master *]
-> % ab -n 1000 -c 4 http://localhost:9292/haml
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /haml
Document Length:        4927 bytes

Concurrency Level:      4
Time taken for tests:   1.891 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      5260000 bytes
HTML transferred:       4927000 bytes
Requests per second:    528.95 [#/sec] (mean)
Time per request:       7.562 [ms] (mean)
Time per request:       1.891 [ms] (mean, across all concurrent requests)
Transfer rate:          2717.05 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     5    7   1.5      7      13
Waiting:        4    7   1.4      7      13
Total:          5    8   1.5      7      14

Percentage of the requests served within a certain time (ms)
  50%      7
  66%      8
  75%      8
  80%      9
  90%     10
  95%     11
  98%     11
  99%     12
 100%     14 (longest request)
/=============================================================================\
|                                                                             |
|                         _   _   ___  ___  ___ _                             |
|                        | | | | / _ \ |  \/  || |                            |
|                        | |_| |/ /_\ \| .  . || |                            |
|                        |  _  ||  _  || |\/| || |                            |
|                        | | | || | | || |  | || |____                        |
|                        \_| |_/\_| |_/\_|  |_/\_____/                        |
|                                                                             |
|      jruby 1.7.0 + puma -t 4:8 on a 4-core Intel i7 + ab -n 1000 -c 4       |
|                                                                             |
\=============================================================================/

config.threadsafe! on: ========================================================

cmiller@cmiller-iMac [10:00:35] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/haml
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /haml
Document Length:        10095 bytes

Concurrency Level:      4
Time taken for tests:   3.695 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      10362000 bytes
HTML transferred:       10095000 bytes
Requests per second:    270.62 [#/sec] (mean)
Time per request:       14.781 [ms] (mean)
Time per request:       3.695 [ms] (mean, across all concurrent requests)
Transfer rate:          2738.44 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.3      0      11
Processing:     9   15   2.7     15      28
Waiting:        9   14   2.6     14      24
Total:         10   15   2.7     15      28

Percentage of the requests served within a certain time (ms)
  50%     15
  66%     16
  75%     16
  80%     17
  90%     18
  95%     19
  98%     20
  99%     21
 100%     28 (longest request)
cmiller@cmiller-iMac [10:00:29] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/haml
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /haml
Document Length:        10095 bytes

Concurrency Level:      4
Time taken for tests:   3.781 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      10362000 bytes
HTML transferred:       10095000 bytes
Requests per second:    264.47 [#/sec] (mean)
Time per request:       15.125 [ms] (mean)
Time per request:       3.781 [ms] (mean, across all concurrent requests)
Transfer rate:          2676.17 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:     9   15   2.8     15      28
Waiting:        9   14   2.8     14      27
Total:          9   15   2.8     15      28

Percentage of the requests served within a certain time (ms)
  50%     15
  66%     16
  75%     17
  80%     18
  90%     19
  95%     19
  98%     20
  99%     21
 100%     28 (longest request)
cmiller@cmiller-iMac [10:00:25] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/haml
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /haml
Document Length:        10095 bytes

Concurrency Level:      4
Time taken for tests:   3.562 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      10362000 bytes
HTML transferred:       10095000 bytes
Requests per second:    280.74 [#/sec] (mean)
Time per request:       14.248 [ms] (mean)
Time per request:       3.562 [ms] (mean, across all concurrent requests)
Transfer rate:          2840.81 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     9   14   2.6     14      24
Waiting:        9   14   2.6     14      24
Total:          9   14   2.6     14      24

Percentage of the requests served within a certain time (ms)
  50%     14
  66%     15
  75%     16
  80%     17
  90%     18
  95%     18
  98%     19
  99%     20
 100%     24 (longest request)

config.threadsafe! off: =======================================================

cmiller@cmiller-iMac [09:47:24] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/haml
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /haml
Document Length:        10095 bytes

Concurrency Level:      4
Time taken for tests:   13.455 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      10362000 bytes
HTML transferred:       10095000 bytes
Requests per second:    74.32 [#/sec] (mean)
Time per request:       53.822 [ms] (mean)
Time per request:       13.455 [ms] (mean, across all concurrent requests)
Transfer rate:          752.05 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    18   54   5.8     52      86
Waiting:       17   53   5.7     51      85
Total:         18   54   5.8     52      86

Percentage of the requests served within a certain time (ms)
  50%     52
  66%     53
  75%     55
  80%     57
  90%     60
  95%     66
  98%     72
  99%     75
 100%     86 (longest request)
cmiller@cmiller-iMac [09:47:38] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/haml
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /haml
Document Length:        10095 bytes

Concurrency Level:      4
Time taken for tests:   12.738 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      10362000 bytes
HTML transferred:       10095000 bytes
Requests per second:    78.50 [#/sec] (mean)
Time per request:       50.953 [ms] (mean)
Time per request:       12.738 [ms] (mean, across all concurrent requests)
Transfer rate:          794.39 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    14   51   2.4     51      60
Waiting:       14   50   2.4     50      60
Total:         14   51   2.4     51      61

Percentage of the requests served within a certain time (ms)
  50%     51
  66%     52
  75%     52
  80%     52
  90%     53
  95%     54
  98%     56
  99%     58
 100%     61 (longest request)
cmiller@cmiller-iMac [09:47:54] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/haml
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /haml
Document Length:        10095 bytes

Concurrency Level:      4
Time taken for tests:   12.661 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      10362000 bytes
HTML transferred:       10095000 bytes
Requests per second:    78.98 [#/sec] (mean)
Time per request:       50.643 [ms] (mean)
Time per request:       12.661 [ms] (mean, across all concurrent requests)
Transfer rate:          799.25 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:    14   50   2.4     50      61
Waiting:       14   50   2.4     50      61
Total:         14   51   2.4     51      61

Percentage of the requests served within a certain time (ms)
  50%     51
  66%     51
  75%     52
  80%     52
  90%     53
  95%     54
  98%     56
  99%     58
 100%     61 (longest request)
/=============================================================================\
|                                                                             |
|                              _________________                              |
|                             |  ___| ___ \ ___ \                             |
|                             | |__ | |_/ / |_/ /                             |
|                             |  __||    /| ___ \                             |
|                             | |___| |\ \| |_/ /                             |
|                             \____/\_| \_\____/                              |
|                                                                             |
\=============================================================================/

cmiller@cmiller-iMac [09:15:18] [~]
-> % ab -n 1000 -c 1 http://localhost:3000/erb
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        WEBrick/1.3.1
Server Hostname:        localhost
Server Port:            3000

Document Path:          /erb
Document Length:        7590 bytes

Concurrency Level:      1
Time taken for tests:   13.571 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      7964000 bytes
HTML transferred:       7590000 bytes
Requests per second:    73.69 [#/sec] (mean)
Time per request:       13.571 [ms] (mean)
Time per request:       13.571 [ms] (mean, across all concurrent requests)
Transfer rate:          573.10 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    12   13   1.4     13      24
Waiting:       11   13   1.4     13      24
Total:         12   14   1.4     13      24

Percentage of the requests served within a certain time (ms)
  50%     13
  66%     13
  75%     14
  80%     15
  90%     16
  95%     16
  98%     17
  99%     19
 100%     24 (longest request)

cmiller@cmiller-iMac [09:26:40] [~] 
-> % ab -n 1000 -c 1 http://localhost:3000/erb 
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        WEBrick/1.3.1
Server Hostname:        localhost
Server Port:            3000

Document Path:          /erb
Document Length:        7590 bytes

Concurrency Level:      1
Time taken for tests:   12.903 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      7964000 bytes
HTML transferred:       7590000 bytes
Requests per second:    77.50 [#/sec] (mean)
Time per request:       12.903 [ms] (mean)
Time per request:       12.903 [ms] (mean, across all concurrent requests)
Transfer rate:          602.73 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    11   13   1.2     12      18
Waiting:       11   13   1.2     12      18
Total:         11   13   1.2     12      18

Percentage of the requests served within a certain time (ms)
  50%     12
  66%     13
  75%     13
  80%     13
  90%     15
  95%     16
  98%     16
  99%     16
 100%     18 (longest request)

cmiller@cmiller-iMac [09:27:26] [~] 
-> % ab -n 1000 -c 1 http://localhost:3000/erb
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        WEBrick/1.3.1
Server Hostname:        localhost
Server Port:            3000

Document Path:          /erb
Document Length:        7590 bytes

Concurrency Level:      1
Time taken for tests:   12.996 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      7964000 bytes
HTML transferred:       7590000 bytes
Requests per second:    76.95 [#/sec] (mean)
Time per request:       12.996 [ms] (mean)
Time per request:       12.996 [ms] (mean, across all concurrent requests)
Transfer rate:          598.45 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    11   13   1.2     12      18
Waiting:       11   13   1.2     12      18
Total:         12   13   1.2     13      19

Percentage of the requests served within a certain time (ms)
  50%     13
  66%     13
  75%     13
  80%     13
  90%     15
  95%     16
  98%     16
  99%     16
 100%     19 (longest request)
/=============================================================================\
|                                                                             |
|                              _________________                              |
|                             |  ___| ___ \ ___ \                             |
|                             | |__ | |_/ / |_/ /                             |
|                             |  __||    /| ___ \                             |
|                             | |___| |\ \| |_/ /                             |
|                             \____/\_| \_\____/                              |
|                                                                             |
|      jruby 1.7.0 + puma -t 4:8 on a 4-core Intel i7 + ab -n 1000 -c 4       |
|                                                                             |
\=============================================================================/

cmiller@cmiller-iMac [10:48:34] [~/Desktop/hamlerbslim] [master *]
-> % ab -n 1000 -c 4 http://localhost:9292/erb
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /erb
Document Length:        6128 bytes

Concurrency Level:      4
Time taken for tests:   1.723 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      6467553 bytes
HTML transferred:       6134128 bytes
Requests per second:    580.40 [#/sec] (mean)
Time per request:       6.892 [ms] (mean)
Time per request:       1.723 [ms] (mean, across all concurrent requests)
Transfer rate:          3665.77 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     4    7   1.3      7      18
Waiting:        4    6   1.1      6      11
Total:          4    7   1.3      7      18

Percentage of the requests served within a certain time (ms)
  50%      7
  66%      7
  75%      7
  80%      7
  90%      8
  95%      9
  98%     11
  99%     11
 100%     18 (longest request)
-> % ab -n 1000 -c 4 http://localhost:9292/erb
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /erb
Document Length:        6128 bytes

Concurrency Level:      4
Time taken for tests:   1.616 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      6461000 bytes
HTML transferred:       6128000 bytes
Requests per second:    618.76 [#/sec] (mean)
Time per request:       6.464 [ms] (mean)
Time per request:       1.616 [ms] (mean, across all concurrent requests)
Transfer rate:          3904.14 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     4    6   2.0      6      28
Waiting:        3    5   1.0      5       9
Total:          4    6   2.0      6      28

Percentage of the requests served within a certain time (ms)
  50%      6
  66%      6
  75%      7
  80%      7
  90%      8
  95%      9
  98%     12
  99%     16
 100%     28 (longest request)
cmiller@cmiller-iMac [10:50:33] [~/Desktop/hamlerbslim] [master *]
-> % ab -n 1000 -c 4 http://localhost:9292/erb
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /erb
Document Length:        6128 bytes

Concurrency Level:      4
Time taken for tests:   1.544 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      6467461 bytes
HTML transferred:       6134128 bytes
Requests per second:    647.64 [#/sec] (mean)
Time per request:       6.176 [ms] (mean)
Time per request:       1.544 [ms] (mean, across all concurrent requests)
Transfer rate:          4090.42 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     4    6   1.8      6      22
Waiting:        3    5   1.0      5      10
Total:          4    6   1.8      6      23

Percentage of the requests served within a certain time (ms)
  50%      6
  66%      6
  75%      6
  80%      7
  90%      8
  95%      9
  98%     10
  99%     16
 100%     23 (longest request)
/=============================================================================\
|                                                                             |
|                              _________________                              |
|                             |  ___| ___ \ ___ \                             |
|                             | |__ | |_/ / |_/ /                             |
|                             |  __||    /| ___ \                             |
|                             | |___| |\ \| |_/ /                             |
|                             \____/\_| \_\____/                              |
|                                                                             |
|      jruby 1.7.0 + puma -t 4:8 on a 4-core Intel i7 + ab -n 1000 -c 4       |
|                                                                             |
\=============================================================================/

config.threadsafe! on: ========================================================

cmiller@cmiller-iMac [10:02:22] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/erb
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /erb
Document Length:        7590 bytes

Concurrency Level:      4
Time taken for tests:   3.185 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      7857000 bytes
HTML transferred:       7590000 bytes
Requests per second:    313.95 [#/sec] (mean)
Time per request:       12.741 [ms] (mean)
Time per request:       3.185 [ms] (mean, across all concurrent requests)
Transfer rate:          2408.86 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     8   13   2.5     13      21
Waiting:        7   12   2.4     12      21
Total:          8   13   2.5     13      21

Percentage of the requests served within a certain time (ms)
  50%     13
  66%     14
  75%     14
  80%     15
  90%     16
  95%     17
  98%     17
  99%     18
 100%     21 (longest request)
cmiller@cmiller-iMac [10:02:26] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/erb
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /erb
Document Length:        7590 bytes

Concurrency Level:      4
Time taken for tests:   3.001 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      7857000 bytes
HTML transferred:       7590000 bytes
Requests per second:    333.19 [#/sec] (mean)
Time per request:       12.005 [ms] (mean)
Time per request:       3.001 [ms] (mean, across all concurrent requests)
Transfer rate:          2556.51 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     7   12   2.4     12      18
Waiting:        7   11   2.4     11      17
Total:          7   12   2.4     12      18

Percentage of the requests served within a certain time (ms)
  50%     12
  66%     13
  75%     14
  80%     14
  90%     15
  95%     16
  98%     17
  99%     17
 100%     18 (longest request)
cmiller@cmiller-iMac [10:03:00] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/erb
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /erb
Document Length:        7590 bytes

Concurrency Level:      4
Time taken for tests:   2.963 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      7857000 bytes
HTML transferred:       7590000 bytes
Requests per second:    337.45 [#/sec] (mean)
Time per request:       11.854 [ms] (mean)
Time per request:       2.963 [ms] (mean, across all concurrent requests)
Transfer rate:          2589.22 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:     7   12   2.4     12      17
Waiting:        7   11   2.4     11      17
Total:          7   12   2.4     12      17

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

config.threadsafe! off: =======================================================

cmiller@cmiller-iMac [09:46:12] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/erb
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /erb
Document Length:        7590 bytes

Concurrency Level:      4
Time taken for tests:   11.270 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      7857000 bytes
HTML transferred:       7590000 bytes
Requests per second:    88.73 [#/sec] (mean)
Time per request:       45.081 [ms] (mean)
Time per request:       11.270 [ms] (mean, across all concurrent requests)
Transfer rate:          680.81 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    15   45   2.3     45      55
Waiting:       15   44   2.3     44      55
Total:         15   45   2.3     45      55

Percentage of the requests served within a certain time (ms)
  50%     45
  66%     46
  75%     46
  80%     46
  90%     47
  95%     49
  98%     50
  99%     52
 100%     55 (longest request)
cmiller@cmiller-iMac [09:46:24] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/erb
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /erb
Document Length:        7590 bytes

Concurrency Level:      4
Time taken for tests:   11.192 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      7857000 bytes
HTML transferred:       7590000 bytes
Requests per second:    89.35 [#/sec] (mean)
Time per request:       44.766 [ms] (mean)
Time per request:       11.192 [ms] (mean, across all concurrent requests)
Transfer rate:          685.59 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    12   45   2.6     44      60
Waiting:       12   44   2.6     44      59
Total:         12   45   2.6     45      60

Percentage of the requests served within a certain time (ms)
  50%     45
  66%     45
  75%     46
  80%     46
  90%     47
  95%     49
  98%     52
  99%     53
 100%     60 (longest request)
cmiller@cmiller-iMac [09:46:37] [~] 
-> % ab -n 1000 -c 4 http://localhost:9292/erb
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)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9292

Document Path:          /erb
Document Length:        7590 bytes

Concurrency Level:      4
Time taken for tests:   11.012 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      7857000 bytes
HTML transferred:       7590000 bytes
Requests per second:    90.81 [#/sec] (mean)
Time per request:       44.050 [ms] (mean)
Time per request:       11.012 [ms] (mean, across all concurrent requests)
Transfer rate:          696.74 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    15   44   2.2     44      58
Waiting:       14   43   2.2     43      58
Total:         15   44   2.2     44      58

Percentage of the requests served within a certain time (ms)
  50%     44
  66%     45
  75%     45
  80%     45
  90%     46
  95%     47
  98%     49
  99%     50
 100%     58 (longest request)

Section of Introductions

This was all done on a rather nice iMac:

  • Intel Core i7 Sandy-Bridge 4-core chip
  • 12 GB of RAM
  • 1TB Spinning-disk hard drive
  • java version 1.6.0_37, build 1.6.0_37-b06-434-11M3909 "HotSpot" 64-bit VM "mixed mode" (whatever that's supposed to mean)
  • The excellent pre-chewed testing app at https://github.com/klaustopher/hamlerbslim was used for great success

I ran the tests several times using Apache Benchmark. I spammed it a few times at first to warm up the VM - once the VM was warmed up, then I started dumping output into text files.

I was specifically interested in the performance of HAML vs SLIM vs ERB in the JRuby environment. I had been seeing some sluggishness on my TorqueBox application, and wondered what the cause was. I use HAML, but I kind of like Slim, too. So I was curious. Adding in ERB as a control just makes sense. I had also heard rumor of the HAML interpreter doing not-so-nice things to the JVM. Thankfully, that doesn't seem to be the case.

I ran each battery of tests twice: once on WEBRick server, and another time on Puma (for multi-threaded stuff - more representative of the JBoss AS environment I deploy to). But then I ran the tests on Puma again because they weren't running faster. Each individual request was running in approximately the same time - which is to be expected - but the concurrency wasn't right. With four workers the whole benchmark should run four times faster.

So I went into the application and added config.threadsafe! to config/environments/development.rb - which solved the problem! The tests ran again with high concurrency.

Why would I care about the concurrency? Well, Smotchkkiss, I'll tell you. With four times the amount of action taking place, it's worth while to observe the performance again because of how the garbage collector will behave. While processing one request after the other, that chip isn't running anywhere near saturation. So I upped the ante and increased the amount of work it was doing to try and choke it.

Also, I'll note that I also ran the tests against Puma with 32 threads, and a concurrency level of 32. This was a total failure! The context switching between threads brought the application from > 60ms response times to around 400ms response times. So, the moral of that story: over-threading your servers will make things worse, not better. You should have around as many threads as you have logical CPUs (and no, Hyper-Threading doesn't count - at least not in my testing! Running the tests at 16 threads was a failure, at 8 threads (4 cores * hyper-threading, right?) was similarly slow, but then I tried 4 threads and hit that magic sweet-spot).

Section of Results

The most interesting fields are the Time per request and Total Standard Deviation. I've arbitrarily selected the "best" test from each set. Because ASCII is awesome:

Puma on 4 threads (8 max) with Rails in threadsafe mode:

           ERB        HAML       Slim
t/rq   | 12.005ms | 14.248ms | 12.805ms |
StdDev |  2.4ms   |  2.6ms   |  2.4ms   |

Puma on 4 threads (8 max) without Rails in threadsafe mode:

           ERB        HAML       Slim
t/rq   | 42.050ms | 50.643ms | 42.796ms |
StdDev |  2.2ms   |  2.4ms   |  2.3ms   |

WEBRick on just one thread without Rails in threadsafe mode:

           ERB        HAML       Slim
t/rq   | 12.903ms | 15.114ms | 12.881ms |
StdDev |  1.2ms   |  1.2ms   |  1.1ms   |

Additionally, remember the document size for each of the three templating variants. Also, this was run in development mode without any post-processing minification!

         ERB     HAML    Slim 
bytes | 7,590 | 10,095 | 6,086 |

Interestingly enough, when run against a production environment, the sizes are not all that much different for ERB, but HAML and Slim show significant changes in their payload!

         ERB     HAML   Slim
bytes | 6,128 | 4,927 | 4,625 |

Which, of course, prompted me to run the tests again! Now, please understand that I'm a very lazy person, so I did not run the tests with WEBRick or non-concurrent Puma again. Those aren't representative of a production environment, therefore they're not really relevant.

So, what's the new numbers?

Puma on 4 threads (8 max) with Rails in thredsafe mode:

         ERB        HAML      Slim
t/rq   | 6.892ms | 7.562ms | 5.239ms |
StdDev | 1.3ms   | 1.5ms   | 1.7ms   |

So the overall is kind of moot point, don't you think? In production mode, you'll save bandwidth by using either HAML or Slim (slightly more with Slim, but honestly, if you're that worried, run a minifier filter first, using some man-in-the-middle reverse proxy magic). You can get slighly faster times with Slim, and HAML is the slowest of the bunch. But their timings are so freaking close that it doesn't really make all the much difference.

I'd also note that this is just testing the speed of their ability to render. In the real world, fragment caching and database queries will be your main concerns. However, this proves that, when it comes to JRuby 1.7.0 and Rails, the templating language you pick isn't that big a performance consideration.

I hope you learned something - I know I did! Cheers!

-- NSError