You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Deepak J <dj...@verisign.com> on 2007/09/23 14:13:03 UTC

ASyncWeb v/s Tomcat 5.5.20 Performance issues

Perhaps not the right forum to post these results. But just wanted your
opinion on the tests.

S/W versions:
Tomcat 5.5.20
ASyncWeb 0.8.2
JRE 1.5.0._06

Test Methodology:
A multi thread client constructs HTTP/POST messages (headers + content). The
size of each message is ~160KB. The client can be pointed either at Tomcat
or at ASyncWeb server. The number of client threads and iterations per
thread is configurable. Thus a config of thread=10 & iterations=1000 will
result in 10000 HTTP/POST.  Keep-Alive functionality is not being tested
hence after each HTTP connection there is a call to disconnect(). A static
counter is incremented after a 200 OK. After all client threads complete
execution a result is printed indicating total time taken for the test,
number of 200 OK received & total connections/sec
The server code, which resides in the Tomcat Servlet and ASyncWeb
stand-alone app is identical in functionality in both places. When a request
is received the Content-Length header is fetched. Data from the InputStream
is read in a while loop and writtern in byte chunks of size 1024 to a byte
array output stream. Once the stream has been read, the size of the byte
array is compared with the content-length and a log is printed if they don't
match. On successful completion a 200 OK is returned.

Test Results:
----------------------------------------------------------------------------------------------------------------
No            Threads     Iterations     Tomcat 5.5.20                           
ASyncWeb 0.8.2
-----------------------------------------------------------------------------------------------------------------
1              10             1000         Test duration = 138626 millis       
Test duration = 901996 millis
                                                Total Connections = 9995             
Total Connections = 10000
                                                Connections/Sec = 72	                  
Connections/Sec = 11


2              100            2             Test duration = 2878 millis           
Test duration = 20892 millis
                                                Total Connections = 200               
Total Connections = 200
                                                Connections/Sec = 69	                  
Connections/Sec = 9     

3              500           10            Test duration = 41796 millis         
OutOfMemory in Server 
                                                Total Connections = 5000
                                                Connections/Sec = 119	
-----------------------------------------------------------------------------------------------------------------------------

Now I am wondering if there are tweeks needed to get better number. Should
AsyncWeb not perform better that Tomcat's One-Thread-Per-Connection model?



-- 
View this message in context: http://www.nabble.com/ASyncWeb-v-s-Tomcat-5.5.20-Performance-issues-tf4504220s16868.html#a12845779
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: ASyncWeb v/s Tomcat 5.5.20 Performance issues

Posted by Mladen Turk <mt...@apache.org>.
Deepak J wrote:
> Perhaps not the right forum to post these results. But just wanted your
> opinion on the tests.
>

You should fix up your email client to not wrap lines or attach
the results as simple .txt

It's simply unreadable.

Regards,
Mladen

Re: ASyncWeb v/s Tomcat 5.5.20 Performance issues

Posted by Deepak J <dj...@verisign.com>.
My test may not be  right, I was trying to simulate a larger number of
concurrent HTTP conections. Could you review my test methodology and suggest
a more meaningful NIO test?


jgenender wrote:
> 
> A few considerations for you...
> 
> Be sure to tweak your TCP IP parameters or you will hit a wall very
> quickly with AsyncWeb.  You need to significantly up your socket queue
> lengths and significantly decrease your TCP time wait.  Otherwise you
> will fill your IP queue and your server will probably appear to hang for
> a while waiting for the TIME_WAIT and SYN_RECV to clear.  There are
> probably several changes you need to tweak your IP stack.  Google on
> tuning IP parameters for your OS and you should find lots of articles on
> how to.
> 
> Also be sure you have a large enough acceptCount size to be sure it will
> handle the load, or you will get rejected connections.  I would tweak
> the acceptCount to equal your maximum concurrent connections.
> 
> Also...something else to keep in mind...AsyncWeb is really going to
> shine in concurrent connections, not necessarily transactions per
> second.  This means it could handle a lot more load than a single
> threaded connector on Tomcat could.  Thus speed is not necessarily a
> good way to measure scalability.
> 
> Jeff
> 
> Deepak J wrote:
>> Perhaps not the right forum to post these results. But just wanted your
>> opinion on the tests.
>> 
>> S/W versions:
>> Tomcat 5.5.20
>> ASyncWeb 0.8.2
>> JRE 1.5.0._06
>> 
>> Test Methodology:
>> A multi thread client constructs HTTP/POST messages (headers + content).
>> The
>> size of each message is ~160KB. The client can be pointed either at
>> Tomcat
>> or at ASyncWeb server. The number of client threads and iterations per
>> thread is configurable. Thus a config of thread=10 & iterations=1000 will
>> result in 10000 HTTP/POST.  Keep-Alive functionality is not being tested
>> hence after each HTTP connection there is a call to disconnect(). A
>> static
>> counter is incremented after a 200 OK. After all client threads complete
>> execution a result is printed indicating total time taken for the test,
>> number of 200 OK received & total connections/sec
>> The server code, which resides in the Tomcat Servlet and ASyncWeb
>> stand-alone app is identical in functionality in both places. When a
>> request
>> is received the Content-Length header is fetched. Data from the
>> InputStream
>> is read in a while loop and writtern in byte chunks of size 1024 to a
>> byte
>> array output stream. Once the stream has been read, the size of the byte
>> array is compared with the content-length and a log is printed if they
>> don't
>> match. On successful completion a 200 OK is returned.
>> 
>> Test Results:
>> ----------------------------------------------------------------------------------------------------------------
>> No            Threads     Iterations     Tomcat 5.5.20                           
>> ASyncWeb 0.8.2
>> -----------------------------------------------------------------------------------------------------------------
>> 1              10             1000         Test duration = 138626 millis       
>> Test duration = 901996 millis
>>                                                 Total Connections = 9995             
>> Total Connections = 10000
>>                                                 Connections/Sec = 72	                  
>> Connections/Sec = 11
>> 
>> 
>> 2              100            2             Test duration = 2878 millis           
>> Test duration = 20892 millis
>>                                                 Total Connections = 200               
>> Total Connections = 200
>>                                                 Connections/Sec = 69	                  
>> Connections/Sec = 9     
>> 
>> 3              500           10            Test duration = 41796 millis         
>> OutOfMemory in Server 
>>                                                 Total Connections = 5000
>>                                                 Connections/Sec = 119	
>> -----------------------------------------------------------------------------------------------------------------------------
>> 
>> Now I am wondering if there are tweeks needed to get better number.
>> Should
>> AsyncWeb not perform better that Tomcat's One-Thread-Per-Connection
>> model?
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/ASyncWeb-v-s-Tomcat-5.5.20-Performance-issues-tf4504220s16868.html#a12895391
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: ASyncWeb v/s Tomcat 5.5.20 Performance issues

