Springboot different servlet containers benchmark

  springboot

Run points

Run 4-10 times, take the best.

  • Concurrency can be incremented from 1, 4, 16, 64, 128

  • The number of requests here is about 10w-20w, if ab is used, then -n 100000, if wrk, then -d10s

  • Type: plaintext, output hello

  • Run full cpu

  • Only servlet containers are run here and configured as the default configuration (for example, tomcat’s acceptCount defaults to 100 and maxThreads defaults to 200)

Configuration

mac air(2 nuclear physical cpu,4-core logical cpu,8G memory, java8)

  • cpu

sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM) i7-5650U CPU @ 2.20GHz
sysctl -n hw.physicalcpu
2
sysctl -n hw.logicalcpu
4
  • jdk

java version "1.8.0_71"
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode)
  • springboot
    1.4.3.RELEASE

tomcat

wrk -t4 -c128 -d10s --latency http://localhost:8080/bench/hello
Running 10s test @ http://localhost:8080/bench/hello
  4 threads and 128 connections

  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     8.42ms    9.66ms 142.35ms   91.16%
    Req/Sec     3.66k     1.49k   11.13k    72.97%
  Latency Distribution
     50%    5.75ms
     75%   10.45ms
     90%   17.03ms
     99%   52.03ms
  144723 requests in 10.06s, 22.11MB read
  Socket errors: connect 0, read 5, write 0, timeout 0
Requests/sec:  14384.60
Transfer/sec:      2.20MB

wrk -t4 -c128 -d10s --latency http://localhost:8080/bench/hello
Running 10s test @ http://localhost:8080/bench/hello
  4 threads and 128 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     7.93ms    9.99ms 133.05ms   93.28%
    Req/Sec     3.84k     1.32k    9.39k    76.17%
  Latency Distribution
     50%    5.71ms
     75%    9.52ms
     90%   14.95ms
     99%   54.62ms
  152596 requests in 10.10s, 23.31MB read
Requests/sec:  15109.07
Transfer/sec:      2.31MB

undertow

wrk -t4 -c128 -d10s --latency http://localhost:8080/bench/hello
Running 10s test @ http://localhost:8080/bench/hello
  4 threads and 128 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     8.75ms   13.83ms 222.22ms   96.01%
    Req/Sec     4.70k   595.93     7.91k    76.50%
  Latency Distribution
     50%    6.33ms
     75%    7.38ms
     90%   10.56ms
     99%   81.18ms
  188209 requests in 10.07s, 33.39MB read
Requests/sec:  18696.15
Transfer/sec:      3.32MB

jetty

wrk -t4 -c128 -d10s --latency http://localhost:8080/bench/hello
Running 10s test @ http://localhost:8080/bench/hello
  4 threads and 128 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     6.77ms    6.83ms 235.64ms   91.77%
    Req/Sec     4.53k     1.09k   10.90k    76.59%
  Latency Distribution
     50%    6.22ms
     75%    8.08ms
     90%   12.61ms
     99%   28.70ms
  180732 requests in 10.09s, 27.92MB read
  Socket errors: connect 0, read 57, write 0, timeout 0
Requests/sec:  17918.38
Transfer/sec:      2.77MB

doc