What is the Maximum Java Heap Size?

On Windows, the JVM’s maximum heap size is around 1.8GB depending on JVM version. So the max heap should be set to below this. However, on other OS such as Solaris or HPUX, this limit is far greater with proper JVM configurations.

Few points to consider:

  1. From my memory, not all webMethods products are supported for 64bit JVM. I believe most of products support 64bit JVM from 6.5 only.
  2. Be aware that at OS level, you’ll see the heap allocated + the memory being used by the JVM itself.
  3. Having a large heap size may also mean longer time for JVM’s garbage collection.
  4. There are green threads and native threads used by the JVM. Not having enough contiguous physical memory available will limit the number of native threads you can create.
  5. If more memory is requred, look to make the code more efficient first. Such as using transformers rather than invoke for certain cases, dropping variables as soon as possible, removing unnecessary codes, etc.

Hope this helps…