I believe Java's NIO library will use epoll on Linux machines. What are all the advantages of using Epoll instead of NIO on Linux machines.
Asked
Active
Viewed 1.3k times
2 Answers
39
Netty's epoll transport uses epoll edge-triggered while java's nio library uses level-triggered. Beside this the epoll transport expose configuration options that are not present with java's nio like TCP_CORK, SO_REUSEPORT and more.

Norman Maurer
- 23,104
- 2
- 33
- 31
-
Any reference for "java's nio library uses level-triggered"? – Amir Fo Mar 28 '20 at 22:49
-
1Just look at how its is implemented in the JDK. Also otherwise it would not work with the `Selector` interface. – Norman Maurer Mar 30 '20 at 11:14
3
There are some information about this in netty's docs:
Netty provides the following platform specific JNI transports:
Linux (since 4.0.16) MacOS/BSD (since 4.1.11)
These JNI transports add features specific to a particular platform, generate less garbage, and generally improve performance when compared to the NIO based transport.

Tobske
- 518
- 3
- 12