Implementing the OpenJ9 shared class cache for applications in containers

The Eclipse OpenJ9 shared class cache (SCC) enables the VM to store Java™ classes, JIT compiled code, and profiling data in an optimized form that can load quickly. Multiple VMs can share the SCC, which reduces total memory consumption.

WebSphere® Liberty container images contain an SCC and (by default) add your application's specific data to the SCC at image build time when your Dockerfile runs the RUN configure.sh command.

Some content in the SCC is sensitive to heap geometry. If you change the heap geometry after the SCC is created, server restarts can result in fluctuations in start-up performance and such content not being used. Specifying a smaller -Xmx value increases the chances of obtaining a heap geometry that is compatible with the AOT code.

To control this feature, use the following variable:

OPENJ9_SCC (environment variable)
If true, cache application-specific data in an SCC and include it in the image. A new SCC is created if needed, otherwise data are added to the existing SCC. The default value is true.