tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From delbd <de...@oma.be>
Subject Re: high cpu usage during xslt processing (resending)
Date Thu, 09 Jun 2005 08:35:19 GMT
Dunno for windows, but CPU usage for tomcat on linux is always 100% of 
available CPU time when serving any kind of request. This is the case for any 
application (tomcat or other) because this is the way process management is 
done in the OS (any application get 100% CPU when requesting it if the 
application is the only one to request CPU). Of course if i run 2 
applications and ask them both do do calculations at the same time, they will 
each use 50% CPU (100% each if you have multiprocessor). If i change the 
priority of one of those applications if might get something like 20% for one 
and 80% for the other one. 

So the question is not how much cpu time is used (if i use 100% that means it 
uses all available cpu, which is good because it use everything it can to 
server the request as fat as possible), but the question might rather be to 
know if serving 15 xsl pages simultaneously on tomcat is significantly slower  
than serving the same 15 pages on jrun

Anyway if all you want is have tomcat not slow down other service you might 
have, just lower it's process priority (using windows tools provided and i 
don't know about)


Le Jeudi 9 Juin 2005 09:51, kamal r a écrit :
> (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 =
> TransformerFactory.newInstance();
>     StreamSource source = new StreamSource(new
> FileInputStream("test.xsl"));
>     Templates pss = factory.newTemplates(source);
>     Transformer transformer = pss.newTransformer();
>     ByteArrayInputStream temp = new
> ByteArrayInputStream("<xml></xml>".getBytes());
>     source = new StreamSource(temp);
>     StreamResult result = 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

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
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


Mime
View raw message