Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 6566 invoked from network); 9 Jun 2005 08:34:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Jun 2005 08:34:43 -0000 Received: (qmail 60722 invoked by uid 500); 9 Jun 2005 08:34:27 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 60708 invoked by uid 500); 9 Jun 2005 08:34:27 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 60686 invoked by uid 99); 9 Jun 2005 08:34:27 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of David.Delbecq@oma.be designates 193.190.231.71 as permitted sender) Received: from bonnie.oma.be (HELO bonnie.oma.be) (193.190.231.71) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 09 Jun 2005 01:34:25 -0700 Received: from CAL-12.oma.be (bonnie.oma.be [193.190.231.71]) by bonnie.oma.be (8.11.1 (Revision 1.5) /8.11.1) with ESMTP id j598Y3223104 for ; Thu, 9 Jun 2005 08:34:03 GMT From: delbd Organization: Institut Royal =?iso-8859-1?q?M=E9t=E9orologique?= To: "Tomcat Users List" Subject: Re: high cpu usage during xslt processing (resending) Date: Thu, 9 Jun 2005 10:35:19 +0200 User-Agent: KMail/1.7.2 References: <20050609075139.45506.qmail@web40707.mail.yahoo.com> In-Reply-To: <20050609075139.45506.qmail@web40707.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200506091035.19204.delbd@oma.be> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dunno for windows, but CPU usage for tomcat on linux is always 100% of=20 available CPU time when serving any kind of request. This is the case for a= ny=20 application (tomcat or other) because this is the way process management is= =20 done in the OS (any application get 100% CPU when requesting it if the=20 application is the only one to request CPU). Of course if i run 2=20 applications and ask them both do do calculations at the same time, they wi= ll=20 each use 50% CPU (100% each if you have multiprocessor). If i change the=20 priority of one of those applications if might get something like 20% for o= ne=20 and 80% for the other one.=20 So the question is not how much cpu time is used (if i use 100% that means = it=20 uses all available cpu, which is good because it use everything it can to=20 server the request as fat as possible), but the question might rather be to= =20 know if serving 15 xsl pages simultaneously on tomcat is significantly slow= er =20 than serving the same 15 pages on jrun Anyway if all you want is have tomcat not slow down other service you might= =20 have, just lower it's process priority (using windows tools provided and i= =20 don't know about) Le Jeudi 9 Juin 2005 09:51, kamal r a =E9crit : > (Resending as earlier mail had bounced) > Recently we have migrated our application from > jrun3.1 to tomcat 4.1.31 running on windows 2000 > advanced server. It uses saxon 6.5.3 for xslt > processing and the cpu usage is almost 100% even for > 15 concurrent users. So in order to do a simple load > test on the xslt part alone, I wrote a test jsp and > the cpu usage is almost 100% for 15 concurrent users > for a xsl file 106kb in size. > XSLTTest.jsp > TransformerFactory factory =3D > TransformerFactory.newInstance(); > StreamSource source =3D new StreamSource(new > FileInputStream("test.xsl")); > Templates pss =3D factory.newTemplates(source); > Transformer transformer =3D pss.newTransformer(); > ByteArrayInputStream temp =3D new > ByteArrayInputStream("".getBytes()); > source =3D new StreamSource(temp); > StreamResult result =3D new > StreamResult(response.getOutputStream()); > transformer.transform(source, result); > > The cpu usage is at 60% for the same jsp page on the > jrun 3.1 server. Can anybody provide me with pointers > to reduce cpu usage or has anyone who has faced a > similar scenario. > Please let me know if I need to provide more inputs > as this is my first mail to the list. > > Thanks > Kamal > > Send instant messages to your online friends http://uk.messenger.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org =2D-=20 David Delbecq Royal Meteorological Institute of Belgium =2D Is there life after /sbin/halt -p? --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org