Confluence Performance is very slow
Asked by Young__Hahn:

Hi

I am finalizing testing the Atlassian applications, and noticed that Confluence application's performance is bad.

The version is 5.8.4 which is the newest version..

JIRA, Stash, Crowd is working fine, there are some slowness here and there, but it is normal internet application problem..

However, Confluence is different story.. it works like normal application for few seconds or few minutes, and slow down like I don't want to use it anymore.. Even going into same space, some times it is normal speed but other times, I am just waiting and waiting for the page to load..

I did increased the RAM and CPU just for Confluence and set Confluence memory as highest as possible..

Also did some upgrade on DB.. but still nothing changed..

For example, when I click on "Confluence" once it took 2 seconds to load main page, few times it took 20seconds to load main page... average time is 12seconds.. which is not good at all..

Is it just me having this problem?


Answers:
author: rrudnicki
body: Since Confluence 5.8.x was released, only JAVA 1.8 is supported. So, on JAVA 1.8 you don't have more the MaxPermSize parameter, from now you need to use **MaxMetaspaceSize**

Young, about the slowness, this might be caused for many factors. Please check the following:

1. If there's an antivirus running, please disable this for testing purposes
2. Is this happening in other browsers as well?
3. Are you using Confluence with a proxy? If so, try to by-pass the proxy.
4. The Slowness still happen even if you try to access Confluence directly on the Confluence machine?
5. Do you have any error message on \<confluence-home\>/logs/atlassian-confluence.log when you face the slowness?

Regards,

Renato Rudnicki

comments: author: Jim Bethancourt
body: Specifying MaxMetaspaceSize will specify an upper limit of Metaspace utilization. If MaxMetaspaceSize is not specified, the JVM will use as much Metaspace as it needs


author: Calogero Bonasia
body: try this in the setenv.sh file

```
CATALINA_OPTS="$CATALINA_OPTS -Xms4096m -Xmx8192m -XX:MaxPermSize=1024m -XX:+UseG1GC"
```

```
CATALINA_OPTS="$CATALINA_OPTS -Djava.awt.headless=true"
```

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

```
CATALINA_OPTS="$CATALINA_OPTS -XX:-PrintGCDetails -XX:+PrintGCTimeStamps -XX:-PrintTenuringDistribution"
```

```
export CATALINA_OPTS
```

comments: author: Young__Hahn
body: it does not start when I change my original setenv.sh to what you posted.. (Changed only that part) i am assuming because you have $CATALINA_OPTS inside of "" so I took that out and started.. does that make any difference?


author: Steven F Behnke
body: This is awful advice. Someone should never copy-paste in commands into setenv.sh. They should be very aware of what settings they are setting. Furthermore, that is a huge amount of RAM that you've allocated to Confluence. Is that really necessary? 8GB lol


author: Jens Kasperek (Bosch GmbH)
body: Yes, 8GB are the least you need for very large instances! We have 10GB for our Enterprise instance. However, such parameter needs only to be set if you have a huge mass of active users and performance hungry actions going on.On Conf 5.8.5 we also have performance issues which especially come when trying to rebuild the search index


author: vladkras
body: Really horrible advice. Also wikipedia engine needs 1Gb to serve 100.000 pages, so 8Gb for custom project sounds crazy


author: Gonchik Tsymzhitov
body: [@vladkras](/t5/user/viewprofilepage/user-id/217725) where I can read about 1GB used for 100k pages ?


Tags: confluence-administration

performance