Posted by Jeff Genender <jg...@apache.org>.
A few considerations for you...

Be sure to tweak your TCP IP parameters or you will hit a wall very
quickly with AsyncWeb.  You need to significantly up your socket queue
lengths and significantly decrease your TCP time wait.  Otherwise you
will fill your IP queue and your server will probably appear to hang for
a while waiting for the TIME_WAIT and SYN_RECV to clear.  There are
probably several changes you need to tweak your IP stack.  Google on
tuning IP parameters for your OS and you should find lots of articles on
how to.

Also be sure you have a large enough acceptCount size to be sure it will
handle the load, or you will get rejected connections.  I would tweak
the acceptCount to equal your maximum concurrent connections.

Also...something else to keep in mind...AsyncWeb is really going to
shine in concurrent connections, not necessarily transactions per
second.  This means it could handle a lot more load than a single
threaded connector on Tomcat could.  Thus speed is not necessarily a
good way to measure scalability.

Jeff

Deepak J wrote:
> Perhaps not the right forum to post these results. But just wanted your
> opinion on the tests.
> 
> S/W versions:
> Tomcat 5.5.20
> ASyncWeb 0.8.2
> JRE 1.5.0._06
> 
> Test Methodology:
> A multi thread client constructs HTTP/POST messages (headers + content). The
> size of each message is ~160KB. The client can be pointed either at Tomcat
> or at ASyncWeb server. The number of client threads and iterations per
> thread is configurable. Thus a config of thread=10 & iterations=1000 will
> result in 10000 HTTP/POST.  Keep-Alive functionality is not being tested
> hence after each HTTP connection there is a call to disconnect(). A static
> counter is incremented after a 200 OK. After all client threads complete
> execution a result is printed indicating total time taken for the test,
> number of 200 OK received & total connections/sec
> The server code, which resides in the Tomcat Servlet and ASyncWeb
> stand-alone app is identical in functionality in both places. When a request
> is received the Content-Length header is fetched. Data from the InputStream
> is read in a while loop and writtern in byte chunks of size 1024 to a byte
> array output stream. Once the stream has been read, the size of the byte
> array is compared with the content-length and a log is printed if they don't
> match. On successful completion a 200 OK is returned.
> 
> Test Results:
> ----------------------------------------------------------------------------------------------------------------
> No            Threads     Iterations     Tomcat 5.5.20                           
> ASyncWeb 0.8.2
> -----------------------------------------------------------------------------------------------------------------
> 1              10             1000         Test duration = 138626 millis       
> Test duration = 901996 millis
>                                                 Total Connections = 9995             
> Total Connections = 10000
>                                                 Connections/Sec = 72	                  
> Connections/Sec = 11
> 
> 
> 2              100            2             Test duration = 2878 millis           
> Test duration = 20892 millis
>                                                 Total Connections = 200               
> Total Connections = 200
>                                                 Connections/Sec = 69	                  
> Connections/Sec = 9     
> 
> 3              500           10            Test duration = 41796 millis         
> OutOfMemory in Server 
>                                                 Total Connections = 5000
>                                                 Connections/Sec = 119	
> -----------------------------------------------------------------------------------------------------------------------------
> 
> Now I am wondering if there are tweeks needed to get better number. Should
> AsyncWeb not perform better that Tomcat's One-Thread-Per-Connection model?
> 
> 
>