You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Shapira, Yoav" <Yo...@mpi.com> on 2003/08/08 18:55:59 UTC

Tomcat vs. Apache Performance Comparison for static HTML

Howdy,

>Of course not.  I'm only regergitating stuff I have read.  But I have
seen
>it from several different sources, so I took it as truth.  Do you have
>benchmarks to prove otherwise?

It could be the sources you read are outdated.  I don't question their
accuracy at the time they came out, although I don't even know what
sources you're talking about (and it doesn't matter).

Just for kicks, even though I've done this many times in the past for
in-house purposes, I just did a simple benchmark so that people don't
blindly accept X year old sources regarding tomcat performance.

- Server hardware: Solaris 8, specifically from uname -a: SunOS 5.8
Generic_108528-15 sun4u sparc SUNW,Ultra-5_10.  It has 512MB RAM.

- Tomcat version: 4.1.27-LE

- Apache version: 2.0.47, compiled on above platform

- JDK version: 1.4.2, with no switches at all, i.e. client mode with no
special heap of GC settings (yes, I know I could improve performance for
tomcat by tuning these).

- Server.xml setup: nearly exactly the same as unpacked distribution.  I
just removed unneeded connectors, leaving only the port 8080 connector.
Yes, I know I could improve performance by modifying min/maxProcessors,
etc.

- httpd.conf setup: nearly exactly the same as unpacked distrubition.  I
just changed the listen port from 80 to 8080 so that I could use the
exact same JMeter test plan.  Yes, I know there are many things I can
tune here to increase performance.

- Test file: a simple test.html file, static, simple content.  In fact
it's so small I'll include the whole thing:
<html><head><title>Test page</title></head><body>This is a test
page</body></html>

- Test program: Apache JMeter 1.9 final running on Windows2000 Pro, with
JDK 1.4.2.
- Test plan tree:
Test Plan
  -> Thread Group: 10 threads, 1sec ramp-up, 100 loops
     -> HTTP Request: GET, myhost, port 8080, /test.html
     -> Graph Results (with file output)

- Findings:
Server #of Samples Average Deviation Median
Apache   1000       17ms    25        10
Tomcat   1000       29ms    44        10     

For both servers, CPU usage was light, and memory wasn't taxed much at
all.

So what does that say?  Apache is faster by about 70% on average
((29-17)/17) at serving this small text file, with both servers very
close to their out of the box configuration.

Out of curiosity, I tried the test again with a larger text file: 30K or
so in size.  The results then were:
Server #of Samples Average Deviation Median
Apache   1000       182ms   277       90
Tomcat   1000       185ms   249       80

So now tomcat is faster? ;)

We could debate forever about whether it's representative of real-world
conditions, whether care should be taken to configure the server for
optimal performance, etc.  That's why everyone can and should run their
own benchmarks for their own applications.

With the above information anyone could easily reproduce the test.  My
point, however, is not that tomcat is faster or that apache is faster.
My point is that it's easy to test performance and that you shouldn't
trust sources, especially if they don't directly apply to your
platform/server/application.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.


java.lang.NoClassDefFoundError: org/xml/sax/XMLReader

Posted by ke...@perfec.com.
Hello, 

I'm trying to run the latest version of FOP (0.20) on Tomcat 3.2, by 
following the instructions in
http://xml.apache.org/fop/servlets.html 

When I run the servlet, I get the error 

