Sizing the large object area | Analyzing verbose output


6.4 Heap sizing


Determining proper initial and maximum heap sizes can greatly improve a application performance.

Always keep the heap within physical memory. If the heap is larger than what is available in physical memory and pages to disk, performance will be severely degraded.

Heap sizing..

  1. Run the application with verbose:gc turned on.
  2. Run the application with no load to determine the heap size at steady state. This will be a rough estimate of the initial heap size.
  3. Run the application under stress to determine the maximum heap size.
  4. Run the application under normal usage to determine if the heap expands or contracts, or if a steady state is achieved.