Permanent Generation Memory Usage

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

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 vote

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

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.

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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

901 views 23 12
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