9

I have been working on stress testing a Java web application (JSP+Tomcat6+Struts2+Hibernate+mysql) and well the results I was getting wasn't something to brag about! So I upgraded the tomcat version to 7, and wow! the requests/sec I got was 5 times better than before.

So enlighten me, is there this much difference between tomcat6 and tomcat7's performance? or there is something wrong with my configuration and stuff?

SJ.Jafari
  • 1,236
  • 8
  • 27
  • 39

2 Answers2

9

The Tomcat "Which Version" page includes a high level overview of the differences between different Tomcat versions. The section for Tomcat 7.x does not claim massive performance increases for Tomcat 7.x versus Tomcat 6.x. A Google search didn't offer any clear evidence either.

I'd be inclined to think that a 5-fold throughput improvement is either:

  • a Java / Tomcat configuration and/or tuning issue,
  • something a bit unusual about your web application, or
  • an unidentified artefact of the way you are doing your performance measurements.
Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
7

What is the difference between Tomcat 7.0 and Tomcat 6.0?

  • Tomcat 7.0 has improved the security over Tomcat 6.0 due to several security code fixes and additions (such as CSRF prevention filter).

  • Tomcat 7.0 includes Servlet 3.0 API, which it self is an improved version over its previous version (used by Tomcat 6.0).

  • So, 3rd party applications that need Servlet 3 containers are supported by Tomcat 7.0.

  • Configurability is better in Tomcat 7.0, which includes new container components (e.g. ExpiresFilter and AddDefaultCharsetFilter) that allow better handling of problems previously left to the web applications to resolve.

  • Tomcat 7.0 supports Java 6 or further version, while Tomcat 6.0 supports Java 5 or further version.

  • Finally, Tomcat 7.0 includes cleaner and modernized code that uses generics in the required places.

techGaurdian
  • 732
  • 1
  • 14
  • 35
Rohit Supe
  • 71
  • 1
  • 2