The following example JVM settings are recommended for most production servers (JIRA works better as standalone installation):

-server -Xms24G -Xmx24G -XX:PermSize=512m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70

For production replica servers (test environments), use the example settings:

-server -Xms4G -Xmx4G -XX:PermSize=512m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70

For standalone installations (recommended in JIRA large installations), use the example settings:

-server -Xms32G -Xmx32G -XX:PermSize=512m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70

The above options have the following effect:

  • -Xms, -Xmx: Places boundaries on the heap size to increase the predictability of garbage collection. The heap size is limited in replica servers so that even Full GCs do not trigger SIP retransmissions. -Xms sets the starting size to prevent pauses caused by heap expansion.
  • -XX:+UseG1GC: Use the Garbage First (G1) Collector.
  • -XX:MaxGCPauseMillis: Sets a target for the maximum GC pause time. This is a soft goal, and the JVM will make its best effort to achieve it.
  • -XX:ParallelGCThreads: Sets the number of threads used during parallel phases of the garbage collectors. The default value varies with the platform on which the JVM is running.
  • -XX:ConcGCThreads: Number of threads concurrent garbage collectors will use. The default value varies with the platform on which the JVM is running.
  • -XX:InitiatingHeapOccupancyPercent: Percentage of the (entire) heap occupancy to start a concurrent GC cycle. GCs that trigger a concurrent GC cycle based on the occupancy of the entire heap and not just one of the generations, including G1, use this option. A value of 0 denotes ‘do constant GC cycles’. The default value is 45.

More info in this tunning GC JIRA Guide

Posted by:.

21 replies on “Tuning JVM Garbage Collector (Best values for JIRA 6 & 7 large instances)

  1. Hello!

    We can use these configurations independent of our JVM_MINIMUM_MEMORY and JVM_MAXIMUM_MEMORY in


    Best regards,
    Rodrigo Kondo

    Liked by 1 person

    1. You can remove from params the part of the size memory (-Xms32G -Xmx32G) and set as usual in the this part


      1. If we don’t remove the params of the size memory (-Xms32G -Xmx32G), does this sets my JVM to 32G?


      2. What configurations would you recommend for a large JIRA instance?
        Our server has 128GB of memory and 2 deca-core CPU.


      1. We have 2000 users and 280 projects and 883 customfields. We are using 16GB for JIRA without any downtime and the performance is good. For EazyBI we are using 16GB in a separated child. For JIRA we use these params: e -Xms16G -Xmx16G -XX:+UseG1GC -XX:NewRatio=2 -XX:SurvivorRatio=8 -XX:MetaspaceSize=1024m -XX:MaxMetaspaceSize=3612m -XX:ReservedCodeCacheSize=512m -XX:InitiatingHeapOccupancyPercent=60 -XX:+UseCodeCacheFlushing -Djira.jelly.on=true

        Hope this solve your doubt


  2. So in JVM_MINIMUM_MEMORY and JVM_MAXIMUM_MEMORY you are using 16384m ?
    I’m gonna try to use this same configuration too.


    Liked by 1 person

      1. Today our configuration is JVM_MINIMUM_MEMORY=”8192m” and JVM_MAXIMUM_MEMORY=”12288m” and we were having lots of downtimes and slowness in JIRA.
        Sou yesterday we tunned the garbage collector suggested here (-server -Xms32G -Xmx32G -XX:PermSize=512m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 -XX:+HeapDumpOnOutOfMemoryError) and we only had to restart JIRA once yesterday… it is a great advance.
        So we’re gonna wait untill have to restart it again to test those configuration you sent us.

        Thanks a lot!


      2. Hi again!

        In this morning we replied the configurations you gave us but we kept the -Xms32G -Xmx32G and also set the JVM min and max to 32G. And untill now it is working great!

        Do you have a description about those parameters that we just set?


        Rodrigo Kondo


      3. We just had to roll back to the first garbage collector tunning (-server -Xms32G -Xmx32G -XX:PermSize=512m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70) because today we had to restart JIRA 4 times, and after changing the GC tunning the slowness stopped.
        I thing that these settings works better for our environment.


      4. OK otherwise you can try with the GC CMS (is faster, but has a little stops sometimes). Best regards… each server is different


  3. All the params are for the tunning of the Garbage Collector (G1GC) with 20 parallel threads, 5 concurrents and when the occupancy of the Heap is about 70% then the collector starts to clean the stack with a max pause in “ms” of 200… I think the trick is the “70%” 🙂


    1. So do you recommend adding the -XX:PermSize=512m XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 in those previous settings you sent (-Xms16G -Xmx16G -XX:+UseG1GC -XX:NewRatio=2 -XX:SurvivorRatio=8 -XX:MetaspaceSize=1024m -XX:MaxMetaspaceSize=3612m -XX:ReservedCodeCacheSize=512m -XX:InitiatingHeapOccupancyPercent=60 -XX:+UseCodeCacheFlushing -Djira.jelly.on=true) ?


      1. Sorry, no.

        If your JIRA >= v.7 then try these params: Xms16G -Xmx16G -XX:+UseG1GC -XX:NewRatio=2 -XX:SurvivorRatio=8 -XX:MetaspaceSize=1024m -XX:MaxMetaspaceSize=3612m -XX:ReservedCodeCacheSize=512m -XX:InitiatingHeapOccupancyPercent=60 -XX:+UseCodeCacheFlushing -Djira.jelly.on=true

        The others are the usual params for Java apps in Server sites:
        XX:PermSize=512m XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70

        If your JIRA goes down eventually try to change the SurvivorRatio


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s