java.lang.NoClassDefFoundError: org/xml/sax/XMLReader
      at FopServlet.renderFO(Unknown Source)
      at FopServlet.doGet(Unknown Source 

I think my classpath is set up, but can someone clarify the steps for me 
again? I'm relatively new to servlets so I may have missed an obvious step. 

Thanks, 

Kenneth

java.lang.NoClassDefFoundError: org/xml/sax/XMLReader

Posted by ke...@perfec.com.
Hello, 

I'm trying to run the latest version of FOP (0.20) on Tomcat 3.2, by 
following the instructions in
http://xml.apache.org/fop/servlets.html 

When I run the servlet, I get the error 

java.lang.NoClassDefFoundError: org/xml/sax/XMLReader
      at FopServlet.renderFO(Unknown Source)
      at FopServlet.doGet(Unknown Source 

I think my classpath is set up, but can someone clarify the steps for me 
again? I'm relatively new to servlets so I may have missed an obvious step. 

Thanks, 

Kenneth

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat vs. Apache Performance Comparison for static HTML

Posted by John Turner <to...@johnturner.com>.
Nice.  I'm bookmarking this post for the future.  'Nuf said.  Thanks, Yoav!

John

Shapira, Yoav wrote:

> Howdy,
> 
> 
>>Of course not.  I'm only regergitating stuff I have read.  But I have
> 
> seen
> 
>>it from several different sources, so I took it as truth.  Do you have
>>benchmarks to prove otherwise?
> 
> 
> It could be the sources you read are outdated.  I don't question their
> accuracy at the time they came out, although I don't even know what
> sources you're talking about (and it doesn't matter).
> 
> Just for kicks, even though I've done this many times in the past for
> in-house purposes, I just did a simple benchmark so that people don't
> blindly accept X year old sources regarding tomcat performance.
> 
> - Server hardware: Solaris 8, specifically from uname -a: SunOS 5.8
> Generic_108528-15 sun4u sparc SUNW,Ultra-5_10.  It has 512MB RAM.
> 
> - Tomcat version: 4.1.27-LE
> 
> - Apache version: 2.0.47, compiled on above platform
> 
> - JDK version: 1.4.2, with no switches at all, i.e. client mode with no
> special heap of GC settings (yes, I know I could improve performance for
> tomcat by tuning these).
> 
> - Server.xml setup: nearly exactly the same as unpacked distribution.  I
> just removed unneeded connectors, leaving only the port 8080 connector.
> Yes, I know I could improve performance by modifying min/maxProcessors,
> etc.
> 
> - httpd.conf setup: nearly exactly the same as unpacked distrubition.  I
> just changed the listen port from 80 to 8080 so that I could use the
> exact same JMeter test plan.  Yes, I know there are many things I can
> tune here to increase performance.
> 
> - Test file: a simple test.html file, static, simple content.  In fact
> it's so small I'll include the whole thing:
> <html><head><title>Test page</title></head><body>This is a test
> page</body></html>
> 
> - Test program: Apache JMeter 1.9 final running on Windows2000 Pro, with
> JDK 1.4.2.
> - Test plan tree:
> Test Plan
>   -> Thread Group: 10 threads, 1sec ramp-up, 100 loops
>      -> HTTP Request: GET, myhost, port 8080, /test.html
>      -> Graph Results (with file output)
> 
> - Findings:
> Server #of Samples Average Deviation Median
> Apache   1000       17ms    25        10
> Tomcat   1000       29ms    44        10     
> 
> For both servers, CPU usage was light, and memory wasn't taxed much at
> all.
> 
> So what does that say?  Apache is faster by about 70% on average
> ((29-17)/17) at serving this small text file, with both servers very
> close to their out of the box configuration.
> 
> Out of curiosity, I tried the test again with a larger text file: 30K or
> so in size.  The results then were:
> Server #of Samples Average Deviation Median
> Apache   1000       182ms   277       90
> Tomcat   1000       185ms   249       80
> 
> So now tomcat is faster? ;)
> 
> We could debate forever about whether it's representative of real-world
> conditions, whether care should be taken to configure the server for
> optimal performance, etc.  That's why everyone can and should run their
> own benchmarks for their own applications.
> 
> With the above information anyone could easily reproduce the test.  My
> point, however, is not that tomcat is faster or that apache is faster.
> My point is that it's easy to test performance and that you shouldn't
> trust sources, especially if they don't directly apply to your
> platform/server/application.
> 
> Yoav Shapira
> 
> 
> 
> This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 



Re: Tomcat vs. Apache Performance Comparison for static HTML

Posted by Rick Roberts <te...@ait-web.com>.
Very interesting.  Thanks for making the effort and sharing your results.


-- 
*******************************************
* Rick Roberts                            *
* Advanced Information Technologies, Inc. *
* http://www.ait-web.com                  *
*******************************************

