0

We are running a Swing App which starts getting very slow after a time and it appears to be due to the fact that the PermGen size as seen in JVisualVM is reducing until eventually the Permgen used is the same as the size.

The Heap size does not appear to be an issue at the corresponding time.

I would Post an image but stackoverflow is stopping this due to my reputation being less than 10.

What the image shows is the Orange line representing the Size being flat for the first 5-10 minutes and then reducing as activity occurs. The Blue line indicating the PermGen used is rising slowly.

I can increase the Initial and Max Permsize and this will probably be used as a work around but I would like to understand why the Permgen size is reducing.

I have included the graph from JVisualVM which indicates the issue.

https://i.stack.imgur.com/v3KqI.jpg

  • 1
    *"I would Post an image.."* If it is relevant, upload it to an image site and provide a link as an [edit to the question](http://stackoverflow.com/posts/30159331/edit) and someone else might embed it. See also [How to create great screenshots?](http://meta.stackexchange.com/q/99734/155831) Please note though, that the text output of tools is far more useful (search engine friendly) and less bytes than a typical image. – Andrew Thompson May 11 '15 at 04:31
  • Your title says 'PermGen decreasing' but your text says 'Blue line indicating the PermGen used is rising slowly'. Which is it? – user207421 May 11 '15 at 05:20
  • Within VisualVM there are 3 values for PermGen. There is the max that is not graphed then there is the orange line representing "Size" and the Blue line indicating "Used". So in this case the Orange line indicating "Size" is decreasing and the Blue Line indicating "Used" is increasing. What I am trying to determine is why the Orange Line is decreasing ? – robert connell May 11 '15 at 05:25
  • What other memory settings do you have? Such as the things discussed here: http://stackoverflow.com/questions/3334911/what-does-jvm-flag-cmsclassunloadingenabled-actually-do My guess is that the actual max size is not decreasing, only what is allocated, and that you have the JVM configuration to garbage collect PermGen. – Jim May 13 '15 at 20:23
  • I didn't have the ClassUnloadingEnabled set. Just initial and max sizes for Heap and the Permgen. Since I originally posted this I have decided that our issues were heap and not Permgen related. I think that although the Permgen Size is only marginally bigger than the Permgen Used that this may just be JVM optimization that we are seeing and that it is not actually causing a problem. – robert connell May 19 '15 at 02:01

0 Answers0