How to manage Java Heap Size?
by, 02-18-2012 at 04:25 PM (1380 Views)
You can specify the memory allocation for JVM using –X option. Following table explains the JVM options.
-Xms: initial java heap size
-Xmx: maximum java heap size
-Xmn: the size of the heap for the young generation
unix> bin/httpd.sh -Xmn100M -Xms500M -Xmx500M
win> bin/httpd.exe -Xmn100M -Xms500M -Xmx500M
install win service> bin/httpd.exe -Xmn100M -Xms500M -Xmx500M -install
To set max –Xmx and min –Xms heap sizes at same value is a good practice for applications that are server side Java applications. For example, Resin.
Heap size is not used to determine memory used by processes.