HttpServer带阻塞性能比较

# Netty

[[email protected]] http-server-compare$ wrk -t8 -c1000 -d60s http://127.0.0.1:8080/
Running 1m test @ http://127.0.0.1:8080/
  8 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.20s     1.61ms   1.20s    62.50%
    Req/Sec     2.44      3.38    20.00     91.94%
  472 requests in 1.00m, 47.02KB read
  Socket errors: connect 755, read 81, write 29, timeout 464
Requests/sec:      7.86
Transfer/sec:     801.79B

# Jooby

[[email protected]] http-server-performance$ wrk -t8 -c1000 -d60s http://127.0.0.1:8080/
Running 1m test @ http://127.0.0.1:8080/
  8 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.02s     3.13ms   1.02s    68.75%
    Req/Sec    12.27     24.98   190.00     95.93%
  1888 requests in 1.00m, 210.19KB read
  Socket errors: connect 755, read 35, write 0, timeout 1856
Requests/sec:     31.46
Transfer/sec:      3.50KB

# Jdk

[[email protected]] http-server-performance$ wrk -t8 -c1000 -d60s http://127.0.0.1:8080/
Running 1m test @ http://127.0.0.1:8080/
  8 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     5.24ms    9.52ms 273.62ms   99.27%
    Req/Sec     0.98k     1.61k    6.55k    82.65%
  32882 requests in 1.00m, 3.79MB read
  Socket errors: connect 755, read 33747, write 189, timeout 0
  Non-2xx or 3xx responses: 32882
Requests/sec:    547.44
Transfer/sec:     64.69KB

# Jersey-jdk

[[email protected]] http-server-performance$ wrk -t8 -c1000 -d60s http://127.0.0.1:8080/
Running 1m test @ http://127.0.0.1:8080/
  8 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     5.47ms    3.14ms  62.59ms   89.71%
    Req/Sec     0.94k     1.17k    5.15k    81.63%
  33102 requests in 1.00m, 3.82MB read
  Socket errors: connect 755, read 33729, write 81, timeout 0
  Non-2xx or 3xx responses: 33102
Requests/sec:    550.74
Transfer/sec:     65.08K

# Jersey-netty

[[email protected]] http-server-performance$ wrk -t8 -c1000 -d60s http://127.0.0.1:8080/
Running 1m test @ http://127.0.0.1:8080/
  8 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.01s    49.59ms   1.48s    97.78%
    Req/Sec   114.74    158.71   828.00     82.89%
  14455 requests in 0.94m, 1.39MB read
  Socket errors: connect 755, read 160, write 23, timeout 245
Requests/sec:    255.29
Transfer/sec:     25.18KB

# RESTeasy-netty

[[email protected]] http-server-performance$ wrk -t8 -c1000 -d60s http://127.0.0.1:8080/
Running 1m test @ http://127.0.0.1:8080/
  8 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.29s     2.36ms   1.29s    62.50%
    Req/Sec     5.39      9.30    66.00     91.87%
  944 requests in 1.00m, 121.69KB read
  Socket errors: connect 755, read 228, write 64, timeout 928
Requests/sec:     15.71
Transfer/sec:      2.03KB

# SpringBoot

[[email protected]] http-server-performance$ wrk -t8 -c1000 -d60s http://127.0.0.1:8080/
Running 1m test @ http://127.0.0.1:8080/
  8 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.22s   270.02ms   1.98s    78.50%
    Req/Sec    71.83     89.66   430.00     84.32%
  11720 requests in 1.00m, 1.41MB read
  Socket errors: connect 755, read 205, write 35, timeout 0
Requests/sec:    195.10
Transfer/sec:     24.01KB

原文地址:https://www.cnblogs.com/mougg/p/11071025.html

时间: 2024-08-08 16:15:33

HttpServer带阻塞性能比较的相关文章

VS2010自带的性能分析工具分析.NET程序的性能

这篇博文给大家分享的是,如何使用VS自带的性能分析工具来分析我们编写的.NET程序,一边找出程序性能的瓶颈,改善代码的质量.在实际开发中,性能真的很重要,往往决定一个产品的生死~良好的用户体验的基础之一也是程序要有好的性能~ 下面以一个大家熟悉比较极端的例子,来说明编写代码时考虑性能的重要性.这里DebugLZQ用的是10.0版本的VS. 示例程序代码如下: using System;using System.Collections.Generic;using System.Linq;using

