Tomcat vs. Apache static file performance?

Resources » Stream » Tomcat vs. Apache static file performance?
Posted on Oct 10, 2007 (5 years ago). Seen 11,228 times. 5 comments. Permalink
Photo Aleksandar Gargenta
CTO
Marakana, Inc.
Member since Jan 19, 2007
Location: San Francisco
Stream Posts: 44
Tagged as: Tomcat
Is anyone aware of any recent benchmarks comparing Tomcat and Apache web server when it comes to the performance of serving static files?

We all know that there are many advantages of fronting Tomcat by Apache on high traffic sites, but are modern versions of Tomcat (5.5 with/out APR or 6.0 with/out APR/Comet-NIO) able to match Apache's ability to serve static files under high load?

Does anyone have any first-hand experiences with this?

Comments

Posted on Nov 24, 2007
Photo Jason Brittain
Member since Nov 24, 2007
Location: Dublin
Hi Aleksandar.

Yes. I spent quite a bit of time benchmarking the static file performance of Tomcat versus Apache httpd, and just last month published the findings in the new O'Reilly Tomcat book. The results of the benchmarks are so interesting that I pursuaded O'Reilly to publish the benchmarks as the book's sample chapter, which you can find here:

http://www.oreilly.com/catalog/9780596101060/chapter/index.html

Not only is Tomcat able to match Apache httpd's performance in all cases that I benchmarked, but it turns out that Tomcat is usually significantly faster.
Posted on Nov 25, 2007
Photo Aleksandar Gargenta
CTO
Marakana, Inc.
Member since Jan 19, 2007
Location: San Francisco
That's exactly what I was looking for! The results are really surprising!

I guess the only thing missing (in my mind) is the difference between Apache httpd and Tomcat when serving large files (e.g. over 48KB, or even larger).

Anyway, I'm planning to do some benchmarking myself. I'll let you know how it goes!
Posted on Jun 7, 2011
Photo Vinay Jain
Morningview Technologies
Member since Jun 7, 2011
Please post your benchmark results if you conducted tests for larger files. I am planning to serve file sizes of about 20MB (Comma Separated Value- CSV files). Should I be using Tomcat (version 7) or serve them through httpd on the same linux server?

The volume of requests is not high in this case though. It might be at a max concurrent usage of 10 users at a time.

Your insight will be helpful.

Thanks!
Posted on Jun 7, 2011
Photo Aleksandar Gargenta
CTO
Marakana, Inc.
Member since Jan 19, 2007
Location: San Francisco
Hi Vinay,

I have not done any recent benchmarks, but for the kind of volume you are suggesting I would not suggest you base your system architecture choice on the relative performance of Tomcat to Apache HTTP servers.

I suggest you consider other factors: security, stability/availability, features, complexity, etc.

That said, I would be interested to see if anyone did any recent benchmarks of the latest versions of the two servers.

Cheers,
Sasa
Posted on Jun 8, 2011
Photo Vinay Jain
Morningview Technologies
Member since Jun 7, 2011
Thanks Sasa.

I agree. They are all key determining factors. While I am looking at each of them, performance is also a very key aspect.

I am considering moving forward with Tomcat at the moment until I note that performance truly hurts.

Cheers,
Vinay