Print JVM info to a file txt
java -XX:+PrintFlagsFinal>final.txt
Parameter meaning
-Xms:The initial capacity of the heap; 物理内存的1/64(<1GB),默认(MinHeapFreeRatio参数可以调整)空余堆内存小于40%时,JVM就会增大堆直到-Xmx的最大限制.
-Xss:JDK5.0以后每个线程堆栈大小为1M,以前每个线程堆栈大小为256K.根据应用的线程所需内存大小进行调整.在相同物理内存下,减小这个值能生成更多的线程.但是操作系统对一个进程内的线程数还是有限制的,不能无限生成,经验值在3000~5000左右.一般小的应用,如果栈不是很深,应该是128k够用的 大的应用建议使用256k。这个选项对性能影响比较大,需要严格的测试。
-Xmn:整个堆大小=年轻代大小 + 年老代大小 + 持久代大小.增大年轻代后,将会减小年老代大小.此值对系统性能影响较大,Sun官方推荐配置为整个堆的3/8.