Health Check: JVM Code Cache

Still need help?

The Atlassian Community is here for you.

Ask the community

For Atlassian eyes only

This article is Not Validated and cannot be shared with customers.


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

About the health check

This check verifies that you’re using the recommended JVM (Java Virtual Machine) configuration for code cache memory.

The JVM generates native code and stores it in a memory area called the Code cache.

Insufficient code cache memory can cause the JVM to disable its just-in-time (JIT) compilers, which can have a significant impact on Confluence’s performance.

This code cache is primarily controlled by the ReservedCodeCacheSize property. This property is set to 256 MB by default in the setenv.sh / .bat file. If you have a large Confluence instance, you may need to increase the size.

(info) This health check is only shown if you use Java 1.8 or above.

Understanding the results

IconResultWhat it means
(tick) Pass

Your JVM has enough memory available for the code cache and compilers to run properly.

You're using the recommended configuration. There's currently sufficient memory available for the JVM’s code cache and C1/C2 compilers to run correctly.

(warning) Warning

Your JVM is approaching the limit of memory allocated to code caching.

We recommend increasing the maximum size of the code cache to avoid performance issues.

(warning) Warning

Your JVM code cache memory is below the recommended limit.

We recommend increasing the maximum size of the code cache to avoid performance issues.

Fail (critical)

Your JVM doesn’t have enough free space allocated to code caching. This could be causing performance issues.

The JVM’s code cache has breached its limits and the JVM is very likely to have disabled its C1/C2 compilers.

We recommend increasing the ReservedCodeCacheSize limit to avoid performance issues.


Resolution

If you’ve reached the limit of the code cache, we recommend increasing the ReservedCodeCacheSize property to 384 MB.

To do this, add the following arguments to the Java startup options by following the instructions in Configuring System Properties

-XX:ReservedCodeCacheSize=384m
-XX:+UseCodeCacheFlushing

Restart Confluence for the new settings to take effect.


Last modified on Feb 3, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.