Allocation parameters of the heap

Source: Internet
Author: User

-xmn– Set the Cenozoic size Note: The size here is (eden+ 2 survivor Space). The new gen is different from the one shown in Jmap-heap.
entire Heap size = young generation size + old generation size + persistent generation size.
Increasing the younger generation will reduce the size of older generations. This value has a large impact on system performance, and Sun is the official recommended configuration for the entire heap of 3/8 -xx:newratio– The ratio of the Cenozoic (eden+2*s) and older generation (not including the permanent Zone) –4 expressed ( it means 4 times times the age of the new generation.New generation: The old age of =1:4, the young generation of Jian 1/5 -xx:survivorratio– Set the ratio –8 representation of two survivor zones and Eden ( Eden is 8 times times the size of a survivor.) Two survivor:eden=2:8, that is, one survivor for the younger generation of 1/10 export to a specified path when memory overflows -xx:+heapdumponoutofmemoryerrorExport heap to file when –oom -xx:+heapdumppath– Export the path to Oom-xmx20m-xms5m-xx:+heapdumponoutofmemoryerror-xx:heapdumppath=d:/a.dump -xx:onoutofmemoryerror– In Oom, execute a script "-xx:onoutofmemoryerror=d:/tools/jdk1.7_40/bin/printstack.bat%p" when the program is oom, the thread dump will be generated in D:/a.txt You can send messages, even restart programs, when you're in Oom Summary:adjust the size of the Cenozoic and the surviving generations according to the actual matterOfficial recommendation 3/8 of the Cenozoic Jiansurviving generations of 1/10when you're in oom, remember to dump out the heap to make sure you can troubleshoot the site.

Allocation parameters of the heap

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.