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. It seems users of Tomcat 9 would need to understand the management of the jar resource handles when using the TransformerFactory class - assuming it is triggering the reload of all the related application jars - which if happening enough can cause the high cpu/disk usage as we observed in our performance tests. Thanks -----Original Message----- From: Mark Thomas <ma...@apache.org> Sent: Thursday, October 10, 2019 3:54 AM 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 On 09/10/2019 22:58, Rhuberg,Anthony wrote: > StandardRoot.gc() unconditionally closes the web application jars in Tomcat > 9... every 10s by default or configurable by changing > backgroundProcessorDelay. > > So then the problem is.... Our web application is calling > class.getResourceAsStream() to read some static files... and this is causing > the jars to be read again? It sounds like it. > This was not a problem with Tomcat 7 because the jars were not closed if they > were read within the jarOpenInterval setting? Or that the frequency that the JARs were closed was low enough that the performance impact was not noticed. Mark > > Thanks, > Tony > > -----Original Message----- > From: Mark Thomas <ma...@apache.org> > Sent: Wednesday, October 09, 2019 5:32 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 > > On 09/10/2019 21:03, Rhuberg,Anthony wrote: >> This seems to alleviate the issue... in context.xml (sc-test#sc.xml) >> <Context docBase="${STP_HOME}/app/webapps/Clinicals" >> swallowOutput="true" backgroundProcessorDelay="90"> >> >> Not sure if this is the context reload trigger... i.e. the >> webappLoader.backgroundProcess method is triggered every 90 seconds... > > It isn't. It is StandardRoot.gc() that is unloading the cached JAR entries. > > Mark > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > 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-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org