Where can I find default -Xss (stack size) value for Oracle JVM? Where can I find default -Xss (stack size) value for Oracle JVM? java java

Where can I find default -Xss (stack size) value for Oracle JVM?


try:

java -XX:+PrintFlagsFinal -version | grep ThreadStackSize


This information now appears in the Oracle Hotspot FAQhttp://www.oracle.com/technetwork/java/hotspotfaq-138619.html#threads_oom

You may be running into a problem with the default stack size for threads. In Java SE 6, the default on Sparc is 512k in the 32-bit VM, and 1024k in the 64-bit VM. On x86 Solaris/Linux it is 320k in the 32-bit VM and 1024k in the 64-bit VM.

On Windows, the default thread stack size is read from the binary (java.exe). As of Java SE 6, this value is 320k in the 32-bit VM and 1024k in the 64-bit VM.

You can reduce your stack size by running with the -Xss option. For example:

java -server -Xss64k

Note that on some versions of Windows, the OS may round up thread stack sizes using very coarse granularity. If the requested size is less than the default size by 1K or more, the stack size is rounded up to the default; otherwise, the stack size is rounded up to a multiple of 1 MB.

64k is the least amount of stack space allowed per thread.


You can find it at Oracle site under "-XX:ThreadStackSize" option which means the same as -Xss.