JVM tuning configuration parameters

Configuring JAVA_OPTS in tomcat configuration file tomcat / bin / catalina.sh in = "- server -Xms2048m -Xmx2048m -Xss1024K -XX: PermSize = 512m -XX: MaxPermSize = 1024m". Configured in the first line of the configuration file.

-Xms 2048m: setting JVM initial heap memory allocated to 2048m, if provided with different -Xmx, memory is reallocated each time garbage collection is completed after the JVM.

The -Xmx 4096m: Set JVM maximum heap memory available for the 4096M.

-Xss 1024K: Set each thread stack size to 1024K. JDK5.0 after each thread stack size is 1M, before each thread stack size is 256K. Thread desired application more memory size is adjusted in the same physical memory, reducing this value can generate more threads. However, the number of operating system threads within a process still limited, not unlimited generation, experience in 3000 and 5000.

-XX: PermSize = 512M: setting an initial non-heap memory area allocation size of 512m, which is abbreviated as permanent size (persistent memory).

-XX: MaxPermSize = 512M: Set JVM allocated allowed maximum non-heap memory maximum limit of 512m.

Note: Before you configure must carefully consider the size of non-heap memory area required for the software itself, because here is where the memory will not be processed java garbage collection mechanism. And more it should be noted that the maximum heap memory with the largest non-heap memory and absolutely can not exceed the operating system's available memory.

Guess you like

Origin www.cnblogs.com/ming-blogs/p/11932974.html