What is the default Xms and Xmx settings for the Sun JVM (v 1.4*) if those values are not specified at startup?
The Java™ virtual machine (JVM) heap size setting directly relates to how many server instances can be started within a dynamic cluster on a specific node. You might need to modify the JVM heap size setting based on your environment configuration. The default value is 256 MB.
So default maximum jvm heap size is: 256mb or 1gb or 32gb depending on VM, above.
The JVM divides its memory into two main categories: heap memory and non-heap memory. Heap memory is the part with which people are typically the most familiar. It's where objects that are created by the application are stored. They remain there until they are no longer referenced and are garbage collected.
As documented:
That's for Linux, but I've checked and the values are the same for Windows and Solaris too. Don't rely on that being the case for other versions or options though. In particular, the choice of server or client VM depends on operating system, at least in later versions.
Another piece of documentation
From Sun's tooldocs:
-Xmsn Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples:
-Xms6291456 -Xms6144k -Xms6m
-Xmxn Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples:
-Xmx83886080 -Xmx81920k -Xmx80m
So 2MB and 64MB.
(The link above is for the 1.5 docs, but you can download the 1.4 docs, and they say the same thing.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With