Reputation: 3972
Strangely, i was unable to find in Google clear answer to NIO.2 async IO performance vs using NIO's multiplexed IO via java.nio.channels.Selector.
So, my question is: Does NIO.2 AsynchronousChannel have better performance than NIO Selector? Of course, i'm interested in server side of things under different load profiles - number of simultaneous connections/average connection lifetime/traffic.
The only information i was able to find is that Windows IOCP is slightly better than Windows select.
Upvotes: 4
Views: 3269
Reputation: 294
I don't think NIO.2 will have better performance than NIO, because NIO.2 still make use of select/poll system calls and thread pools to simulate asynchronous IO. One example is that Netty removed NIO.2 support in 4.0.0, because the author think that NIO.2 doesn't bring better performance than NIO in Linux platform.
Upvotes: 6