confluence garbage collection and Optimization

Hi Conf Admins,

I am preparing our site for the new 5.7.3 upgrade and began investigating my CAT opts that are passed and noticed that I have a lot for GC:

CATALINA_OPTS="$CATALINA_OPTS -Xloggc:$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M"
CATALINA_OPTS="$CATALINA_OPTS -XX:-PrintGCDetails -XX:+PrintGCTimeStamps -XX:-PrintTenuringDistribution"

If I was debugging GC the above would make sense, but since we are stable, should I remove all the GC logging information?  Would this help performance at all?    What would the side effects be if I remove the above two lines or just the last one at least?

Also Does anyone know about this parm: 


Does that help with latency?  Should I add that?

Thanks in advance,



3 answers

1 accepted

1 vote
Accepted answer

Hi Robert,

I have not tried to remove those parameters yet, but they are just to log the GC activity of the JVM. This is particularly helpful when you have memory/performance issues. You are not going to have a huge increase of performance if you remove those parameters or comment them.

My recommendation is to keep them as it is, unless you really want to fine tune and gain a very small improvement.

As for the OptimizeStringConcat parameter, according to here it seems that:

It recognizes pattern like new StringBuilder().append(...).toString()
with ... being a String, a char or an int (it doesn't seem to recognize 
if it's an Object)
and tries to create the corresponding String once.

I hope this helps!



2 votes
Davin Studer Community Champion Apr 16, 2015

I had a GC issue recently and after it was resolved I asked the same question. The support rep recommended just leaving them there as the performance impact was negligible and if in the future another issue arose the logs would already be there.


Curiously enough, I also was starting to look at GC to try to get rid of some "stop the world" events I was seeing on Confluence 5.7 running on a Windows 2012r2 server (yes, I have reasons for running it there; some of them good). I was even at the point where I was thinking I was going to have to put it back on Ubuntu 14.04 to get some speed (or at least consistency) back out of Confluence.

I did the update to 5.7.3 and... wow. Smoking fast. The good people at Atlassian seem to have solved some performance issues (and some were implied when looking at the issues resolved with this release). 

Short answer to that thought now: I'm just not mucking about with it. It runs great.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

783 views 33 5
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you