[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #37 from Mark Thomas --- https://bugs.openjdk.java.net/browse/JDK-8234191 -- You are receiving this mail because: You are the assignee for the bug. - To

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #36 from Mark Thomas --- That is the right code. Testing locally on Linux: java -showversion org.apache.tomcat.Bug63916NioPoller openjdk version "1.8.0_222" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10) OpenJDK

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #35 from Christopher Schultz --- (In reply to Michael Osipov from comment #34) > Awesome, can you retry with Java 8? This is Oracle 1.8.0_181. Selector Provider: sun.nio.ch.KQueueSelectorProvider@16e15b65 16,10461 32,5245 64,2696

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #34 from Michael Osipov --- (In reply to Christopher Schultz from comment #33) > (In reply to Rainer Jung from comment #23) > > Plus: performance behavior plus provider string would also be interesting > > for MacOS. > > Some info

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #33 from Christopher Schultz --- (In reply to Rainer Jung from comment #23) > Plus: performance behavior plus provider string would also be interesting > for MacOS. Some info from MacOS: $ java -showversion

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #32 from Michael Osipov --- I am down now to: $ for file in output/build/logs/*TestNonBlockingAPI* ; do head -2 $file; done Testsuite: org.apache.catalina.nonblocking.TestNonBlockingAPI Tests run: 9, Failures: 0, Errors: 0,

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #31 from Mark Thomas --- Thanks. Missed that. Fixed now. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail:

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #30 from Michael Osipov --- (In reply to Michael Osipov from comment #29) > (In reply to Mark Thomas from comment #28) > > Fixed in: > > - master for 9.0.28 onwards > > - 8.5.x for 8.5.48 onwards > > I see now > > $ for file in

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #29 from Michael Osipov --- (In reply to Mark Thomas from comment #28) > Fixed in: > - master for 9.0.28 onwards > - 8.5.x for 8.5.48 onwards I see now $ for file in output/build/logs/*TestNonBlockingAPI* ; do head -2 $file; done

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 Mark Thomas changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #27 from Mark Thomas --- I have been mixing up socket.txBufSize and socket.appWriteBufSize. My testing shows that socket.appWriteBufSize has no measurable impact on performance of the stand-alone test. Performance of the

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #26 from Michael Osipov --- A local change to Tomcat master: > diff --git a/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java > b/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java > index

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #25 from Michael Osipov --- Here are new test results, is the terminal/consumer (telnet) too slow? For both: telnet localhost > /dev/null FreeBSD: All telnet output has been redirected to /dev/null. default: Writing 10MB

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #24 from Michael Osipov --- (In reply to Rainer Jung from comment #22) > According to the Javadoc, the Selector has various impls and is encapsulated > via a SelectorProvider. The chosen provider decides about which system api > is

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #23 from Rainer Jung --- Plus: performance behavior plus provider string would also be interesting for MacOS. -- You are receiving this mail because: You are the assignee for the bug.

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #22 from Rainer Jung --- According to the Javadoc, the Selector has various impls and is encapsulated via a SelectorProvider. The chosen provider decides about which system api is being used (poll, epoll, event ports, kqueue, ...).

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #21 from Michael Osipov --- New test results: RHEL: 8 KiB: Writing 10MB took [1601] milliseconds; nothing added default: Writing 10MB took [1176] milliseconds HP-UX: 8 KiB: Writing 10MB took [89460] milliseconds; add 68 ms for

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #20 from Remy Maucherat --- With NIO2, when I set a really low send buffer (I tried as low as 32 bytes) it does change what the read/write logs from TestNonBlockingAPI look like as expected, but the "performance" does not go down

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #19 from Mark Thomas --- Hmm. No change at all with a Executor. The cut-off for buffer size between good and bad performance is still exactly 4537 bytes. That doesn't match with what I thought was going on. -- You are receiving

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #18 from Mark Thomas --- Tomcat is calling write until 0 bytes are written before adding to the poller so that isn't what is going on here. (In reply to Remy Maucherat from comment #12) > By default on my Linux the socket send

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #17 from Michael Osipov --- (In reply to Mark Thomas from comment #14) > I think I have a fix. I've updated the test to keep writing until the > non-blocking write returns 0 bytes written and only then add the connection > to the

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #16 from Michael Osipov --- (In reply to Remy Maucherat from comment #15) > The performance numbers would still indicate FreeBSD has a specific poller > issue of some kind though, the difference is too large there. I will inquire

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #15 from Remy Maucherat --- The performance numbers would still indicate FreeBSD has a specific poller issue of some kind though, the difference is too large there. -- You are receiving this mail because: You are the assignee for

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #14 from Mark Thomas --- I think I have a fix. I've updated the test to keep writing until the non-blocking write returns 0 bytes written and only then add the connection to the Poller. Performance is back to normal for me even

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #13 from Michael Osipov --- (In reply to Mark Thomas from comment #11) > Simpler test case that reproduces the issue > > https://github.com/markt-asf/tomcat-bugs/blob/master/src/java/org/apache/ > tomcat/Bug63916NioPoller.java >

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #12 from Remy Maucherat --- By default on my Linux the socket send buffer size is 2304. For NIO to have the same "performance" and behavior running the test [as seen with the debug logs] as NIO2, the send buffer size needs to be

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #11 from Mark Thomas --- Simpler test case that reproduces the issue https://github.com/markt-asf/tomcat-bugs/blob/master/src/java/org/apache/tomcat/Bug63916NioPoller.java Run the test case and connect with telnet to localhost

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #10 from Mark Thomas --- No, the Linux performance is not what I expect. There is something wrong here. I'm going to build a simple test case to demonstrate it. FreeBSD has the same issue but the pause before select() returns is

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #9 from Michael Osipov --- (In reply to Mark Thomas from comment #8) > I see some timing differences on Linux, but not as extreme. > > For one test testNonBlockingWriteWithKeepAlive > > NIO: 55s > APR: 8s > > The NIO slowness

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #8 from Mark Thomas --- I see some timing differences on Linux, but not as extreme. For one test testNonBlockingWriteWithKeepAlive NIO: 55s APR: 8s The NIO slowness is caused by the non-blocking write. The test does a large

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #7 from Mark Thomas --- I'm starting to look at this. How are you installing Java on FreeBSD? From the ports? -- You are receiving this mail because: You are the assignee for the bug.

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #6 from Michael Osipov --- Created attachment 36880 --> https://bz.apache.org/bugzilla/attachment.cgi?id=36880=edit JStack dump 2 -- You are receiving this mail because: You are the assignee for the bug.

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #5 from Michael Osipov --- Created attachment 36879 --> https://bz.apache.org/bugzilla/attachment.cgi?id=36879=edit JStack dump -- You are receiving this mail because: You are the assignee for the bug.

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #2 from Michael Osipov --- Created attachment 36876 --> https://bz.apache.org/bugzilla/attachment.cgi?id=36876=edit Test with APR -- You are receiving this mail because: You are the assignee for the bug.

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #3 from Michael Osipov --- Created attachment 36877 --> https://bz.apache.org/bugzilla/attachment.cgi?id=36877=edit Test with NIO -- You are receiving this mail because: You are the assignee for the bug.

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 --- Comment #4 from Michael Osipov --- Created attachment 36878 --> https://bz.apache.org/bugzilla/attachment.cgi?id=36878=edit Test with NIO2 -- You are receiving this mail because: You are the assignee for the bug.

[Bug 63916] org.apache.catalina.nonblocking.TestNonBlockingAPI abysmally slow with NIO/NIO2 on FreeBSD

2019-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63916 Michael Osipov changed: What|Removed |Added CC||micha...@apache.org --- Comment #1