tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Kislo <>
Subject Apache2 and mod_jk2 POST performance problems (GET is fine)
Date Thu, 30 Jun 2005 00:23:50 GMT
I have run into what I believe is a problem with mod_jk2, or in the part
of tomcat that communicates with mod_jk2.  I am running apache 2.0.53,
and tomcat 5.0.28.  I'm running an ubuntu hoary system, so apache2,
libapachje2-mod-jk2 come out of ubuntu archives.

The problem I'm running into is that performance on a POST request is
abysmal, while GET requests is just fine.  As seen here:

ab -n 1000 http://localhost/tomcat/test
Time taken for tests:   0.300519 seconds
Requests per second:    3327.58 [#/sec] (mean)

ab -p testpost -n 1000 http://localhost/tomcat/test
Time taken for tests:   40.340663 seconds
Requests per second:    24.79 [#/sec] (mean)

the 'testpost' only has a few characters in it.. so size is not a

For the record I am actually requesting an invalid URL (tomcat is
returning a 404).  This eliminates the possibility that it was our
application causing the slowdown... infact any request that gets passed
to tomcat5 as a POST suffers this slowdown.

The weird thing is the server is not pegged on CPU, infact, quite the
opposite.  It's practically entirely idle during the 40 seconds of the
testing.  So it's not CPU bound.

If I make the same POST requests directly to Tomcat's HTTP port (EG:
8180), performance is fine.  If I make the POST requests to a URL that
apache does not forward to tomcat, performance is fine.

Here is my


info=Maps the requests. Options: debug

# Alternate file logger

info=Scoreboard. Required for reconfiguration and status with
multiprocess servers

info=Global server options
# Default Native Logger (apache2 or win32 )
# can be overriden to a file logger, useful
# when tracing win32 related issues

info=Ajp13 forwarding over socket

info=Status worker, displays runtime informations

And the snippet from my httpd.conf:
<LocationMatch /tomcat/.*>
  Allow from
  Deny from all
  JkUriSet group testsite

This performance hit is significant enough our application will not work
in a suitable fashion in these conditions.  I have scoured the web and
mailing lists for any solutions, and haven't found anything that I can
tweak to try to resolve this issue.  I found lots of documentation on
jk1 for parameters I could tweak, but nothing for jk2.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message