Shapira, Yoav wrote:
> Howdy,
> 
> 
>>Of course not.  I'm only regergitating stuff I have read.  But I have
> 
> seen
> 
>>it from several different sources, so I took it as truth.  Do you have
>>benchmarks to prove otherwise?
> 
> 
> It could be the sources you read are outdated.  I don't question their
> accuracy at the time they came out, although I don't even know what
> sources you're talking about (and it doesn't matter).
> 
> Just for kicks, even though I've done this many times in the past for
> in-house purposes, I just did a simple benchmark so that people don't
> blindly accept X year old sources regarding tomcat performance.
> 
> - Server hardware: Solaris 8, specifically from uname -a: SunOS 5.8
> Generic_108528-15 sun4u sparc SUNW,Ultra-5_10.  It has 512MB RAM.
> 
> - Tomcat version: 4.1.27-LE
> 
> - Apache version: 2.0.47, compiled on above platform
> 
> - JDK version: 1.4.2, with no switches at all, i.e. client mode with no
> special heap of GC settings (yes, I know I could improve performance for
> tomcat by tuning these).
> 
> - Server.xml setup: nearly exactly the same as unpacked distribution.  I
> just removed unneeded connectors, leaving only the port 8080 connector.
> Yes, I know I could improve performance by modifying min/maxProcessors,
> etc.
> 
> - httpd.conf setup: nearly exactly the same as unpacked distrubition.  I
> just changed the listen port from 80 to 8080 so that I could use the
> exact same JMeter test plan.  Yes, I know there are many things I can
> tune here to increase performance.
> 
> - Test file: a simple test.html file, static, simple content.  In fact
> it's so small I'll include the whole thing:
> <html><head><title>Test page</title></head><body>This is a test
> page</body></html>
> 
> - Test program: Apache JMeter 1.9 final running on Windows2000 Pro, with
> JDK 1.4.2.
> - Test plan tree:
> Test Plan
>   -> Thread Group: 10 threads, 1sec ramp-up, 100 loops
>      -> HTTP Request: GET, myhost, port 8080, /test.html
>      -> Graph Results (with file output)
> 
> - Findings:
> Server #of Samples Average Deviation Median
> Apache   1000       17ms    25        10
> Tomcat   1000       29ms    44        10     
> 
> For both servers, CPU usage was light, and memory wasn't taxed much at
> all.
> 
> So what does that say?  Apache is faster by about 70% on average
> ((29-17)/17) at serving this small text file, with both servers very
> close to their out of the box configuration.
> 
> Out of curiosity, I tried the test again with a larger text file: 30K or
> so in size.  The results then were:
> Server #of Samples Average Deviation Median
> Apache   1000       182ms   277       90
> Tomcat   1000       185ms   249       80
> 
> So now tomcat is faster? ;)
> 
> We could debate forever about whether it's representative of real-world
> conditions, whether care should be taken to configure the server for
> optimal performance, etc.  That's why everyone can and should run their
> own benchmarks for their own applications.
> 
> With the above information anyone could easily reproduce the test.  My
> point, however, is not that tomcat is faster or that apache is faster.
> My point is that it's easy to test performance and that you shouldn't
> trust sources, especially if they don't directly apply to your
> platform/server/application.
> 
> Yoav Shapira
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat vs. Apache Performance Comparison for static HTML

Posted by John Turner <to...@johnturner.com>.
Nice.  I'm bookmarking this post for the future.  'Nuf said.  Thanks, Yoav!

John

Shapira, Yoav wrote:

> Howdy,
> 
> 
>>Of course not.  I'm only regergitating stuff I have read.  But I have
> 
> seen
> 
>>it from several different sources, so I took it as truth.  Do you have
>>benchmarks to prove otherwise?
> 
> 
> It could be the sources you read are outdated.  I don't question their
> accuracy at the time they came out, although I don't even know what
> sources you're talking about (and it doesn't matter).
> 
> Just for kicks, even though I've done this many times in the past for
> in-house purposes, I just did a simple benchmark so that people don't
> blindly accept X year old sources regarding tomcat performance.
> 
> - Server hardware: Solaris 8, specifically from uname -a: SunOS 5.8
> Generic_108528-15 sun4u sparc SUNW,Ultra-5_10.  It has 512MB RAM.
> 
> - Tomcat version: 4.1.27-LE
> 
> - Apache version: 2.0.47, compiled on above platform
> 
> - JDK version: 1.4.2, with no switches at all, i.e. client mode with no
> special heap of GC settings (yes, I know I could improve performance for
> tomcat by tuning these).
> 
> - Server.xml setup: nearly exactly the same as unpacked distribution.  I
> just removed unneeded connectors, leaving only the port 8080 connector.
> Yes, I know I could improve performance by modifying min/maxProcessors,
> etc.
> 
> - httpd.conf setup: nearly exactly the same as unpacked distrubition.  I
> just changed the listen port from 80 to 8080 so that I could use the
> exact same JMeter test plan.  Yes, I know there are many things I can
> tune here to increase performance.
> 
> - Test file: a simple test.html file, static, simple content.  In fact
> it's so small I'll include the whole thing:
> <html><head><title>Test page</title></head><body>This is a test
> page</body></html>
> 
> - Test program: Apache JMeter 1.9 final running on Windows2000 Pro, with
> JDK 1.4.2.
> - Test plan tree:
> Test Plan
>   -> Thread Group: 10 threads, 1sec ramp-up, 100 loops
>      -> HTTP Request: GET, myhost, port 8080, /test.html
>      -> Graph Results (with file output)
> 
> - Findings:
> Server #of Samples Average Deviation Median
> Apache   1000       17ms    25        10
> Tomcat   1000       29ms    44        10     
> 
> For both servers, CPU usage was light, and memory wasn't taxed much at
> all.
> 
> So what does that say?  Apache is faster by about 70% on average
> ((29-17)/17) at serving this small text file, with both servers very
> close to their out of the box configuration.
> 
> Out of curiosity, I tried the test again with a larger text file: 30K or
> so in size.  The results then were:
> Server #of Samples Average Deviation Median
> Apache   1000       182ms   277       90
> Tomcat   1000       185ms   249       80
> 
> So now tomcat is faster? ;)
> 
> We could debate forever about whether it's representative of real-world
> conditions, whether care should be taken to configure the server for
> optimal performance, etc.  That's why everyone can and should run their
> own benchmarks for their own applications.
> 
> With the above information anyone could easily reproduce the test.  My
> point, however, is not that tomcat is faster or that apache is faster.
> My point is that it's easy to test performance and that you shouldn't
> trust sources, especially if they don't directly apply to your
> platform/server/application.
> 
> Yoav Shapira
> 
> 
> 
> This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat vs. Apache Performance Comparison for static HTML

