Discussions

News: Bashing The Cat: Tomcat Analysis

  1. Bashing The Cat: Tomcat Analysis (47 messages)

    Tomcat is the servlet container that we all love or hate (or perhaps both at the same time). After publishing a weblog showing Tomcat seriously lagging in performance next to the competition, a lively (mostly positive) debate ensued. I have summarized all of the different viewpoints of the debate which has progressed over the past week.

    Read more in Bashing the Cat - A Summary of results, an analysis that shows all of the different viewpoints of the debate which has progressed over the past week.

    "I think the problem may be that Open Source fanatics (and don't get me wrong, I am one) often don't take the time to try other products, or perhaps don't have the balls to admit that their product is sub-optimal and needs a serious kick in the pants? (After all it's Open Source - it must be good right? Wrong."

    Overall I think the debate is very positive for Tomcat, and required reading for anyone who uses it regularly. I hope Tomcat emerges a better container for all of this. In order to for J2EE to grow, we need a great (not just good), free servlet container.

    Threaded Messages (47)

  2. What's your point?
    Nobody claimed Tomcat is good. Nobody claimed it was superior(morally,performancewise or otherwise). It's a reference implementation. Use it if you want to or pay $$$ to get a commercial implementation.
    Have you read the posts on Tomcat Dev?The guys working on Tomcat are anything but those open Source fanatics you refer to. They do put in a lot of effort and put out a whole lot of usable code. If you think there are ways you can improve it go ahead and contribute to it.
    BTW your so called 'analysis' stinks. It's low on content and high on fluff. Overall it contributes very little knowledge or useful value.
    Regards
    Ravi
    No, I'm not a open source fanatic here. I use both commercial and open source tools to do my job. I always use whatever best suits my needs.
  3. I think it's OK to mention alternatives to Tomcat, which has come so much of a "market leader" (if you can apply that tern to an open source tool) that other open source alternatives seem to be ignored.

    One example is the excellent Jo! servlet/JSP engine/web server (available at www.tagtraum.com). Small, easy to use, open source, and very fast. Give it a try.
  4. Tomcat is a Reference Implementation. That means other application servers and developers base there software on this. That doesn't mean it is the fastest.

    If you use load balancing and more than one instance of Tomcat4, see Articles at http://jakarta.apache.org/tomcat/resources.html, you can overcome this speed problem. Our team has done this, successfully.


  5. Ravi,
    Good for you that you can look beyond simple hype and use the best tool for the job. Unfortunately, and there is NO denying this, countless developers make the assumption that because Tomcat is the reference implementation, it is the best container to use. I think it's good that alternatives are being looked at.

    Likewise, some app servers such as Borland, actually use Tomcat as their web container. My company uses Borland as the standard app server, which is very sad. Rather than use this app server, my group went off on our own and used Orion because it allowed our developers to get up to speed faster than the Borland/Tomcat duo could.
  6. Bashing The Cat: Tomcat Analysis[ Go to top ]

    ok ravi cool down .. tomcat is free , but there are some very cheap containers like resin which are much better to use .. accept it .. although u said u r not fanatic, ur reply did sound like one ..
  7. Macromedia recently published an article comparing JRun's web container with Tomcat (and the code for doing the tests with Tomcat or other servers yourself). Details can be found here:
    http://www.macromedia.com/support/jrun/introduction/performance_overview/
  8. My vote is still for Caucho Resin in this part of the market. Great software, great support, great performance, easy to use for development too!

    Peace,

    Cameron Purdy
    Tangosol, Inc.
  9. Resin rocks!

  10. Just adding my vote for alternate 'Performant' servlet engine.

    Resin.

    Love t. Easy to use, the support groups are getting better and it's fast as hell.

  11. Adding my vote to Cameron and others - Caucho Resin is a clear winner in this category ;-)

    --
    Dimitri
  12. Resin is a great servlet container, fast easy to use lots of neat feature. however its ejb version still has a long way to go and currently could be best described as ejb water torture. I had difficulty getting all but the simplest ejb's to work with it

    IMHO opinion a resin/jboss combo would be very nice.
    For the 2.x version of jboss there is already a plugin available at

    http://www.practicalprogramming.com/plugin.html

    It is my understanding that the author is also working on one for the upcoming 3.x version of jboss
  13. FYI JBoss 3.0 has been available on www.sf.net/projects/jboss since atleast yesterday.

    Had to download it and try it - haven't gotten so far with my testing though :)
  14. Since when does JBoss include a servlet container?
  15. William,

    It's funny that you mention Tomcat to be more compliant. I found the opposite to be true. I do a lot of development with Tomcat, sometimes Resin just for teting before a release, and JRun. I found that JRun and Resin were both picking up compliance issues and giving me errors when Tomcat should have but didn't.

    I still like Tomcat, and we use it and JRun (soon) in production, but we did have some compliance problems.

    -Jason
  16. Hmm, it's now (since 2.4?) by default bundled with jetty - don't know if that qualifies? (other app.servers seem to do the same?)

  17. Actually they supply 3 versions

    plain version
    bundled with tomcat
    bundled with jetty
  18. anders it would apear you are correct , i found this on the jboss-user list


    <qoute>

    Folks

    OK. So JBoss3.0.0 is out. I got to tell you a story, from yesterday. Past few days we have been having a few problems with the jive forums and website, for a variety of reasons. Also we are releasing a new look and that takes sitemesh and a lot of fancy stuff we just couldn't get to work properly on 2.4 series, I removed our trusted 2.4 and put 3.0 in its place. Yeah I got a few exceptions that shouldn't be there. I thought to myself, **** this looks bad, talked to scott scott said "stuff is solid, but a lot of cosmetics going on". Yeah dealing with exceptions, making sure the reports and logs are right, all these little things that make the surface of a product as pretty and robust as the interior, all these things are missing I think.

    But that will come quickly. The important part is that folks have been using 3.0 for production for some month now, and we are using it to and guess what, it stays up, it runs, it is stable.

    So scott, sacha and ben got to talking about the story of linux 2.4 and microsoft win 2000. They held up the release for months because they were afraid of making mistakes, they were afraid of "brown paper bugs". Sure enough they were right, they were a few. They released it, it was buggy, they fell flat, they picked up and both linux2.4 and win2000 are today superior products.

     But I heard scott say "it's solid" and that is what I wanted to hear. "Just for the past 4 weeks I am fixing crap" and I am thinking "release early" that is what he is saying. Sacha says the same, it will stabilize fast, and put the finishing touches SOOO FAST to this product ONCE WE GET ALL OF YOU INVOLVED.

    So that is the good part. This product has been in development for 18 months, we have been smoking some serious dope on that infrastructure, WE KNOW THAT INFRASTRUCTURE IS THE FUTURE WE ***KNOW*** IT IS KICK-ASS. It is also time for you to use thouroughly, with free documentation coming for us to really get the feedback from our real roots: production. We got 2.4 where it was (any of you remember 2.0 FINAL? he he) make no mistakes 3.11 will be there.

    So this is where you come in. There are about 50 bugs with cosmetics and enhancements and just making sure everything works. WE NEED YOU. THIS IS WHERE YOU COME IN. Shallow bugs are the best way for you to come in and get knowledge. IF YOU ARE an independent a small consultancy, HELP US OUT, get your knowledge, pick your bug-snack and put one night aside to help us with it, that is the way we recruit new people. The people now in JBoss Group are people that appeared to debug 2.0 some stayed. I want the same for 3.0.

    Finally, at the risk of sounding salesly I will remind the guys who are going in production with 3.0 (and we do recommend it) that there is our $10k support contract. You can help us by sponsoring a couple of guys through contracts and making sure we fix the bugs (because we will anyway) but on your schedule. It would just plain help. Also remember that in this contract you get 57 hours of support on your application for fine-tuning/security etc and that HEAD SUPPORT IS FREE, we don't bill it. So we will not be charging the retainer as we fix HEAD of JBOSS en route to 3.2, you will just be boosting our workforce (if you can't commit your own
    time) by helping one of us make some money at it. Keep that in mind, it's a security blanket and if you are going to need it, the $10k helps everyone.

    And that's it. I am truly excited about 3.0, it is a fundamentally solid product. EJB done right, J2EE from the top to bottom, so much ingenuity in all the stacks that one paragraph is not enough. We (JBoss Group) have released a free documentation book for 3.0 a getting started book of about 100 pages that will unlock many of the secrets of 3.0 for you. This is alien stuff, this is killer stuff, I know it, I am proud of it. Let it fly, and let it fall flat on its face with bugs, help us fix them, fix them, even pay us to fix them, just be a hero. 3.0 is here, long live 3.0.

    marcf

    </qoute>
  19. Hi,

    This "incremental forum topic mutation" is really fascinating. There might, possibly, be something of interest here for evolutionary biologists.

    We started out with some thoughts on Tomcat's effectiveness as a container (Why Anybody Might Have Let The Cat In Through The Door In The First Place), moved on to frustrations that people have with Tomcat (This Is One Lazy Cat), and then pulled in some musings on other containers like Resin (Look What The Cat Dragged In) and then ended up with a discussion on JBoss 3.0 and a long quote from Marc Fleury who concluded with his one-of-many "long live JBoss" mantras (THIS Cat, He Says, Has Nine Lives).

    My question, does anybody have anything more to add about Tomcat itself? The architecture, design decisions vis-a-vis the other containers that reduce its performance etc. 'Cos it would be interesting to see what the different opinions on this are out there.

    Well, what's up? Cat Got Your Tongue?

    SD

    PS: No, I don't need a straight-jacket!
  20. Back to the topic at hand.[ Go to top ]

    Sandeep,

    While I perpetuated the topic redirection to JBoss, I too would be interested in what others think about Tomcat from technical rather than political perspective. However, I would guess, and I hope I'm wrong, that most of the people that read this forum are more interested in EJBs rather than "mere" servlets and JSPs and hence their experience lies more with WebLogic, Websphere, iPlanet/SunONE, JBoss, etc. rather than Tomcat. So many topics here focus on EJBs that if this were the only source of J2EE information, one would never know that servlets and JSPs are part of the platform definition.

    So, I would like to see a technical comparison of the various servlet containers with JSP engines available. Note that I believe this disqualifies JBoss because it is an EJB container with hooks to Tomcat and others and has no unique, native servlet container of its own.
  21. I don't agree. I think there a lot of projects out there using only a jsp/servlet container. As discussed before, not all projects demands the heavy load of the ejb servers and implementations.

    I particularly have been using tomcat for 6 months. It's quite stable, and it's fast enough, at least in my environment(1000 users, 100 req/sec). As a remark, I think that they should improve the connectors ( mod_webapps or mod_jk), mainly optimizing for performance. We all know that in a real environment, it's not practical to serve static content with tomcat (it's too slow, compared with Apache or even M$ IIS). So, a well done job in the connectors would be welcome.

  22. Andre,

    I think you misunderstood what I was trying to say. My contention is that since most of the articles and forum messages on this site are concerned with EJBs rather than servlets or JSPs, you might not find many people who can comment objectively about Tomcat. I, too, believe that EJBs are overkill for most sites. In fact, I know of many organizations that are using WebLogic and Websphere as servlet containers only! What a waste of money!

    This site seems to employ the anti-80/20 rule: 80 percent of the topics here concern the 20 percent of J2EE that most people don't need to use for most projects.

    J
  23. According to the JBoss Downloads page, JBoss 3.0 (RC3) includes an integrated webserver/servlet container (though it's 4MB less if you download the version with Tomcat instead).
  24. Two thumbs up for Resin as well.

    I used to run Tomcat--it really is good to get started with. However, once you work with Resin, you'd never want to go back. Don't believe me? Just try a little development with it.

    It took me about 15 minutes to realize that superior in developer productivity--it REALLY TRUELY reloads everything in your webapp dynamically. Let alone it's just plain faster, has connection pooling that WORKS and is super easy to configure.
  25. Bashing The Cat: Tomcat Analysis[ Go to top ]

    Resin is at the cutting edge, My job is to make the web apps we develop run, none other, was ahead of our needs as Resin has been,

    develop on resin,you may look elsewhere, as you should,
    but find no need to leave the comfort of such a well writen peace of art.

    Denis
  26. Resin rocks[ Go to top ]

    I agree with the last post, Resin is a very superior product. My experience with Tomcat is that it helped me learn how to write apps that could be "dragged & dropped" from one app server to another. I also learned that Tomcat is a bad choice for a production environment.
  27. orion (especially orion) and resin are top notch products, no doubt.
    but tomcat IS certainly NOT CRAP! All i have read in the "reviews", "benchmarks" (done by server vendors...) are contradicting statements about how bad tomcat performs (is it 3 times, 5 times or 80 times slower??).

    from my experience i can say that
    - for small to midsized web sites and intranet sites it is far more than enough
    - it is a great server for development (at least in standalone mode i do not see why it should be complicated to configure - i mean, deployment descriptors should be best friend of every server side java developer)
    - it is open source, one can adapt it as needed, and most important, one can fully understand the server, just by tracing the code. this is really cool and i guess this is one of the reasons that drives attention to other os products like jboss.

    however... if there are *really* serious problems with tomcat, then they should be posted and debated, of course. but with concrete cases and problem descriptions.

    joe
  28. one can fully understand the server, just by tracing the

    > code.

    well, i should have written: one *could* (theoretically) fully understand the server ;-)

    i certainly do not

    joe
  29. Tomcat 4.1.x[ Go to top ]

    I'll use this opportunity to hype a bit the 4.1.x releases (alpha status at the moment), which include:
    - New HTML based administration webapp, built using Struts and JMX
    - New connectors (HTTP/1.1, AJP 1.3, JNI), rewritten for performance and lower GC levels
    - New optimized Jasper (among many improvements, it's much faster for tag libraries, with a lot more work in progress in that area; if you're interested to know why taglibs were slow in the old Jasper, refer to bug 8290 in Tomcat Bug database); this should benefit all containers which are using Jasper, including Tomcat 3.3, Jetty, and probably many others
    - Improved webapp deployment capabilities (auto deployer, Ant tasks to control the manager, better webapp reloader)

    The latest test milestone for 4.1.x is available here:
    http://jakarta.apache.org/builds/jakarta-tomcat-4.0/test/v4.1.3/

  30. It's entirely a question of point of view. If your point of view is pure performance, you might be right.

    If your point of view is compliance to standards, I think Tomcat is *the* winner ! I co-develop an application that makes heavy use of filtering and Tomcat's implementation is the one that works the best.

    I had to do bug reports to WebLogic because they hadn't implemented it correctly ! Orion is shaky and every version is different, HP-AS has the same bug as WebLogic, etc...

    As for performance, the only thing I have an issue with in Tomcat is JSP compilation, but installing Jikes instead of the standard javac helps a lot. I'm sure the Apache guys will be addressing this in Tomcat 4.1.x. Apart from that my application answers to requests in under 3ms so that's plenty enough speed for me on Tomcat... This was of course done through usage of filters that cache the HTML output :)

    But I also think there is nothing better than pointing out politely and constructively what should be improved in OSS products. I remember the controversy when comparing the Linux kernel to the Windows NT kernel on SMP machines and the Linux kernel improved a *lot* after those tests and I wouldn't be surprised to learn that it probably outperforms NT in some SMP configurations now. So there is a point in suggesting areas of improvements.

    So the short answer to my big rant : Tomcat rules ! :)
  31. I've been using Jetty (jetty.mortbay.org) as a servlet container for over a year, and have been very happy with its easy set-up, reliability, and "small" size. Support via the mailing lists is fast and helpful, too.
  32. Acutally, I've been using it as my web server as well.
  33. I've made some tests with Jetty, Tomcat 4, Orion 1.5.4 and OC4J 1.5.4. Only static pages. I know it's not the main purpose of a J2EE app, but in my site we have a HUGE amount of static pages, and lot of J2EE apps, too. I know everybody must do it's own benchmark, so here comes my own:
    Athlon 800Mhz, 512MB ram, Windows XP professional
    Test setup: 100 simultaneous threads (MS Web App Str Tool)
    Files: 10 html files and 10 jpg files (about 70Kb, each)
    All jvm were started with -Xmx400m -server
    Test Time: 2 minutes
    Jetty 4.0.2: 11508 hits - 96.97 hits per second
    Tomcat 4: 18808 hits - 156.44 hits per second
    Orion Server: 27409 hits - 229.23 hits per second
    OC4J Server: 29402 hits - 246.68 hits per sec.
    Just for curiosity, I tested the same bunch of files with Apache 2.0.36: 30916 hits - 257.26 per sec.

    Jetty seems not to catch up... And quite remarkable is OC4J and Orion performance for static files, very near Apache 2.0.36.
  34. Bashing The Cat: Tomcat Analysis[ Go to top ]

    FYI, JBoss DOES include a web server/servlet container. The Jetty project is now under the JBoss umbrella and is embedded in JBoss to make it a complete J2EE solution.

    Regards,

    Bill Burke
    JBossGroup
  35. does anyone know of any servlet/jsp containers that are built on jdk1.4's java.nio package? (even prerelease ones?)

    i would imagine that if designed properly (making appropriate use of the new technologies) it would fly circles around anything out there now.
  36. Bashing The Cat: Tomcat Analysis[ Go to top ]

    Take a look at Jetty. It seems to be using the nio package. http://jetty.mortbay.com/jetty/doc/jdk14.html

    Regards,
    Pelle Poluha

    >does anyone know of any servlet/jsp containers that are built on jdk1.4's java.nio package?

  37. Bashing The Cat: Tomcat Analysis[ Go to top ]

    Jetty 4.0 does include support for the java.nio libraries.
    However, we only use this to avoid allocation of threads to idle persistent connections. This does not help throughput too much but does reduce the footprint on large servers and stresses the OS less (however many OS's handle 2000+ threads better than 2000+ connections :-)

    The problem with java.nio is that the servlet API is just
    not suitable for use with it and there is probably not a
    simple fix to make it well suited.

    We have plans for a Jetty5 server, built on nio and providing an optimized non-servlet API. Hopefully this will become more than vapourware later this year and then we will be able to see how much the servlet API is slowing things down.

  38. Bashing The Cat: Tomcat Analysis[ Go to top ]

    Very interesting. Can you please elaborate on how/what is in the servlet api that makes it not suitable?

    I'm not argueing with you, just curious--i don't know much about the nio stuff.

    Does the servlet api expect some kind of connection "lifecycle" that is incomptiable with the nio stuff?

    Also, in Jetty5, what do you mean by an optimized non-servlet API?

    Thanks!
  39. jdk1.4/nio/servlets[ Go to top ]

    hadn't thought about that. does it have to do with the type of parameters that the servlet api is specifying to be passed around? (input and output "streams")

    i imagine that this is going to open a can of worms over the next couple years. jsps will be easier to migrate that servlets.
  40. Bashing The Cat: Tomcat Analysis[ Go to top ]

    I have been using Tomcat 4.03 for a site with 10 small web applications that includes about 10,000+ static files. This site receives 25,000+ hits per day (about 120 MB/day data transfer). There are a number of servlet filters that apply to most static files, several web applications require authentication, and a large number of pages require SSL.

    The site is fast (jdk 1.4 makes it even faster now than with jdk 1.3), and the site is obviously faster than when it ran under IIS.

    Upcoming improvements with Tomcat should allow us to keep growing with it. But, it is great that there are other J2ee web servers that both are pushing the edge on performance and are also either open source or inspiring similar developments in Tomcat.

    j f
  41. Bashing The Cat: Tomcat Analysis[ Go to top ]

    <quote>
    I have been using Tomcat 4.03 for a site with 10 small web applications that includes about 10,000+ static files...
    </quote>
    j f
    Can you please give me your server config? I am running 3 webapps (medium traffic) on a 256MB P-III box. A few more webapps will be coming up in the near future. I want to get a feel of the h/w Tomcat requires.
    Thanks
    Ravi
  42. Bashing The Cat: Tomcat Analysis[ Go to top ]

    <jf:quote>
    I have been using Tomcat 4.03 for a site with 10 small web applications that includes about 10,000+ static files...
    </jf:quote>

    <rv:quote>
    Can you please give me your server config? I am running 3 webapps (medium traffic) on a 256MB P-III box...
    </rv:quote>

    Hi R V,
    I am also using a P-III with 256 MB. I have never seen Tomcat use more than about 80 MB of memory, and the CPU usage is never overloaded.

    j f
  43. Bashing The Cat: Tomcat Analysis[ Go to top ]

    Howdy,
    Been using tomcat for development and production ever since 3.2. Now using 4.0.3. Serious hardware has always been available (production server is 18-CPU, 4GB RAM Solaris box). We run several different instances of tomcat, never had a problem with configuration or management.

    None of our new developers have had problems "getting up to speed on it" (what learning curve? It's all the servlet spec, nothing funny).

    Never had a performance problem: have compared to iPlanet and WebLogic. Could probably get better performance from others, but like another post said, in real life (and definitely in our case), it's the back-end stuff in the user applicationsthat's a lot more time-consuming and a lot more of a performance bottleneck than the server implementation.

    By the way, does anyone keep the automatic reloading type features on in production?

    And one final thing: the tomcat-user mailing list is overflowing with people willing to help. All our questions are answered right away and correctly. Once again, haven't compared this to other server mailing lists, but I can't see anyone being better (although they could be as good).

    Yoav
  44. A few more data...

    I have a small Management Information System for a mid-sized Call Center(3 millions calls-month). It runs 7x24. I have not implemented the middleware with EJB, but with beans. There are almost 150 beans which perform the business rules and manage the persistente of objects( using jdbc).

    There are about 200.000 hits per/day. 25.000 in peak hours. The web server´s cpu user(there are two, with load balancing using ajp13 and apache), never pass 5%. The boxes are two pentium III 800, with 512 Mb ram, running linux and jdk1.4.

    It´s quick, it´s stable, it´s free. I don´t see any reason to change now, and for a long time.
  45. Two minor points:

    1) At some point in the analysis, someone claims that Resin is better at standards compliance because when porting from Tomcat to Resin, they found a number of new issues that Tomcat didn't complain about.

    Having ported from appserver to appserver a large number of times, I can state fairly confidently that the same thing would have happened in the other direction. If you spend enough time in one app server, you'll do a few things that aren't /quite/ right, but that the app server doesn't mind, and when you port, you'll find that the new app server does mind.

    Almost every port I've done from one application server to another has revealed a few small things that someone did wrong.

    2) With respect to Jetty, there are things I like, and things I don't like, but one thing I /have/ to say is that every issue I've ever had with Jetty has been fixed by Mortbay post-haste, and followed up with a helpful email. Very, very responsive people on the email list.

    Bravo to them for that.

    All in all, I'm quite happy with Orion, Resin, Jetty and Tomcat all in different ways. If you must use EJB, then JBoss and Orion are probably my preferences.

  46. Bashing The Cat: Tomcat Analysis[ Go to top ]

    you say tomcat runs whitout using to much cpu,
    I say tomcat is not maximizing your resources,
    if an application server does not max out your resources
    I say it's slowed down by something.
    if sofware craves for more power and by providing it
    keeps running faster without crashing,
    I say you are dealing with a challenge to write apps
    that could keep up.

    I dont care about bashing the cat,but if that's all that could be said about it,it don't impress me much.

    You want a steep leaning curve? develop using resin!
  47. Has the test been done using Tomcat-3 or Tomcat-4?

    Tomcat-3 doesn't keep-alive HTTP connections.
    Tomcat-4 (known as Catalina) knows how to keep-
    alive HTTP connections. The meaning is that in
    Tomcat-3 each service invocation opens a TCP
    connection. Thus using Tomcat-4 dramaticaly
    improves performance.
  48. Hi Mike,

    Thought you might be interested in this. We have published our Tangosol Coherence plug-in to support replicated sessions in Tomcat 4. You can download it (version 1.1.3 pre-release) from http://www.tangosol.com/products-clustering.jsp, and the configuration (very simple) is documented in the included ./tangosol/doc/coherence-tomcat4.htm file.

    Peace,

    Cameron Purdy
    Tangosol, Inc.