Just realized that the comparison matrix formatting was lost earlier, so 
sharing it again.
                                                                
---------------------------------------------------------------------------------------------------------------------------------------------
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
---------------------------------------------------------------------------------------------------------------------------------------------
Throughput: requests per sec.
ART: msecs

Also, forgot to add earlier, the jMeter client has keep-alive header enabled, 
and the server is left to use the default keepalive values.


-----Original Message-----
From: Piyush Kumar Nayak [mailto:pna...@adobe.com.INVALID] 
Sent: Tuesday, June 06, 2017 7:59 PM
To: Tomcat Users List <users@tomcat.apache.org>
Subject: RE: Tomcat 8/NIO performance discrepancies

Violeta,

The data you see in an average of 3 samples of 180 second duration each.

Missed out on mentioning it before, but the thoughput is in no. of requests per 
second, and ART is in milliseconds.



Thanks

Piyush.



-----Original Message-----
From: Violeta Georgieva [mailto:violet...@apache.org]
Sent: Tuesday, June 06, 2017 7:09 PM
To: Tomcat Users List <users@tomcat.apache.org>
Subject: Re: Tomcat 8/NIO performance discrepancies



Hi,



2017-06-06 11:10 GMT+03:00 Piyush Kumar Nayak 
<pna...@adobe.com.invalid<mailto:pna...@adobe.com.invalid>>:

>

> 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.



Do you specify "Loop Count" for the number of iterations or you specify time 
duration?



Thanks,

Violeta



>

> 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" "

https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2FTR%2Fhtml4%2Floose.dtd&data=02%7C01%7C%7Ce541b882239d42e880f508d4ace1739f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636323531683671518&sdata=AwpErTK9ClLCwDZ23QnOqj195rlITTyAeG4JX0BFv0o%3D&reserved=0";>

>

> <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<mailto: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<mailto:users-unsubscr...@tomcat.apache.org>

>

> For additional commands, e-mail: 
> users-h...@tomcat.apache.org<mailto:users-h...@tomcat.apache.org>

>

>

Reply via email to