Since 4.0.16, Netty provides the native socket transport for Linux using JNI. This transport has higher performance and produces less garbage, so you might want to give it a try.
Using the native transport
Because the native transport is compatible with the NIO transport, you can just do the following search-and-replace:
-
NioEventLoopGroup
→EpollEventLoopGroup
-
NioEventLoop
→EpollEventLoop
-
NioServerSocketChannel
→EpollServerSocketChannel
-
NioSocketChannel
→EpollSocketChannel
Read full article from Netty.docs: Native transports
No comments:
Post a Comment