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.
Hello!
We can use these configurations independent of our JVM_MINIMUM_MEMORY and JVM_MAXIMUM_MEMORY in setenv.sh?
Thanks!
Best regards,
Rodrigo Kondo
LikeLiked by 1 person
You can remove from params the part of the size memory (-Xms32G -Xmx32G) and set as usual in the setenv.sh this part
LikeLike
If we don’t remove the params of the size memory (-Xms32G -Xmx32G), does this sets my JVM to 32G?
LikeLike
Depends of the JVM version, because then you are duplicating Java runtime params. See this post: https://stackoverflow.com/questions/2740725/duplicated-java-runtime-options-what-is-the-order-of-preference
LikeLike
What configurations would you recommend for a large JIRA instance?
Our server has 128GB of memory and 2 deca-core CPU.
LikeLike
number of concurrent users? num of Projects, issues and customfields?
LikeLike
Concurrent users: ~2000
Projects: 434
Issues: ~1500000
Custom fields: 370
LikeLike
We also have eazyBI installed in our JIRA as an add-on with 20GB in its JVM.
LikeLike
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
LikeLike
So in JVM_MINIMUM_MEMORY and JVM_MAXIMUM_MEMORY you are using 16384m ?
I’m gonna try to use this same configuration too.
Thanks!
LikeLiked by 1 person
Yes try and let me know
LikeLike
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!
LikeLike
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?
Thanks!
Rodrigo Kondo
LikeLike
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.
LikeLike
OK otherwise you can try with the GC CMS (is faster, but has a little stops sometimes). Best regards… each server is different
LikeLike
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%” 🙂
LikeLike
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) ?
LikeLike
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
LikeLike
We should change the SurvivorRatio to less or more?
We are on JIRA 7.3.0 by the way.
LikeLike
See this doc https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/sizing.html
LikeLike