Permanent Generation Memory Usage

Stephen Gurnick
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 29, 2014

I am running Confluence 4.3.3 (java version "1.6.0_26") with the following JVM memory parameters:

-Xms256m -Xmx2048m -XX:MaxPermSize=256m

My System Information -> Java JVM Memory Statistics typically looks like this:

I am satisfied (so far) with the Heap Size and overall system performance.

However, my concern is with the high usage of Permanent Generation Memory. I have not experiened any crashes or OutOfMemoryErrors (yet) and I'm hoping to keep it that way.

In reading knowledge base articles here and here, (and other general JVM memory usage articles) I gained a basic understanding of how PermGen memory is used (for loaded class files) and sometimes associated with plug-ins. I do not believe I'm using an inordinate number of plug-ins.

I have not been able to find a way to determine why the PermGen memory usage is so high and almost at its limit.

Are there any procedures available that I can use to find out what is the cause of such high PermGen usage? Are there strategies specifically for tuning the allocation of PermGen memory? Could this be a garbage collection issue?

Thank you for your help pointing me in the right direction.

2 answers

1 accepted

0 votes
Answer accepted
Stephen Gurnick
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.
May 5, 2014

To remedy my issue of almost running out of PermGen memory in my Confluence instance, I increased it from the default 256MB to 512MB in setenv.sh

-XX:MaxPermSize=512m

Also I set the heap memory min and max value to 2048MB

-Xms2048m -Xmx2048m

Setting this to the same value is based on the recommendation from here.

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 29, 2014

Hello Stephen,

you can install https://marketplace.atlassian.com/plugins/net.bull.javamelodyplugin. Btw, I suggest you to increase your perm gem memory just editing JIRA-INST/bin/setenv.sh file.

Hope this helps,

Fabio

Stephen Gurnick
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 29, 2014

Thank you, Fabio, for this plug-in suggestion. I'll take a look at it.

With regard to increasing the PermGen allocation, I'm aware of the procedure for doing that, however I'd like to understand why so much is being used so that I can increase it to the appropriate level - if necessary. I imagine that if there is some issue our system is experiencing (e.g. garbage collection issue) then increasing it may simply mask the issue for a short time until I'm in the same situation agian.

Are there methods to determining what is being stored in PermGen and if it is being cleaned-up appropriately? I understand the situation may be that everything is working fine and I just need to increase the memory, but at this point I have no way of determining that.

Thanks again.

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 30, 2014

Hi Stephen,

The most common is that the addition of more plugins contributes to more consumption of PermGen space. The error occurs when enough classes are invoked. Moreover, if you use scripts into your JIRA instance they could affect PermGem space.

It could also happen if you try and run multiple Atlassian applications in a single Tomcat container.

Hope this helps,

Fabio

Stephen Gurnick
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 30, 2014

Fabio,

This is with regard to my Confluence system, not JIRA, however I imagine with respect to PermGen memory usage there shouldn't be too much of a difference.

I haven't experienced any errors yet and I'm looking for ways to prevent any issues, especially since I'm so close to the memory threshold.

Thank you for your suggestions, but unfortunately they don't seem to apply to my Conlfuence environment.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events