Managing high garbage collection (GC) overhead in Jira Data Center

GC Overhead measures the percentage of time Jira spends performing garbage collection activities. Garbage collection is the process of automatically reclaiming memory by identifying and disposing of objects that are no longer in use by the application. This metric measures the proportion of execution time spent on memory management. A high percentage indicates inefficient memory usage, potentially causing increased latency and reduced throughput, while a low percentage suggests optimal application performance.

Thresholds:

Optimal

Equal to or Less than 5% of time spent in GC

Requires attention

Between 5% and 10% of time spent in GC

Needs attention

Greater than 10% of time spent in GC


How does high GC overhead affect Jira Data Center performance

High GC Overhead can significantly impact your Jira Data Center instance in several ways:

  • Increased response times for user actions

  • Reduced system throughput, affecting issue creation, updates, and search operations

  • Potential inconsistencies in performance across cluster nodes

  • Decreased capacity to handle concurrent users and requests

  • Possible application pauses or "stop-the-world" events during major GC operations

Refer to the Garbage Collection (GC) Tuning Guide for more details

What's the recommendation?

You should aim to keep the GC Overhead below 5% for optimal performance. If you're consistently exceeding 10%, consider the following actions:

  • Monitor nodes and optimize heap size configuration

  • Analyze and tune garbage collection

  • Optimize memory usage

  • Configure automatic heap dumps

Monitor nodes and optimize heap size configuration

Monitor node performance

Regular monitoring of your Jira nodes is crucial for identifying and addressing GC issues:

  1. Access Jira Administration > System > Clustering.

  2. Check the Memory and Load columns for each node.

  3. Identify nodes with consistently high memory usage or load.

  4. Consider restarting problematic nodes if necessary.

This step helps in isolating issues to specific nodes and can prevent cluster-wide performance degradation. Learn more about Jira cluster monitoring

Optimize heap size

Proper heap size configuration is crucial for efficient garbage collection in Jira Data Center.

Reviewing current heap settings:

  1. Check the current heap size settings for each node in your cluster

  2. Ensure consistency across all nodes

Adjusting heap size:

  1. Consider increasing heap size if your current settings are too low

  2. Follow the guidelines for increasing Jira application memory

  3. Avoid heap sizes between 32GB and 47GB due to Compressed OOPs limitations

Remember to test any heap size changes in a staging environment before applying to production.

Analyze and tune garbage collection

Understanding and optimizing your garbage collection process can significantly reduce GC overhead.

Reviewing GC logs:

  1. Enable GC logging if not already active

  2. Analyze GC logs to identify patterns of frequent or long-running collections

Tuning GC parameters:

  1. Consider implementing the G1 garbage collector for large heaps (>4GB)

  2. Adjust GC algorithm parameters based on your Jira usage patterns

  3. Monitor the impact of changes on GC overhead and overall application performance

Refer to the Garbage Collection (GC) Tuning Guide for more details

Optimize memory usage

Efficient memory usage can significantly reduce GC overhead:

  1. Investigate memory-intensive operations in your Jira instance.

  2. Review and optimize custom apps, workflows, or scripts that create a large number of objects.

  3. Consider removing or optimizing unused customizations that may be contributing to memory pressure.

  4. Monitor the impact of plugins on memory usage and consider disabling or replacing memory-intensive plugins.

Regular performance reviews and optimization can help prevent GC issues from developing over time.

Configure automatic heap dumps

Heap dumps can provide valuable insights into memory usage and potential memory leaks.

Setting up automatic heap dumps:

  1. Add the following JVM properties to your Jira configuration:
Setting up automatic heap dumps:
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path/to/your/heapdump/directory

       2. Ensure the specified directory has sufficient disk space to store heap dumps

Learn to analyze out of memory errors with heap dumps

Remember to implement these changes consistently across all nodes in your Jira Data Center cluster. Regularly monitor GC overhead and performance metrics to ensure optimal performance and to catch any issues early.

Create Support Ticket

If you've implemented the recommended actions and are still experiencing high GC overhead, it may be time to seek additional support from Atlassian.

To gather relevant data:

  1. Collect GC logs from all nodes in your cluster

  2. Gather any heap dumps generated during high GC overhead periods

  3. Compile performance metrics and any relevant system logs

Create support ticket:

  1. Create a new support ticket

  2. Attach the latest support zip containing all collected data

  3. Follow the guidance provided in Troubleshoot Jira Server performance with GC logs for preparing your support request


Last modified on Jan 23, 2025

Was this helpful?

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