You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eitan Yarden <ei...@paralleluniverse.co> on 2013/09/10 19:42:01 UTC

Tomcat async servlet performance

I've been experimenting with Tomcat 7's async servlet support and comparing
it to synchronous (plain) servlets on an EC2 m1.medium instance. I've
configured Tomcat to use the APR connector, and the service does some
(dummy) work for 80ms and returns an html response. I'm using Tomcat 7.0.42.

When the thread-pool size restriction has been removed, the synchronous
servlet spawned about 1000 threads and was able to handle up to about 2700
requests/sec while still maintaining reasonable latency. The asynchronous
servlet handled up to about 4500 requests/sec (I've used my own thread-pool
for the async processing rather than the container's
AsyncContext.start(Runnable) method).

While certainly significant (66% increase in request rate), I had expected
an even bigger difference between the async and sync servlets' performance.
Has other people's experience been the same? Are there any major Tomcat
configuration options that should be used when running async servlets?

Re: Tomcat async servlet performance

Posted by Daniel Mikusa <dm...@gopivotal.com>.
On Sep 10, 2013, at 1:42 PM, Eitan Yarden <ei...@paralleluniverse.co> wrote:

> I've been experimenting with Tomcat 7's async servlet support and comparing
> it to synchronous (plain) servlets on an EC2 m1.medium instance. I've
> configured Tomcat to use the APR connector, and the service does some
> (dummy) work for 80ms and returns an html response. I'm using Tomcat 7.0.42.
> 
> When the thread-pool size restriction has been removed, the synchronous
> servlet spawned about 1000 threads and was able to handle up to about 2700
> requests/sec while still maintaining reasonable latency. The asynchronous
> servlet handled up to about 4500 requests/sec (I've used my own thread-pool
> for the async processing rather than the container's
> AsyncContext.start(Runnable) method).
> 
> While certainly significant (66% increase in request rate), I had expected
> an even bigger difference between the async and sync servlets' performance.
> Has other people's experience been the same? Are there any major Tomcat
> configuration options that should be used when running async servlets?

Curious to see if you've hooked up a profiler to your tests to see where time is being spent?

Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org