|We don't really have any hard recommendations for you.
Most people just use the default settings that are established by the JVM version. If you start running into OutOfMemory Exceptions, or just like playing around with Heap sizes then we recommend that you:
- Research what Sun Microsystems has to say on the matter.
How to use the -X options [ -Xms for min heap, and -Xmx for max heap ] to set the min and max heap sizes is discussed in the JavaDocs for JDK 1.3.x and newer.
Here for instance:
JVM Non-Standard Options
http://java.sun.com/docs/hotspot/index.html is also a great place to look.
Do your own testing.
Configurations such as heap size are highly dependent on an individual's specific situation. Anyone that tells you:
"oh, just set it to this..."
is probably doing you a disservice. There is no substitute for tweaking this yourself and studying the result. What works well for one application (on one machine) may not necessarily work well for another.
Please see SE FAQ #318 for more information.