How does java permgen relate to code size

Posted by brad on Server Fault See other posts from Server Fault or by brad
Published on 2010-03-10T15:36:13Z Indexed on 2010/03/12 12:07 UTC
Read the original article Hit count: 409

Filed under:
|

I've been reading a lot about java memory management, garbage collecting et al and I'm trying to find the best settings for my limited memory (1.7g on a small ec2 instance) I'm wondering if there is a direct correlation between my code size and the permgen setting. According to sun:

The permanent generation is special because it holds data needed by the virtual machine to describe objects that do not have an equivalence at the Java language level. For example objects describing classes and methods are stored in the permanent generation.

To me this means that it's literally storing my class def'ns etc... Does this mean there is a direct correlation between my compiled code size and the permgen I should be setting? My whole app is about 40mb and i noticed we're using 256mb permgen. I'm thinking maybe we're using memory that could be better allocated to dynamic code like object instances etc...

© Server Fault or respective owner

Related posts about java

Related posts about permgen