Click to enter _ more _java thousand ask
1. What is the difference between XMNXMSXMXXSS
First of all, Xmn, Xms, XMX, XSS are the JVM's memory configuration parameters, we can modify these parameters according to different needs, in order to achieve the best effect of running the program.
Understanding JVM Memory Management Look here: How the JVM manages memory
Xms, XMX
The-XMS,-xmx allocation is used to set the minimum and maximum size of the process heap memory.
Understanding heap Memory Look here: What is the Java heap memory?
Understanding Java garbage Collection mechanism look here: What is the Java garbage collection mechanism
Xmn
-XMN is used to set the size of the Cenozoic within the heap. With this value we can also get the size of Laosheng:-xmx minus-xmn
Understanding heap generation garbage processing algorithm look here: What is the new generation of replication algorithm
Xss
-XSS sets the amount of memory each thread can use.
In the same physical memory, reducing this value can generate more threads. Of course, the operating system on the number of threads within a process is still limited, can not be generated indefinitely, the experience is around 3000~5000.
In addition to these configurations, the JVM has a very numerous configuration, commonly used as follows:
-xx:permsize,-xx:maxpermsize
The minimum size and maximum size of the allocation used to set the permanent generation.
-xx:maxtenuringthreshold
Sets the number of times to be transferred to the Laosheng generation. If it is 0, skip the Cenozoic and enter the Laosheng generation directly.
-xx:newratio
Set the ratio of Laosheng generation to Cenozoic, for example the value is 3, which means that the ratio of Cenozoic to Laosheng generation is 1:3.
Java thousands asked _07JVM architecture (015) _XMNXMSXMXXSS What's the Difference