Netty性能调优

1. 减少内存allocation和deallocation。通过静态实例和内存缓存,减少IO的次数。

2. 使用gather write和scatter read

3. 使用jDK7,因为他的byteBuffer的分配和回收更快了。

4.线程模型很重要,它可以减少上下文的切换。

5. PIPELINING IS AWESOME

  • Allow to send / receive more then one message before response
  • This minimize send / receive operations 
  • Popular protocols which support Pipelining: HTTP, SMTP, IMAP

http://normanmaurer.me/presentations/

Netty In Action

http://normanmaurer.me/presentations/2013-wjax-netty/#/1

6. 客户端压力测试

ab的全称是ApacheBench,是 Apache 附带的一个小工具,专门用于 HTTP Server 的benchmark testing,可以同时模拟多个并发请求

http://www.blogjava.net/paulwong/archive/2015/01/08/422138.html

原文地址:https://www.cnblogs.com/zlfoak/p/4367616.html