Posted by Rick Roberts <te...@ait-web.com>.
Very interesting.  Thanks for making the effort and sharing your results.


-- 
*******************************************
* Rick Roberts                            *
* Advanced Information Technologies, Inc. *
* http://www.ait-web.com                  *
*******************************************

Shapira, Yoav wrote:
> Howdy,
> 
> 
>>Of course not.  I'm only regergitating stuff I have read.  But I have
> 
> seen
> 
>>it from several different sources, so I took it as truth.  Do you have
>>benchmarks to prove otherwise?
> 
> 
> It could be the sources you read are outdated.  I don't question their
> accuracy at the time they came out, although I don't even know what
> sources you're talking about (and it doesn't matter).
> 
> Just for kicks, even though I've done this many times in the past for
> in-house purposes, I just did a simple benchmark so that people don't
> blindly accept X year old sources regarding tomcat performance.
> 
> - Server hardware: Solaris 8, specifically from uname -a: SunOS 5.8
> Generic_108528-15 sun4u sparc SUNW,Ultra-5_10.  It has 512MB RAM.
> 
> - Tomcat version: 4.1.27-LE
> 
> - Apache version: 2.0.47, compiled on above platform
> 
> - JDK version: 1.4.2, with no switches at all, i.e. client mode with no
> special heap of GC settings (yes, I know I could improve performance for
> tomcat by tuning these).
> 
> - Server.xml setup: nearly exactly the same as unpacked distribution.  I
> just removed unneeded connectors, leaving only the port 8080 connector.
> Yes, I know I could improve performance by modifying min/maxProcessors,
> etc.
> 
> - httpd.conf setup: nearly exactly the same as unpacked distrubition.  I
> just changed the listen port from 80 to 8080 so that I could use the
> exact same JMeter test plan.  Yes, I know there are many things I can
> tune here to increase performance.
> 
> - Test file: a simple test.html file, static, simple content.  In fact
> it's so small I'll include the whole thing:
> <html><head><title>Test page</title></head><body>This is a test
> page</body></html>
> 
> - Test program: Apache JMeter 1.9 final running on Windows2000 Pro, with
> JDK 1.4.2.
> - Test plan tree:
> Test Plan
>   -> Thread Group: 10 threads, 1sec ramp-up, 100 loops
>      -> HTTP Request: GET, myhost, port 8080, /test.html
>      -> Graph Results (with file output)
> 
> - Findings:
> Server #of Samples Average Deviation Median
> Apache   1000       17ms    25        10
> Tomcat   1000       29ms    44        10     
> 
> For both servers, CPU usage was light, and memory wasn't taxed much at
> all.
> 
> So what does that say?  Apache is faster by about 70% on average
> ((29-17)/17) at serving this small text file, with both servers very
> close to their out of the box configuration.
> 
> Out of curiosity, I tried the test again with a larger text file: 30K or
> so in size.  The results then were:
> Server #of Samples Average Deviation Median
> Apache   1000       182ms   277       90
> Tomcat   1000       185ms   249       80
> 
> So now tomcat is faster? ;)
> 
> We could debate forever about whether it's representative of real-world
> conditions, whether care should be taken to configure the server for
> optimal performance, etc.  That's why everyone can and should run their
> own benchmarks for their own applications.
> 
> With the above information anyone could easily reproduce the test.  My
> point, however, is not that tomcat is faster or that apache is faster.
> My point is that it's easy to test performance and that you shouldn't
> trust sources, especially if they don't directly apply to your
> platform/server/application.
> 
> Yoav Shapira
>