十六、Vert.x、Actix-web、Warp、Axum 性能对比

        本篇整理自国外大佬的一个视频,整理成文,方便随时查看。测试机,16核,32G内存。

        大佬进行了两种测试,下面分开整理。

1、ab -n 1001 -c 1000 http://localhost:port/ && reset && ab -n 100000 -c 1000 http://localhost:port/

科目Vert.xActix-webWarpAxum
CPU1x99% +15x14%
内存780.6 MB124.9 MB
总耗时30.791s7.816s6.774s7.032s
并发数1000100010001000
处理请求100000100000100000100000
失败数0000
总传数据9.1G9.94G9.48G9.48G
每秒请求3,247.6912,795.0314,761.4214,220.24
Time per request307.911 [ms] (mean)78.155 [ms] (mean)67.744 [ms] (mean)70.322 [ms] (mean)
Time per request0.308 [ms] (mean, across all concurrent requests)0.078 [ms] (mean, across all concurrent requests)0.068 [ms] (mean, across all concurrent requests)0.070 [ms] (mean, across all concurrent requests)
Transfer rate310,081.51 [Kbytes/sec] received1,334,381.45 [Kbytes/sec] received1,467,377.19 [Kbytes/sec] received1,413,580.35 [Kbytes/sec] received
特定时间内(毫秒)
服务的请求百分比
50% 305
66% 307
75% 309
80% 310
90% 314
95% 330
98% 350
99% 383
100% 406
50% 75
66% 77
75% 78
80% 79
90% 82
95% 84
98% 94
99% 480
100% 1223
50% 67
66% 70
75% 71
80% 72
90% 74
95% 75
98% 77
99% 77
100% 1095
50% 69
66% 71
75% 72
80% 73
90% 76
95% 78
98% 81
99% 82
100% 1100

2、wrk -t 6 c 1000 -d 60s http://localhost:port/users

  • Vert.x

    内存:780.3 MB,CPU:1x99% + 15x14% 。

Running 1m test @ http://localhost:8888/
  6 threads and 1000 connections
  Thread Stats   Avg      Stdev    Max    +/- Stdev
    Latency   286.81ms   14.16ms 518.22ms   96.88%
    Req/Sec   582.98    202.88     1.20k    63.65%
  207674 requests in 1.00m, 18.91GB read
Requests/sec:   3455.97
Transfer/sec:    322.23MB
  • actix-web

    内存:124.9 MB,CPU:6x45% + 5x64% + 3x78% + 2x95% 。

Running 1m test @ http://localhost:8083/users
  6 threads and 1000 connections
  Thread Stats   Avg    Stdev       Max   +/- Stdev
    Latency    55.18ms    8.09ms 131.79ms   69.98%
    Req/Sec     2.97k   172.47     3.45k    70.25%
  1065123 requests in 1.00m, 105.93GB read
Requests/sec: 17728.17
Transfer/sec:     1.76GB
  • warp

    内存:27.5 MB,CPU:5x30% + 1x40% + 1x53% + 1x63% + 1x78% + 3x70% 2x98% + 2x100%。

Running 1m test @ http://localhost:8082/users
  6 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    53.43ms   38.45ms 348.90ms   73.38%
    Req/Sec     3.37k   215.00     4.06k    69.94%
  1207865 requests in 1.00m, 114.51GB read
Requests/sec:  20102.66
Transfer/sec:      1.91GB
  • axum

    内存:28.2 MB,CPU:2x35% + 2x40% + 4x54% + 3x65% + 2x74% + 2x82% + 1x97% 。

Running 1m test @ http://localhost:3000/users
  6 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    61.29ms   44.20ms 466.64ms   72.21%
    Req/Sec     2.93k   184.84     4.00k    71.56%
  1048424 requests in 1.00m, 99.39GB read
Requests/sec:  17449.80
Transfer/sec:      1.65GB
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值