confluence garbage collection and Optimization

Paul DeSousa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2015

Hi Conf Admins,

I am preparing our site for the new 5.7.3 upgrade and began investigating my setenv.sh 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: 

-XX:+OptimizeStringConcat

Does that help with latency?  Should I add that?

Thanks in advance,

Robert

 

3 answers

1 accepted

1 vote
Answer accepted
Rodrigo Girardi Adami
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 16, 2015

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!

Cheers,

Rodrigo

2 votes
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 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.

0 votes
Mike Rathwell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 21, 2015

Robert,

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
TAGS
AUG Leaders

Atlassian Community Events