RaviNada Kiran wrote:So what is the difference between a Heap size and PermGenSpace?
You have pretty much described it. The Permanent Generation is where the JVM keeps class descriptions. And yes, these are the classes you have written when you develop an application. I would only increase it's size if you get an OutOfMemoryError indicating that the JVM has run out of PermGen space. The number of classes in an application is not very dynamic, so we don't see this situation very often (the exception being application servers, which get a new influx of class descriptions every time an application is redeployed).
The Heap is where the JVM creates class instances. The heap is far more dynamic than the PermGen and more susceptible to running out of memory.