问题描述
我使用了此示例用于性能测试
i used this example for performance test
有人说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
但是当我尝试使用此示例时,它只有1000个并发请求,每秒只能给我107次请求
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表现不佳?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!