Here is a description of what I'm seeing. Please let me know if additional information would
I've hit at least two multicore scalability issues in the Resin framework regarding JSP
compilation. Relevant source code below. These snippets are from 3.0.24, which is currently
what our customer is using.
The first is for classes that are not precompiled; the JavaCompiler compile and batch compile
methods do their work under a big synchronized block. This means that when multiple clients
hit pages which need to be compiled, only one gets worked on at a time. I discovered this
during experimentation while trying to reproduce the customer problem in our lab with a
The actual customer problem I was trying to reproduce is with MakeContainer.java. Here, a big
global lock triggers a lock-caravan of threads piling up to enter the synchronized make method.
Make is implemented by CompilingLoader, which does an expensive and recursive (and therefore
potentially unbounded) call to findAllModifiedClasses() within the global lock.
The effect of the above is to force all compiling and evaluation of whether compiling is necessary
on one core, leaving N-1 cores (where N is hundreds on an Azul system) idle and blocked on the