-xms and-xmx

Source: Internet
Author: User
Tags xms
When the Java memory stack is not sufficient we will seek help from Java parameters-xms and-xmx. There are many examples on the internet, but many people like to set the value of-XMS and-xmx to the same, even I have seen that there is a bar-xms than-xmx (-XMS is the minimum value,- XMX is the maximum value).

At first I didn't know what the problem was with the two values, but when I was doing the project http://youmonitor.us/I found that when I set the-XMS and-xmx to be the same, Java kept eating the memory. At first I didn't know what was going on. After testing, found that the original Java garbage collector in memory to achieve the-XMS value when the start of recycling, if the same two values, which means that only when the Java use of all the memory will be recycled garbage, so the memory of course constantly rise.



And there are a number of GC policies for the same JDK, which cannot be generalized
In addition, under the sun's JDK, the XMS and XMX settings can reduce the pressure on the size of the telescopic heap, but under the IBM JDK, setting the same will increase the probability of heap fragmentation, and this negative effect is sufficient to counteract the benefits of the former




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.