tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rhuberg,Anthony" <Anthony.Rhub...@Cerner.com.INVALID>
Subject RE: Performance test with Tomcat 9 shows increased cpu/disk usage because of repeated opening/closing of jars in WEB-INF/lib
Date Fri, 11 Oct 2019 12:50:08 GMT
We continue to profile our application and have found instances of using TransformerFactory.newInstance().

The more concerning problem is third party dependencies that do this or something similar
we could not fix.

Jar modified times are not changing - I did not mean to state or otherwise imply that.

-----Original Message-----
From: John.E.Gregg@wellsfargo.com.INVALID <John.E.Gregg@wellsfargo.com.INVALID>
Sent: Thursday, October 10, 2019 6:54 PM
To: users@tomcat.apache.org
Subject: RE: Performance test with Tomcat 9 shows increased cpu/disk usage because of repeated
opening/closing of jars in WEB-INF/lib

Tony,


> -----Original Message-----
> From: Rhuberg,Anthony <Anthony.Rhuberg@Cerner.com.INVALID>
> Sent: Thursday, October 10, 2019 5:22 PM
> To: Tomcat Users List <users@tomcat.apache.org>
> Subject: RE: Performance test with Tomcat 9 shows increased cpu/disk
> usage because of repeated opening/closing of jars in WEB-INF/lib
>
> We are still investigating what specific classloader reads that would
> trigger the repeated reload of the web-inf/lib/*.jars.
>
> One example we found is the use of
> javax.xml.transform.TransformerFactory.newInstance(). One of its
> features is to determine the implementation by searching for the
> configuration specified by
> META-INF/services/javax.xml.transform.TransformerFactory in jars available to the runtime.
>

Yep.  I was wondering about that.  I have no idea why this behavior would be different in
Tomcat 9, though.  Did you change Java versions also?  Is the classpath longer?

I also have no idea about the jar modification date changes that you're seeing.

I do have first-hand experience with the performance of TransformerFactory.newInstance().
 In general, anything that uses the service locator under the covers, such as TransformerFactory,
DocumentBuilderFactory, etc, should be reused if possible.  Those XML factories are thread
safe, though the things created by the factories are typically not thread safe.  You should
create it once, configure it once, and use it as many times as necessary.  For example, you
would create one TransformerFactory, then call newTransformer() as many times as necessary.

John
B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  X  ܚX KK[XZ[
 \ \  ][  X  ܚX P X ]
 \X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
 \ \  Z[ X ]
 \X K ܙ B


CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation
and are intended only for the addressee. The information contained in this message is confidential
and may constitute inside or non-public information under international, federal, or state
securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such
information is strictly prohibited and may be unlawful. If you are not the addressee, please
promptly delete this message and notify the sender of the delivery error by e-mail or you
may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.

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

Mime
View raw message