I've been using tomcat for many years but unfortunately I'm stuck on
version 7 (long story).  I recently picked up a new workstation, an Apple
M1 MacBook (M1 Max - macOS 12.1), and I installed the ARM version of Azul
Zulu (1.8.0_312), and by all accounts everything is really fast, as you'd
expect.  A compile that took about 3.5 minutes on a 2016 x86 MacBook now
takes about 50 seconds on ARM.

However, deploying web applications (context deploy via web service) is
much slower compared to x86.  One app used to take about 3-4 seconds and
the other near instantaneous are now taking 42 and 11 seconds,
respectively, and very consistently.  The same is true for tomcat restarts
when the custom apps are registered.  Without any custom apps tomcat starts
in under one second.  App reloads are a bit faster than deploy, but still
very slow compared to x86.  The only thing different I can tell is the
workstation (and thus, architecture).

I started on Tomcat version 7.0.109 (newest at the time), but reverted to a
known working 7.0.76 thinking it might be the issue, but nothing changed,
i.e., still noticing the huge delay during deployment, down to the same
amount of delay time.

The only noticeable issue in the logs is this line:

> At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug
logging for this logger for a complete list of JARs that were scanned but
no TLDs were found in them.

This was also in the x86 logs that I never addressed, so I think it's a red
herring; however, when monitoring the logs after a deploy, that is the last
line printed before it idles for 10-40 seconds.  Also, the application with
more jar files is the one that takes longer to start, so I thought I'd
investigate.

I started by adding this to 'logging.properties'

    org.apache.jasper.compiler.TldLocationsCache.level = FINE

But nothing new was printed, even when setting to FINEST.  Researching
around, and reading 'catalina.properties', I added all of the jars from the
web application to this property:

    org.apache.catalina.startup.TldConfig.jarsToSkip=...

And the TLD warning went away, but the long multi-second pause persisted.
Searching around more, I came across this document:

    https://cwiki.apache.org/confluence/display/TOMCAT/HowTo+FasterStartUp

I had already added the entropy fix to my startup script (and I don't see
any SecureRandom warnings in the logs):

    -Djava.security.egd=file:/dev/./urandom

So that doesn't appear to be related to my issue.

As I said, my config is now exactly the same as it was on x86, so anything
new I try from here is just completely guessing.  I'm hoping somebody has
an idea so I can stop guessing.

Please let me know if there's any information that would help, but I tried
to provide all of the relevant details I know of.

Thanks!

Robert

Reply via email to