Profile Image
vishnupriya

What is Memory tuning: -XX:ThreadStackSize?

What is Memory tuning: -XX:ThreadStackSize? Have you used this JVM arguement before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvmargument

  • xx-threadstacksize

  • x-threadstacksize

  • Memory tuning

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

Usage:

 

You can change the java thread stack size with:

 

-XX:ThreadStackSize=size, where size is one the amount of memory in kilobytes.

 

Examples:

 

Will set the thread stack size to 1 megabyte:

 

-XX:ThreadStackSize=1k

 

-XX:ThreadStackSize=1024

 

Description:

 

Sets the Java thread stack size (in kilobytes). Use of a scaling suffix, such as k, results in the scaling of the kilobytes value so that -XX:ThreadStackSize=1k sets the Java thread stack size to 1024*1024 bytes or 1 megabyte. The default value depends on the platform.

 

Default Value:

 

Linux/x64 (64-bit): 1024 KB

 

macOS (64-bit): 1024 KB

 

Windows: The default value depends on virtual memory

 

Errors:

 

None

 

Arguments related:

 

TODO link UseG1GC, MinHeapFreeRatio, MaxHeapFreeRatio, Xmx, Xms, UseSerialGC, USeParNewGC, UseParallelGC, UseZGC

 

 Related Posts:

NOTE:

 

If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your insights will help the entire 10+ million java developer community to develop one standard source of documentation for all the JVM arguments.

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvmargument

  • xx-threadstacksize

  • x-threadstacksize

  • Memory tuning