Permanent Generation Heap
This segment of the heap is used to store instances of Class and Method objects and their related meta data. Applications that perform a lot of dynamic classloading or dynamic class generation can quickly fill up this segment of the heap. Note that this Perm space heap is generally OUTSIDE of the Java heap which you set with -Xmx.
Resizing Permanent Generation
Sun JVMs allow you to resize the different generations of the heap, including the permanent generation.
On Sun JVM (1.3.1 and above) you can configure the initial permanent generation size and the maximum permanent generation size.
To set a new initial size on Sun JVM use the -XX:PermSize=64m option when starting the virtual machine. To set the maximum permanent generation size use -XX:MaxPermSize=128m option. If you set the initial size and maximum size to equal values you may be able to avoid some full garbage collections that may occur if/when the permanent generation needs to be resized.
Some of the default values for Sun JVMs are listed below.
JDK 1.3.1_06 | Initial Size | Maximum Size |
---|---|---|
Client JVM | 1MB | 32MB |
Server JVM | 1MB | 64MB |
JDK 1.4.1_01 | Initial Size | Maximum Size |
---|---|---|
Client JVM | 4MB | 64MB |
Server JVM | 4MB | 64MB |
JDK 1.4.2 | Initial Size | Maximum Size |
---|---|---|
Client JVM | 4MB | 64MB |
Server JVM | 16MB | 64MB |
JDK 1.5.0 | Initial Size | Maximum Size |
---|---|---|
Client JVM | 8MB | 64MB |
Server JVM | 16MB | 64MB |
Related
HowCanIDisplayTheMemoryPoolUsage
Referenced by:
Comments