Java thousands asked _07JVM architecture (015) _XMNXMSXMXXSS What's the Difference

Source: Internet
Author: User
Tags xms

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:

  1. -xx:permsize,-xx:maxpermsize
    The minimum size and maximum size of the allocation used to set the permanent generation.

  2. -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.

  3. -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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.