Java Advanced (iii) JVM parameter description

Source: Internet
Author: User

1.JVM (Java Virtual machine)
1.-xms Initial Heap Size2.-xmx Maximum Heap Size3.-XMN Youth Generation Size4.-XSS the stack size per thread5.-XX:+USEPARNEWGC Youth GenerationThe garbage collection method isParallel collection 6.-xx:+useparalleloldgcOld age garbage Collection method for parallel collection
7.-xx:parallelgcthreads the number of threads in the parallel collector (preferably equal to the number of processors)8.-xx:maxgcpausemillis maximum time per youth garbage collection (max. Pause time)9.-xx:+useadaptivesizepolicy automatic selection of the size of the youth and corresponding survivor area ratio10.-xx:gctimeratio set garbage collection time as a percentage of program run time11.-XX:+SCAVENGEBEFOREFULLGC full GC before calling YGC


21.-xx:newsize Youth Generation size (for 1.3/1.4)22.-xx:maxnewsize Youth Generation Max (for 1.3/1.4)23.-xx:permsize Set the persistent generation (Perm Gen) initial value24.-xx:maxpermsize maximum value for persistent generations


2.CMS (Concurrent mark-sweep)

A garbage collector at the expense of throughput to obtain the shortest recovery pause time. This garbage collector is ideal for applications that require a server response speed. After starting the JVM parameter plus -XX:+USECONCMARKSWEEPGC , this parameter indicates that the recycle of the old age uses CMS. The basic algorithm used by the CMS is: Mark-erase.

1.-XX:+USECONCMARKSWEEPGC using CMS Memory collection
2.-xx:cmsfullgcsbeforecompaction How many times after the memory compression3.-xx:+cmsparallelremarkenabled Decrease Mark Pause4.-xx+usecmscompactatfullcollection in full GC, the compression of older generations5.-xx:+usecmsinitiatingoccupancyonly starting a CMS collection using a manual definition of the initialization definition6.-xx:cmsinitiatingoccupancyfraction=70 use CMS as garbage collection, use 70% after starting CMS collect7.-xx:cmsinitiatingpermoccupancyfraction setting Perm Gen usage to reach how much ratio is triggered8.-xx:+cmsincrementalmode set to incremental mode

Java Advanced (iii) JVM parameter description

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.