I've been told ( by someone in this company) that resin was chosen because a benchmark done years ago showed that it was much much faster.
Ok, then, I've been doing a bit of tests and benchmark to find out if that statement was still true.
Another statement found in the caucho's blog was that:
"Resin Open Source is about 45% faster than Tomcat, Resin Professional is about 80% faster than Tomcat."
Quite a bold statement, that hasn't proved to be true.
Let's go to the benchmark, if you allow me.
- Tools
I used resin 3.0.14 and tomcat 5.5.26.
- Tests
- Long run (or overnight) test: running over night . I run this only with tomcat to prove that it would be reliable over a greater period of time
- Progressive load: I made separated test runs, increasing the number of users, from 5-170
- Ramp-up comparison: In the same test I used the jmeter ramp-up mode to simulate an increment of users.
- Long run.
Average response time: 9106 ms
Minimum response time: 3.150 ms
Maximum response time: 22 seconds
Percentage of error: 0%
Final throughput 6.2 per second
This test only shows that tomcat is indeed reliable.
- Progressive Load
The chart shows that the response time is almost the same, however tomcat is slightly superior in all of the tests.
The main thing I noticed in this test is the CPU consumption. Tomcat is visibly lighter in this regard. The graph below shows a run using tomcat, following a run with resin:
This chart was done when I was testing 100 concurrent threads sending requests to one server at a time.
- Ramp-up comparison
Tomcat Results:
- Samples: 1067
- Average: 10427
- Min: 3216
- Max: 27350
- Throughput: 4.4/sec
- Kb/Sec: 66.34KB/sec
Resin Results:
- Samples: 1090
- Average: 10450
- Min: 3434
- Max: 32360
- Throughput: 4.5/sec
- Kb/Sec: 66.6/sec

Not much difference here (a little advantage for tomcat though), although I would say that the resin is a little bit more erratic on its response time.
Again, the CPU monitoring shows that the resin consumed a lot more CPU than tomcat (the graph shows tomcat and ):
- Conclusion
Besides the performance, during the port of the application to tomcat, I also found out some other issues with resin:
- Resin xml validation is less strict: this means that a web.xml that work in resin might fail in tomcat. Resin also allows to use a non-compliant web.xml, based on a resin's schema.
- Resin allow mounting external path-mappings. This "feature" is used, for example to locate JSP's outside the war. Tomcat, in its version 6 had received a patch that allowed to do the same, but the patch was vetoed as this is against the specification.
- Shutdown and Start up: Contrary to my expectation, resin had a fast startup, which I'm counting until it comes back with the request response. It took 20 seconds both. From my experience I would say resin start was quite slow. Shutting resin down also is a bit problematic.
4 comments:
AFAIK resin also does not support the 2.5 servlet spec, which is quite old already.
how bout tomcat vs jetty?
How about Resin vs. Tomcat 6 which has been available for quite awhile.
A more appropriate option might be Resin vs. Glassfish 2 since Resin is a J2EE container.
Also, Glassfish has a wonderful admin UI. Might be worth considering.
Thanks for the suggestions. A preliminar test showed that tomcat 6 wasn't much different.
Jason, it might be true, but we never used full J2ee capabilities from resin.
Post a Comment