JVM Common parameter configuration---from the in-depth understanding of Java virtual machines, Java Performance authoritative guide

Source: Internet
Author: User

Common configuration rollups
Heap Settings
-XMS: initial Heap Size
-XMX: Maximum Heap Size
-xx:newsize=n: Setting the Cenozoic size
-xx:newratio=n: Sets the ratio of the Cenozoic to the old age. For example: 3, indicating the ratio of Cenozoic to the old age is 1:3, the Cenozoic generation of the entire generation of the old age and 1/4
-xx:survivorratio=n: The ratio of Eden to two Survivor regions in the Cenozoic. Note that there are two Survivor districts. For example: 3, which represents Eden:survivor=3:2, a Survivor area of 1/5 of the entire Cenozoic
-xx:permsize=n: Set the initial size of the permanent generation (method area)
-xx:maxpermsize=n: Set the maximum size for a permanent generation
Collector Settings
-XX:+USESERIALGC: Setting up the serial collector (Serial)
-XX:+USEPARALLELGC: Setting up the parallel collector (Parallel)
-XX:+USEPARALLEDLOLDGC: Set parallel old age collector
-XX:+USECONCMARKSWEEPGC: Setting up the Concurrency collector (CMS)
Garbage collection Statistics
-xx:+printgc
-xx:+printgcdetails (most commonly used)
-xx:+printgctimestamps
-xloggc:filename
Parallel collector settings
-xx:parallelgcthreads=n: Sets the number of CPUs used when the parallel collector is collected. Parallel collection//thread count.
-xx:maxgcpausemillis=n: Set maximum pause time for parallel collection
-xx:gctimeratio=n: Sets the percentage of time that garbage collection takes to run the program. Formula 1/(1+N)
Concurrent collector Settings
-xx:+cmsincrementalmode: Set to incremental mode. Suitable for single CPU situations (rarely used, deprecated in jdk1.8).
-xx:parallelgcthreads=n: Sets the number of CPUs used by the concurrency collector when the Cenozoic collection is collected in parallel. The number of parallel collection threads.

G1 Collector Settings

-xx:g1heapregionsize=n: Setting the G1 partition size

-xx:maxgcpausemillis=n: Consistent with throughput collectors to control the time of Stop-the-word (this is the main tuning method of G1)

JVM Common parameter configuration---from the in-depth understanding of Java virtual machines, Java Performance authoritative guide

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.