Why poor performance of Netty?(为什么 Netty 性能不佳?)
问题描述
我使用了这个 性能测试示例
有人说netty的性能好快.它可以处理 1,00,000+ 并发请求/秒(查看以下链接)
someone says that netty's performance is so fast. It can process 1,00,000+ concurrent request/sec (check the below links)
http://www.jboss.org/netty/performance/20090303-mheath.html
http://www.jboss.org/netty/performance/20090607-asalihefendic.html
但是当我尝试使用这个示例时,它只给我 107 个请求/秒和 1000 个并发请求
but when i try with this example it's give me only 107 req/sec with 1000 concurrent request
ab -n 10000 -c 1000 http://localhost:8080/
Server Software:
Server Hostname: localhost
Server Port: 8080
Document Path: /
Document Length: 230 bytes
Concurrency Level: 1000
Time taken for tests: 92.784 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 2900000 bytes
HTML transferred: 2300000 bytes
Requests per second: 107.78 [#/sec] (mean)
Time per request: 9278.431 [ms] (mean)
Time per request: 9.278 [ms] (mean, across all concurrent requests)
Transfer rate: 30.52 [Kbytes/sec] received
给我建议问题在哪里
有人可以分享任何网络示例或参考突出netty的性能基准.
Can someone one please share any web example or reference highlighting performance benchmark of netty.
推荐答案
您的请求为零,我将使用 Siege 进行基准测试并与其他类似设置进行比较.还有你用的是什么系统?可能您还需要增加 文件描述符 才能使其工作.您还需要在进行基准测试之前配置JVM.大致如下:
You have zero dropped requests and I would benchmark using Siege and compare with other similar setup. Also what kind of system are you using? Probably you also need to increase file descriptor for this to work. Also you need to configure JVM before doing benchmark. Something along these lines:
-server -Xms2048m -Xmx2048m -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods
这篇关于为什么 Netty 性能不佳?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为什么 Netty 性能不佳?


- 如何使用WebFilter实现授权头检查 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01