Resin slower than Tomcat, fails the AppFuse Test
As part of AppFuse 1.6, I was hoping to supply the option to use Resin instead of Tomcat. In reality, hardly anyone has asked for this on the mailing list - but since so many folks say that "Resin is better" - I figured I'd give it a whirl. I hate to be the guy that spoils all the Resin users mantra, but it seems like Tomcat is the better server. Why? Speed, compliance and shit works. Here are some things I found:
- Server startup time when AppFuse is only app installed (deleted work directories before starting):
- Resin: 25 seconds
- Tomcat: 14 seconds
- Running "ant test-canoo" which runs through all the JSPs using Canoo's WebTest (server already started):
- Resin: 1st run (no compiled JSPs) - 53 seconds, 2nd run (compiled JSPs) - 24 seconds.
- Tomcat: 1st run (no compiled JSPs) - 49 seconds, 2nd run (compiled JSPs) - 14 seconds.
I did have to hack a number of things to even run the tests (which verifies titles, success messages, etc.) on Resin. First of all, SiteMesh seems to puke with if you try to use <dispatcher>FORWARD</dispatcher> on the filter-mapping. I had to comment this out, resulting in a lots of HTML Tidy errors during the tests ( Error: <content> is not recognized!). I also had to turn off Resin's fast-jstl to bypass this bug. Finally, I had to revert the displaytag to using the non-EL version (which required changing titleKey -> title and name="${listName}" -> name="listName"). It seems that Resin enables EL even if you're using a 2.3 DTD. With Tomcat, and I believe the spec says this, EL is only enabled if you use a 2.4 XSD.
So there you have it folks, not only is Resin 3.0.9 slower than Tomcat 5.0.28 (JDK 1.4.2, Windows XP), but it's not standards compliant. Of course, the speed could be due to my using the open source version (with performance enhancements turned off) - but I'd think the other (albeit minor) stuff should be easy to fix. Everytime I try to use Resin, I end up finding bugs and going back to Tomcat. I guess this is another one of those days. I don't think I'll include a Resin installer as part of 1.6, but I might distribute one later if I can get these issues solved. I wonder if I should give Orion a run for its money?
P.S. Since I know people are going to ask: Tomcat 5.5.3 with JDK 5.0 took 9 seconds to startup. Running "test-canoo"? First run: 37 seconds, second: 14 seconds. Looks like the new compiler is quite a bit faster.
Posted by Patrick Lightbody on October 08, 2004 at 03:23 AM MDT #
The startup time is indeed impressive, as well as the first run time. However, it's disappointing to see that the 2nd run is slower than the other two. I do like Resin 2.1.x better than 3.0.x - I only needed to disable the ClickstreamListener and turn of fast-jstl in resin-web.xml to get it to work.
Posted by Matt Raible on October 08, 2004 at 03:57 AM MDT #
Posted by Paul Barry on October 08, 2004 at 12:26 PM MDT #
Posted by Ben Tomasini on October 08, 2004 at 03:12 PM MDT #
Matt, I think it would be great if you would post your feedback/bug reports to Caucho. As I mentioned before, they're very responsive. While they may not be able to do anything about performance in the open source version, they should at least fix the bugs you've found. Nothing gets better unless somebody tells the person(s) who can do something about it. It still amazes me that Microsoft (and others, too, I admit) has trained everyone so well to not bother to send feedback because they don't listen. Give it a try and see what happens. Also, you can still download and test the professional version. It's always been available for personal non-commercial use and many people end up buying it anyway. I think it would be worth seeing what kind of times you get with that one.
Posted by gerryg on October 08, 2004 at 04:15 PM MDT #
Posted by peter morelli on October 08, 2004 at 05:29 PM MDT #
Posted by Matt Raible on October 08, 2004 at 08:25 PM MDT #
.V
ps: How do I turn of email of thread comments?
Posted by Vic on October 08, 2004 at 11:17 PM MDT #
Posted by Matt Raible on October 09, 2004 at 01:24 AM MDT #
Posted by Lars Fischer on October 09, 2004 at 04:33 AM MDT #
Posted by Anothermike on October 09, 2004 at 05:22 PM MDT #
Posted by Anothermike on October 09, 2004 at 05:31 PM MDT #
Posted by francisco hernandez on October 12, 2004 at 12:00 AM MDT #
<?xml version='1.0' encoding='utf-8'?>
<Context docBase="/<directory path for the exploded webapp>" path="/<name>" reloadable="true"
</Context>
Now if you compile a class in your IDE, Tomcat reloads your context automatically. This applies to all files, not just Java classes.
Posted by Lars Fischer on October 12, 2004 at 07:58 AM MDT #
Posted by Lars Fischer on October 12, 2004 at 08:17 AM MDT #
Posted by Yoav Shapira on October 14, 2004 at 01:07 PM MDT #
Posted by Steve Sobol on July 28, 2005 at 02:35 AM MDT #
Posted by 207.40.151.167 on December 27, 2005 at 11:02 AM MST #
Posted by Kevin Le on February 24, 2006 at 12:23 AM MST #
We use Resin to run our production app.servers cluster.
1) we switched from resin's clustering to our jgroups
2) we try to make our jsp's standards-compliant but we end up making them only resin-compliant
3) we try to make our servlets, filters and listeners standards compliant, but resin caches filter chain, tries to persist session to DB on every value put into it, uses its buggy sax/xslt implementation, inserts arbitrary symbols in jsps so we catch them with <c:set />, doesn't follow JavaBeans convention on boolean getters (isXXX()), etc.
4) does something really nasty preventing our app from being redeployed (holds ClassLoader or ???)
5) changes its stupid hessian every 5th minor release
6) deserializes classes with no constructors (hessian 3.0.20 stopped this stupidity)
7) running it with its supa-dupa-fast native sockets slows down
8) its 200 threads kill performance with context switching
good server.
We'll use Jetty in next major release
Posted by Elijah Epifanov on February 01, 2007 at 02:55 AM MST #
Posted by sura on February 10, 2007 at 06:59 AM MST #
Posted by florin on May 02, 2007 at 07:11 AM MDT #
So DO NOT use this comparison to base a decision between Tomcat and Resin for deployment.
(Also, there is a more recent, though still single threaded, comparison here: http://raibledesigns.com/rd/entry/comparing_open_source_application_servers)
florin, use -Xdebug when starting Resin to get HotSwap (see http://wiki.caucho.com/Command_Line_Options)
Posted by Mattias Jiderhamn on October 18, 2007 at 08:01 AM MDT #
Posted by 217.6.98.42 on May 26, 2008 at 03:25 PM MDT #