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.
XMS and XMX are parameters for your running application which is dynamic and which depends upon the Threads(Requests) which are accessing your application and often requires Object creations .(so this indicates what should be the initial and final memory allocated to them)
and PermGen space is the space for your classes declarations created as part of your application.
If you want something you never had do something which you had never done