使用vs自带的性能诊断工具

visual studio是个强大的集成开发环境,内置了程序性能诊断工具.下面通过两段代码进行介绍. static void Main( string[] args) { Test1(); Test2(); Console.ReadKey(); } protected static void Test1() { Stopwatch sp = new Stopwatch(); sp.Start(); string str = "" ; for (int i = 0; i < 100

数据库相关文章转载(2) MySQL自带的性能压力测试工具mysqlslap详解

PS:今天一同事问我有木有比较靠谱的mysql压力测试工具可用.其实mysql自带就有一个叫mysqlslap的压力测试工具,还是模拟的不错的.下面举例说说.mysqlslap是从5.1.4版开始的一个MySQL官方提供的压力测试工具.通过模拟多个并发客户端访问MySQL来执行压力测试,同时详细的提供了“高负荷攻击MySQL”的数据性能报告.并且能很好的对比多个存储引擎在相同环境下的并发压力性能差别.通过mysqlslap –help可以获得可用的选项,这里列一些主要的参数,更详细的说明参考官方

MySQL自带的性能压力测试工具mysqlslap详解

使用语法如下:# mysqlslap [options] 常用参数 [options] 详细说明: --auto-generate-sql, -a 自动生成测试表和数据,表示用mysqlslap工具自己生成的SQL脚本来测试并发压力.--auto-generate-sql-load-type=type 测试语句的类型.代表要测试的环境是读操作还是写操作还是两者混合的.取值包括:read,key,write,update和mixed(默认).--auto-generate-sql-add-auto

带阻塞读模式的循环队列实现

部门准备开发一个项目,这个项目其中一个模块内部实现需要用到队列来实现各小模块内部通讯, 为了实现高效的数据传输模式,决定放弃轮询的方式,改用阻塞方式实现一个循环队列.后来项目 取消了,但该部分代码也写好测试成功了,不想浪费了,就贴出来提供给有需要的人.所有代码和 测试文档我会打包上传到我的个人空间. 函数说明如下: 所有函数成功返回0,失败返回错误码. 该说明文档只是简要说明该函数库,详细情况,请结合代码. 1.该函数库实现了一个先进先出队列的功能,有如下特点 <1>线程安全,该队列出队入队均

VS2012自带的 性能分析 工具使用实例

http://www.cnblogs.com/aarond/archive/2013/04/19/performance-enhancement.html 本篇通过一小段代码的console程序来进行性能的分析以及改进.直到后面的改进前.改进后性能比较结果. 先看console代码(源代码下载): static void Main(string[] args) { int i = 10000; while(i-->0) { Core c=new Core(); c.Process(DateTim

mongodb自带web性能监控

mongodb自带一个web界面监控.配置比较简单,只需要在启动时候加参数:--httpinterface 或者将httpinterface=true写到配置文件中 重启.在浏览器中输入:ip:mongodb端口号+1000 比如说数据库端口为20011 则监控页面为:ip:21011/export/mongodb/bin/mongod -f /export/mongodb/conf/mongod.conf --httpinterface 还可以加一个--rest参数.能够看到更多参数/expo

Mysql自带profiling性能分析工具使用分享

1. show variables like '%profiling%';(查看profiling信息) 2. set profiling=1;(开启profiling) 3. 执行SQL查询 例:select goods_name from ecs_goods where goods_id <5000; show  profiles; 4. show profile for query 4; show profile 的格式如下: SHOW PROFILE [type [, type] ...

Java自带的性能监测工具用法简介——jstack、jconsole、jinfo、jmap、jdb、jsta、jvisualvm

JDK内置工具使用 一.javah命令(C Header and Stub File Generator) 二.jps命令(Java Virtual Machine Process Status Tool) 三.jstack命令(Java Stack Trace) 四.jstat命令(Java Virtual Machine Statistics Monitoring Tool) 五.jmap命令(Java Memory Map) 六.jinfo命令(Java Configuration Inf