Skip to content

Instantly share code, notes, and snippets.

@mjc
Last active August 29, 2015 14:04
Show Gist options
  • Save mjc/aaf28646efbf95b4d35f to your computer and use it in GitHub Desktop.
Save mjc/aaf28646efbf95b4d35f to your computer and use it in GitHub Desktop.
All benchmarks run on a Late 2013 15" Retina Macbook Pro (2.3GHz Core i7, 16GB, 512GB SSD)

Rails

Blank rails app with puma, serving a high_voltage static homepage (https://github.com/mjc/blankrails), warmed with 5 minutes of traffic.

MRI 2.1.2: 4 puma workers

Running 15s test @ http://localhost:3000
  1 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     6.44ms    2.90ms  14.70ms   62.31%
    Req/Sec     1.58k    90.72     1.86k    74.01%
  23179 requests in 15.00s, 25.75MB read
Requests/sec:   1545.15
Transfer/sec:      1.72MB

1.7.13: -Xcompile.invokedynamic=false -Xcompile.mode=OFF

Running 15s test @ http://localhost:3000
  1 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     5.70ms    1.61ms  20.47ms   95.71%
    Req/Sec     1.82k   233.69     2.15k    85.61%
  26475 requests in 15.00s, 29.41MB read
Requests/sec:   1764.81
Transfer/sec:      1.96MB

1.7.13: -Xcompile.invokedynamic=false -Xcompile.mode=JIT

Running 15s test @ http://localhost:3000
  1 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     5.21ms    1.59ms  16.50ms   95.85%
    Req/Sec     2.04k   297.99     2.50k    90.71%
  29237 requests in 15.00s, 32.48MB read
Requests/sec:   1949.14
Transfer/sec:      2.17MB

1.7.13 torqbox 0.1.7: -Xcompile.invokedynamic=false -Xcompile.mode=OFF

Running 15s test @ http://localhost:3000
  1 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     5.24ms    0.90ms  11.29ms   84.08%
    Req/Sec     2.01k   206.52     2.36k    79.93%
  28796 requests in 15.00s, 33.64MB read
Requests/sec:   1919.65
Transfer/sec:      2.24MB

1.7.13 torqbox 0.1.7: -Xcompile.invokedynamic=false -Xcompile.mode=JIT

Running 15s test @ http://localhost:3000
  1 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     5.25ms    1.06ms  12.90ms   84.00%
    Req/Sec     2.00k   235.45     2.45k    74.13%
  28780 requests in 15.00s, 33.62MB read
Requests/sec:   1918.69
Transfer/sec:      2.24MB

9k 06d1326: -Xcompile.invokedynamic=false -Xcompile.mode=OFF

Running 15s test @ http://localhost:3000
  1 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     8.29ms    1.33ms  30.06ms   84.08%
    Req/Sec     1.24k   110.83     1.45k    76.43%
  18073 requests in 15.00s, 20.08MB read
Requests/sec:   1204.86
Transfer/sec:      1.34MB

9k 06d1326: -Xcompile.invokedynamic=false -Xcompile.mode=JIT

Running 15s test @ http://localhost:3000
  1 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     7.89ms    1.10ms  21.58ms   84.69%
    Req/Sec     1.29k    97.62     1.50k    74.80%
  18847 requests in 15.00s, 20.94MB read
Requests/sec:   1256.42
Transfer/sec:      1.40MB

9k 06d1326 torqbox 0.1.7: -Xcompile.invokedynamic=false -Xcompile.mode=OFF

Running 15s test @ http://localhost:3000
  1 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     7.84ms    1.73ms  36.17ms   92.46%
    Req/Sec     1.33k   128.83     1.59k    76.93%
  19357 requests in 15.00s, 22.61MB read
Requests/sec:   1290.48
Transfer/sec:      1.51MB

9k 06d1326 torqbox 0.1.7: -Xcompile.invokedynamic=false -Xcompile.mode=JIT

Running 15s test @ http://localhost:3000
  1 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     7.91ms    1.46ms  20.18ms   83.28%
    Req/Sec     1.31k   144.46     1.55k    76.02%
  19132 requests in 15.00s, 22.35MB read
Requests/sec:   1275.48
Transfer/sec:      1.49MB

JSON

Varying methods of encoding and decoding JSON (source)

MRI 2.1.2

Calculating -------------------------------------
        Marshal.dump      3708 i/100ms
           JSON.dump      6353 i/100ms
    MultiJSON (JSON)      8827 i/100ms
                  Oj     34758 i/100ms
           Oj compat     28611 i/100ms
      MultiJSON (Oj)      9102 i/100ms
                Yajl     11776 i/100ms
    MultiJSON (Yajl)      9102 i/100ms
-------------------------------------------------
        Marshal.dump    37754.0 (±5.7%) i/s -     189108 in   5.027165s
           JSON.dump    66753.4 (±3.5%) i/s -     336709 in   5.050683s
    MultiJSON (JSON)    96484.1 (±6.1%) i/s -     485485 in   5.053139s
                  Oj   433018.0 (±11.1%) i/s -    2154996 in   5.039276s
           Oj compat   323045.0 (±6.1%) i/s -    1630827 in   5.066927s
      MultiJSON (Oj)    97169.1 (±4.0%) i/s -     491508 in   5.066476s
                Yajl   126062.8 (±6.3%) i/s -     635904 in   5.067090s
    MultiJSON (Yajl)    99258.1 (±3.3%) i/s -     500610 in   5.049149s

1.7.13: +indy +jit

Warming up the JIT
JIT is warm.
Calculating -------------------------------------
        Marshal.dump      7527 i/100ms
           JSON.dump     11606 i/100ms
    MultiJSON (JSON)      8796 i/100ms
           JrJackson     10670 i/100ms
MultiJSON (JrJackson)
                          8665 i/100ms
     Gson.new.encode      9064 i/100ms
         gson.encode      9573 i/100ms
    MultiJSON (Gson)      8637 i/100ms
-------------------------------------------------
        Marshal.dump    83433.7 (±3.4%) i/s -     421512 in   5.057999s
           JSON.dump   128006.3 (±4.0%) i/s -     638330 in   4.995000s
    MultiJSON (JSON)    96071.4 (±2.9%) i/s -     483780 in   5.040000s
           JrJackson   111926.0 (±4.6%) i/s -     565510 in   5.064000s
MultiJSON (JrJackson)
                        96271.7 (±2.7%) i/s -     485240 in   5.044000s
     Gson.new.encode    99084.2 (±7.9%) i/s -     498520 in   5.067000s
         gson.encode   100974.7 (±3.3%) i/s -     507369 in   5.030000s
    MultiJSON (Gson)    95405.4 (±3.7%) i/s -     483672 in   5.077000s

1.7.13: -indy +JIT

Warming up the JIT
JIT is warm.
Calculating -------------------------------------
        Marshal.dump      7753 i/100ms
           JSON.dump     11127 i/100ms
    MultiJSON (JSON)      9081 i/100ms
           JrJackson     11077 i/100ms
MultiJSON (JrJackson)
                          8640 i/100ms
     Gson.new.encode     10132 i/100ms
         gson.encode     10299 i/100ms
    MultiJSON (Gson)      8886 i/100ms
-------------------------------------------------
        Marshal.dump    81010.3 (±3.0%) i/s -     410909 in   5.077000s
           JSON.dump   117032.0 (±3.4%) i/s -     589731 in   5.045000s
    MultiJSON (JSON)    94636.8 (±2.5%) i/s -     481293 in   5.089000s
           JrJackson   114647.2 (±4.1%) i/s -     576004 in   5.033000s
MultiJSON (JrJackson)
                        95725.9 (±2.2%) i/s -     483840 in   5.057000s
     Gson.new.encode   105672.3 (±2.9%) i/s -     536996 in   5.086000s
         gson.encode   102529.2 (±4.7%) i/s -     514950 in   5.034000s
    MultiJSON (Gson)    91534.8 (±3.1%) i/s -     462072 in   5.053000s

9k 06d1326: -indy -jit

Warming up the JIT
JIT is warm.
Calculating -------------------------------------
        Marshal.dump      6806 i/100ms
           JSON.dump     12206 i/100ms
    MultiJSON (JSON)      7393 i/100ms
           JrJackson     13034 i/100ms
MultiJSON (JrJackson)
                          7578 i/100ms
     Gson.new.encode     12049 i/100ms
         gson.encode     12290 i/100ms
    MultiJSON (Gson)      7547 i/100ms
-------------------------------------------------
        Marshal.dump    73690.1 (±5.6%) i/s -     367524 in   5.005000s
           JSON.dump   142761.4 (±4.1%) i/s -     720154 in   5.053000s
    MultiJSON (JSON)    83041.1 (±4.0%) i/s -     421401 in   5.083000s
           JrJackson   157597.3 (±3.5%) i/s -     795074 in   5.051000s
MultiJSON (JrJackson)
                        82562.0 (±3.9%) i/s -     416790 in   5.056000s
     Gson.new.encode   140587.3 (±3.6%) i/s -     710891 in   5.062999s
         gson.encode   145434.3 (±5.2%) i/s -     737400 in   5.085000s
    MultiJSON (Gson)    79831.9 (±5.1%) i/s -     399991 in   5.024000s

9k 06d1326: -indy +jit

Warming up the JIT
JIT is warm.
Calculating -------------------------------------
        Marshal.dump      6743 i/100ms
           JSON.dump     12994 i/100ms
    MultiJSON (JSON)      8076 i/100ms
           JrJackson     13812 i/100ms
MultiJSON (JrJackson)
                          8053 i/100ms
     Gson.new.encode     12596 i/100ms
         gson.encode     12765 i/100ms
    MultiJSON (Gson)      8144 i/100ms
-------------------------------------------------
        Marshal.dump    75022.8 (±1.9%) i/s -     377608 in   5.035000s
           JSON.dump   155039.8 (±2.1%) i/s -     779640 in   5.031000s
    MultiJSON (JSON)    92016.5 (±2.1%) i/s -     460332 in   5.005000s
           JrJackson   169536.3 (±1.9%) i/s -     856344 in   5.053000s
MultiJSON (JrJackson)
                        91771.3 (±2.1%) i/s -     459021 in   5.004000s
     Gson.new.encode   149427.3 (±2.1%) i/s -     755760 in   5.060000s
         gson.encode   153010.9 (±1.7%) i/s -     765900 in   5.007000s
    MultiJSON (Gson)    88834.4 (±3.7%) i/s -     447920 in   5.049000s

9k 06d1326: +indy -jit

Warming up the JIT
JIT is warm.
Calculating -------------------------------------
        Marshal.dump      6661 i/100ms
           JSON.dump     12338 i/100ms
    MultiJSON (JSON)      7590 i/100ms
           JrJackson     13339 i/100ms
MultiJSON (JrJackson)
                          7499 i/100ms
     Gson.new.encode     12095 i/100ms
         gson.encode     12554 i/100ms
    MultiJSON (Gson)      7656 i/100ms
-------------------------------------------------
        Marshal.dump    75967.8 (±1.7%) i/s -     386338 in   5.087000s
           JSON.dump   146980.0 (±3.2%) i/s -     740280 in   5.042000s
    MultiJSON (JSON)    86698.4 (±2.2%) i/s -     440220 in   5.080000s
           JrJackson   165081.0 (±2.5%) i/s -     827018 in   5.013000s
MultiJSON (JrJackson)
                        86257.7 (±1.8%) i/s -     434942 in   5.044000s
     Gson.new.encode   145072.1 (±2.3%) i/s -     725700 in   5.005000s
         gson.encode   150760.9 (±2.3%) i/s -     753240 in   4.999000s
    MultiJSON (Gson)    86614.2 (±2.3%) i/s -     436392 in   5.041000s

9k 06d1326: +indy +jit

Warming up the JIT
JIT is warm.
Calculating -------------------------------------
        Marshal.dump      6636 i/100ms
           JSON.dump     15599 i/100ms
    MultiJSON (JSON)      9622 i/100ms
           JrJackson     14025 i/100ms
MultiJSON (JrJackson)
                          9588 i/100ms
     Gson.new.encode     12148 i/100ms
         gson.encode     12423 i/100ms
    MultiJSON (Gson)      9795 i/100ms
-------------------------------------------------
        Marshal.dump    73177.3 (±1.8%) i/s -     371616 in   5.080000s
           JSON.dump   201723.7 (±2.7%) i/s -    1013935 in   5.030000s
    MultiJSON (JSON)   114309.7 (±2.9%) i/s -     577320 in   5.055000s
           JrJackson   179738.7 (±2.0%) i/s -     911625 in   5.074000s
MultiJSON (JrJackson)
                       115801.5 (±2.2%) i/s -     584868 in   5.053000s
     Gson.new.encode   147246.0 (±2.6%) i/s -     741028 in   5.036000s
         gson.encode   152459.8 (±2.0%) i/s -     770226 in   5.054000s
    MultiJSON (Gson)   115746.1 (±2.2%) i/s -     587700 in   5.080000s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment