JVM Tuning Summary (eight)-Typical configuration Example 2

Source: Internet
Author: User
Tags garbage collection

Common Configuration Rollup

Heap Settings

-XMS: initial Heap Size

-XMX: Maximum Heap Size

-xx:newsize=n: Set Young generation size

-xx:newratio=n: Set the ratio between the younger generation and the older generation. For example, 3 means that the ratio of the younger generation to the older generation is 1:3, and the young generation takes up 1/4 of the younger generation and the older generation.

-xx:survivorratio=n: The ratio of the younger generation of Eden to the two survivor areas. Note that there are two survivor areas. such as: 3, said Eden:survivor=3:2, a Survivor district accounted for the entire young generation of 1/5

-xx:maxpermsize=n: Set Persistent generation size

Collector Settings

-XX:+USESERIALGC: Set serial collector

-XX:+USEPARALLELGC: Setting up a parallel collector

-XX:+USEPARALLEDLOLDGC: Setting up a parallel collector for older generations

-XX:+USECONCMARKSWEEPGC: Setting Up concurrent collectors

Garbage collection Statistics

-xx:+printgc

-xx:+printgcdetails

-xx:+printgctimestamps

-xloggc:filename

Parallel collector settings

-xx:parallelgcthreads=n: Sets the number of CPUs to use when the parallel collector collects. The number of parallel collection threads.

-xx:maxgcpausemillis=n: Set the maximum pause time in parallel collection

-xx:gctimeratio=n: Sets the percentage of time that garbage collection takes to run the program. Formula is 1/(1+n)

Concurrent collector Settings

-xx:+cmsincrementalmode: Set to incremental mode. Applies to single CPU situations.

-xx:parallelgcthreads=n: Sets the number of CPUs that the collection of concurrent collectors uses when collecting in parallel. The number of parallel collection threads.

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.