为什么Netty表现不佳?
我用这个例子进行性能测试
有人说netty的表现如此之快。 它可以处理1,00,000+并发请求/秒(请查看以下链接)
http://www.jboss.org/netty/performance/20090303-mheath.html
http://www.jboss.org/netty/performance/20090607-asalihefendic.html
但是当我尝试使用这个例子时,它只给我107个req / sec,并且有1000个并发请求
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的性能基准。
您没有丢弃请求,我将使用Siege进行基准测试并与其他类似设置进行比较。 你还在使用什么样的系统? 可能你还需要增加文件描述符才能工作。 您还需要在进行基准测试之前配置JVM 。 这些方面的东西:
-server -Xms2048m -Xmx2048m -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods