tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Tomcat 4.1 slower than Tomcat 3.3
Date Wed, 02 Apr 2003 17:02:58 GMT

Howdy,

>Is Tomcat 4 slower than Tomcat 3?

Too broad of a question to answer, although in general I'd say no,
tomcat4 is faster and has been faster for every app I've benchmarked.

But from the rest of your email, your question isn't about speed, it's
about CPU usage.

>I've recently tried to port my Tomcat 3.3 webapp to Tomcat 4.1. It's
the

Just to make sure: it's also the same JDK on the same hardware, right?

>Example: at peak load, one of our Tomcat 3.3 servers served 20,000 page
>impressions in an hour, at an average %usr CPU of 60%. Using Tomcat
4.1, we
>can only serve about 7,000 pages if we down-weight it so that it is at
60%.

Define down-weight.  What is the "un-down-weighed" number and CPU usage?

>We have tried profiling the app using hprof and these are the results:
>Method                             Tomcat 3    Tomcat 4
>java.net.URLEncoder.encode         33.62%      22.60%
>java.net.SocketInputStream.read    14.15%      18.77%
>java.net.SocketOutputStream.write   1.87%       3.47%

Total for tomcat 3 of above: 49.64%
Total for tomcat 4 of above: 44.84%

So tomcat 4 is spending less total time in these three methods, and
significantly less time in the URLEncoder, but more time in read and
write. 

>this particular test, T4.1 used about 1.5 times the CPU that T3.3 used.

Umm, how is 33.62% in tomcat3 as opposed to 22.60% in tomcat4 1.5 times?
It's 50% less time spent by tomcat4.

>- Experimented with numerous JVM settings: -server -d64 -Xmn256mb
-Xmx384mb
>-Xconcurrentio (no effect)

Did you use any runtime options at all in tomcat 3.3 server?  Or did it
just run with the default 64MB on the heap?

Have you tried a more powerful / easy to use profiler like OptimizeIt
and JProbe to see what really going on?

>I don't have any more ideas how to fix it; instead I am clutching at
straws

What are you trying to fix?  Is the response speed a problem, or it is
the increased CPU usage to process the same number of requests?

>- Disabling socket keepalive in Apache.

This is an interesting option.

>Until we can fix this, we are sticking with Tomcat 3.3, which has so
far
>been stable, fast and robust (except for allowing sessions between
https
>and http).

Good to know ;)  Is there an overriding reason that's making you upgrade
to tomcat 4.x at all?

Yoav Shapira
Millennium ChemInformatics



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


Mime
View raw message