-Xss : The stack size for each thread
Each thread in the VM get's a stack. The stack size will limit the number of threads that you can have, too big of a stack size and you will run out of memory as each thread is allocated more memory than it needs. If stack size is too small, you can get exception stack over flow. And 2048k is an appropriate value for most situations.
Ex: Limit thread stack size on Linux
ulimit -s 2048
-Xms : Min heap size
-Xmx : Max heap size
Simply tip of performance: IBM, for example, recommends setting the minimum to the lowest heap size needed so that garbage collection happens often, but runs quickly. Some individuals errantly recommend setting the minimum to the same as the max heap size, which causes garbage collection to run only after the heap is full (and therefore garbage collection is terribly inefficient)
-XX:MaxPermSize : Max Permanent generation size
Example: -Xms128m -Xmx512m -XX:MaxPermSize=512m -Xss1024k
No comments:
Post a Comment