springboot不同servlet容器benchmark

##跑分 跑4-10次,取最优。

  • concurrency可以从1,4,16,64,128依次递增
  • 请求次数这里10w-20w左右,如果是用ab,则-n 100000,如果是wrk,则-d10s左右
  • 类型:plaintext,输出hello
  • 跑满cpu
  • 这里只跑servlet容器,配置为默认配置(比如tomcat的acceptCount默认100,maxThreads默认200)

##配置 mac air(2核物理cpu,4核逻辑cpu,8G内存,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

转载于:https://my.oschina.net/go4it/blog/829213

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
>