Thanks, Mark. Here are some additional details.
I am using Apache JMeter to inject load. I am using a simple hello-world JSP. The test JMX simulates 100 concurrent user threads with a ramp-up of 5 secs and uses an HTTP Cookie Manager, that reuses cookies for each user thread. I have disabled access log in tomcat. All the other server.xml settings are the default. The BIO with Executor configuration we are using is: <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="150" minSpareThreads="4"/> <Connector port="8080" protocol="org.apache.coyote.http11.Http11Protocol" connectionTimeout="20000" redirectPort="8443" /> It's the same for NIO. Just the protocol changes. The client(jMeter) and server (Tomcat) are on 2 separate physical machines with the same configuration: RHEL 7.1 x64 16 core CPU; 32 GB RAM; 1Gbps NIC ------------------------------------------------------------- JSP test page -------------------------------------------- <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Hello World - JSP tomcat test</title> </head> <body> <%= "Hello World! - JSP on Tomcat 8.15" %> </body> </html> ------------------------------------------------------------- JSP test page ------------------------------------------------------------- Test result: helloWorld.JSP BIO NIO BIO w/ Exec NIO w/ Exec Throughput ART Throughput ART Throughput ART Throughput ART Tomcat 7.077 38600 2 42664 2 57104 1 43660 2 Tomcat 8.0.44 38585 2 44752 2 63000 1 44341 2 Tomcat 8.0.32 41211 Tomcat 8.5.14 N/A 45600 1.67 N/A 46000 1.67 Regards, Piyush. -----Original Message----- From: Mark Thomas [mailto:ma...@apache.org] Sent: Tuesday, June 06, 2017 12:50 PM To: Tomcat Users List <users@tomcat.apache.org> Subject: Re: Tomcat 8/NIO performance discrepancies On 06/06/17 07:30, Piyush Kumar Nayak wrote: > We have been testing different connectors of tomcat for performance. > We have tested the following server versions: > > - Tomcat 7.077 > > - Tomcat 8.0.44 > > - Tomcat 8.0.32 > > - Tomcat 8.5.14 > > with the following HTTP connectors: > > - BIO > > - BIO with Executor > > - NIO > > - NIO with Executor > > Our observation is that NIO is up to 15% faster than BIO. But BIO with > Executor is up to 65% faster than BIO. Using a shared executor thread pool > with NIO does not improve the performance. We have tried some variations of > connector attribute with Tomcat 8 (maxThreads, acceptorThreadCount), but > nothing brings us close to the performance that we can get with BIO with > Executor. > > We have upgraded to Tomcat 8.5, and can't seem to get it to perform as well > as Tomcat 7 using BIO with Executor, which is what we were using earlier. > > I would appreciate any help with the following: > > - Why is the executor not boosting the performance for NIO, as it is > for BIO? Without knowing the details of your tests - no idea. The numbers are a long way from what I'd expect. > > - BIO is not available as an option with Tomcat 8.5. Why has it been > removed? Is there any way to get it back ? Because it can't support the non-blocking requirements of the WebSocket API or the Servlet API and while you can fake non-blocking support, the result is liable to enter a deadlock. > I'd be happy to share any other details from my testing for any clarification. You'll need to explain your testing methodology - in detail - before anyone can provide any useful input. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org