James,

> -----Original Message-----
> From: James H. H. Lampert <jam...@touchtonecorp.com>
> Sent: Wednesday, June 09, 2021 1:13 PM
> To: Tomcat Users List <users@tomcat.apache.org>
> Subject: Heap allocations when switching from Tomcat 7 to Tomcat 8
> 
> We are beginning to migrate some of our customers from Tomcat 7 to
> Tomcat 8.5.
> 
> Some of them have performance issues even with heap allocations of -
> Xms4096m -Xmx5120m
> 
> Would it be necessary to go even bigger with Tomcat 8.5?
> 
> --
> JHHL
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org

Somewhere after 7.x there was a change to the Tomcat class loader to not cache 
some resources that previously were cached.  My notes say "classes" are no 
longer cached (but maybe other things loaded via getResourceAsStream() are 
still cached.  I don't remember.)  Ordinarily this would result in less heap 
usage (due to a smaller cache) but...

Did you also change from Java 8 to something else, like 11?  One big difference 
there is that the internal JAXB classes are gone.  If you use JAXB, you need to 
include the corresponding external jars.  With external JAXB jars, Tomcat 9 
generates a lot more garbage than 7.

John

Reply via email to