Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 24260 invoked from network); 2 Apr 2003 17:03:23 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 2 Apr 2003 17:03:23 -0000 Received: (qmail 24674 invoked by uid 97); 2 Apr 2003 17:05:14 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 24667 invoked from network); 2 Apr 2003 17:05:13 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 2 Apr 2003 17:05:13 -0000 Received: (qmail 22786 invoked by uid 500); 2 Apr 2003 17:02:57 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 22771 invoked from network); 2 Apr 2003 17:02:57 -0000 Received: from unknown (HELO warhawk.mpi.com) (63.244.250.133) by daedalus.apache.org with SMTP; 2 Apr 2003 17:02:57 -0000 Received: from lightning.mpi.com (lightning.mpi.com [63.244.252.11]) by warhawk.mpi.com (Switch-2.2.6/Switch-2.2.6) with ESMTP id h32H2xI26523 for ; Wed, 2 Apr 2003 12:02:59 -0500 (EST) Received: from US-VS1.corp.mpi.com (us-be1.corp.mpi.com [199.93.195.20]) by lightning.mpi.com (Switch-3.0.4/Switch-3.0.0) with ESMTP id h32H2wUw020253 for ; Wed, 2 Apr 2003 12:02:58 -0500 (EST) X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Tomcat 4.1 slower than Tomcat 3.3 Date: Wed, 2 Apr 2003 12:02:58 -0500 Message-ID: <9C5166762F311146951505C6790A9CF83463E2@US-VS1.corp.mpi.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Tomcat 4.1 slower than Tomcat 3.3 thread-index: AcL5NhFpPE5m1TuURy+n69virmTV6gAAqJIw From: "Shapira, Yoav" To: "Tomcat Users List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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 pa= ge >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 a= t 60%. Define down-weight. What is the "un-down-weighed" number and CPU usag= e? >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 use= d. Umm, how is 33.62% in tomcat3 as opposed to 22.60% in tomcat4 1.5 time= s? 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 i= t 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 upgra= de to tomcat 4.x at all? Yoav Shapira Millennium ChemInformatics This e-mail, including any attachments, is a confidential business com= munication, and may contain information that is confidential, propriet= ary and/or privileged. This e-mail is intended only for the individua= l(s) to whom it is addressed, and may not be saved, copied, printed, d= isclosed or used by anyone else. If you are not the(an) intended reci= pient, 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