-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
6u45, 7u80, 8u212, 9.0.4, 11.0.3-oracle, 13.0.1
-
linux
This originally emerged via this issue on Apache Tomcat.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916
The issue has been reduced to this simple test case:
https://github.com/markt-asf/tomcat-bugs/blob/master/src/java/org/apache/tomcat/Bug63916NioPoller.java
The test case uses 1 thread as a Poller (with a Selector) and dispatches writes to a separate thread. The test case tries to write 10MB to a single connection as quickly as possible.
While the detail of the results vary - largely due to differences in test hardware - the general pattern is that on most platforms smaller values for SO_SNDBUF result in slightly worse performance of the test case but performance remains acceptable for all buffer sizes.
On Linux, things are very different. At some point, typically between 4k and 5k but it does vary, performance gets significantly - 2 orders of magnitude - worse.
We have tested various operating systems, various Java versions from various vendors and various SelectorProvider implementations. This appears to be Linux specific, affects the current latest release and goes back to at least Java 6.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916
The issue has been reduced to this simple test case:
https://github.com/markt-asf/tomcat-bugs/blob/master/src/java/org/apache/tomcat/Bug63916NioPoller.java
The test case uses 1 thread as a Poller (with a Selector) and dispatches writes to a separate thread. The test case tries to write 10MB to a single connection as quickly as possible.
While the detail of the results vary - largely due to differences in test hardware - the general pattern is that on most platforms smaller values for SO_SNDBUF result in slightly worse performance of the test case but performance remains acceptable for all buffer sizes.
On Linux, things are very different. At some point, typically between 4k and 5k but it does vary, performance gets significantly - 2 orders of magnitude - worse.
We have tested various operating systems, various Java versions from various vendors and various SelectorProvider implementations. This appears to be Linux specific, affects the current latest release and goes back to at least Java 6.