JVM-XX: Parameter Introduction

Source: Internet
Author: User
Tags prefetch

function switch:

Parameters default value or limit Description
Parameters Default value Function
-xx:-allowusersignalhandlers Limited to Linux and Solaris, not enabled by default Allows the installation of signal handlers for Java processes, see class: Sun.misc.Signal, Sun.misc.SignalHandler
-xx:+disableexplicitgc Enabled by default Prohibit explicitly calling System.GC () at run time
-xx:+failovertooldverifier Java6 new introduction option, enabled by default If the new class checker fails, the old validator is used (failure reason: Because the JDK6 is most backward-compatible to JDK1.2, and JDK1.2 's class info differs greatly from the JDK6 info, the new validator may fail the checksum)
-xx:+handlepromotionfailure Java5 previously is not enabled by default, JAVA6 is enabled by default Closure of the new generation collection guarantee
-xx:+maxfdlimit Limited to Solaris, enabled by default Set the Java process available file descriptor to the maximum allowable value for the operating system.
-xx:preblockspin=10 -xx:+usespinning must be enabled first, it has been enabled by default for JAVA6, the default spin 10 times Control spin times for multi-threaded spin lock optimization
-xx:-relaxaccesscontrolcheck Not enabled by default In the class validator, the check for access control is relaxed, and the effect is similar to the setaccessible in reflection
-xx:+scavengebeforefullgc Enabled by default Triggering a minor GC before the full GC
-xx:+usealtsigs Limited to Solaris, enabled by default To prevent conflicts with other applications that send signals, alternate signals are allowed to replace SIGUSR1 and SIGUSR2
-xx:+useboundthreads Limited to Solaris, enabled by default Binds all user threads to kernel threads, reducing the number of threads entering starvation (no CPU time)
-xx:-useconcmarksweepgc Not enabled by default Enable the CMS low-pause garbage collector to reduce FGC pause time
-xx:+usegcoverheadlimit Enabled by default Limit the elapsed time of the GC. If the GC takes too long, it will throw an oom
-xx:+uselwpsynchronization Limited to Solaris, enabled by default Replace thread synchronization with lightweight processes (kernel threads)
-xx:-useparallelgc -server when enabled, in other cases, not enabled by default Strategy for Cenozoic use of parallel cleanup, old generation using single-threaded mark-sweep-compact garbage collector
-xx:-useparalleloldgc Not enabled by default A garbage collector that uses parallel cleanup for both the old and the new generation
-xx:-useserialgc -client when enabled, in other cases, not enabled by default Using the serial garbage collector
-xx:-usespinning java1.4.2 and 1.5 need to be enabled manually, JAVA6 is enabled by default Enable multi-threaded spin lock optimization
-xx:+usetlab 1.4.2 before and when using the-client option, the default is not enabled and the remaining versions are enabled by default Enable thread Local cache
-xx:+usesplitverifier Java5 is not enabled by default, JAVA6 is enabled by default Using the new class type validator
-xx:+usethreadpriorities Enabled by default Use the priority of the local thread
-xx:+usevminterruptibleio Limited to Solaris, enabled by default In Solaris, allow thread break in runtime

Performance parameters:

Parameters default value or limit Description
-xx:+aggressiveopts Introduced after JDK 5 update 6, but needs to be enabled manually, JDK6 is enabled by default Enable the latest tuning results for the JVM development team. such as compilation optimization, bias lock, parallel old generation collection, etc.
-xx:compilethreshold=10000 1000 By JIT compiler, the method is compiled into machine code trigger threshold, can be understood as the number of times to call the method, such as 1000 times, the method is compiled into machine code
-xx:largepagesizeinbytes=4m Default 4m, AMD64 bit: 2m Set the memory page size for heap memory
-xx:maxheapfreeratio=70 70 After GC, if the free heap memory is found to occupy 70% of the entire estimated upper limit, the estimated upper limit value is shrunk
-xx:maxnewsize=size 1.3.1 Sparc:32m, 1.3.1 X86:2.5m The new generation accounts for the maximum value of the entire heap memory
-xx:maxpermsize=64m After 5.0: The 30%, 1.4 amd64:96m, 1.3.1-client:32m, other default 64m Perm (commonly known as the method area) represents the maximum value of the entire heap memory
-xx:minheapfreeratio=40 40 After GC, increase the upper limit if you find that free heap memory accounts for 40% of the total estimated upper value
-xx:newratio=2 Sparc-client:8, X86-server:8, X86-client:12,-client:4 (1.3),
8 (1.3.1+), X86:12, other default 2
The heap memory footprint of the Cenozoic and older generations, for example, 2 means that the Cenozoic represents 1/2 of the older generation, accounting for 1/3 of the total heap memory
-xx:newsize=2.125m After 5.0: The 2.125m bit Vms will increase the default value of 30%, X86:1M, x86, 5.0 after: 640k Default value for new generation estimation caps
-xx:reservedcodecachesize=32m Solaris 64-bit, AMD64,-server x86:48m, 1.5.0_06, Solaris 64-bit amd64:1024m, other default 32m Set the maximum value of the code cache, compile-time with
-xx:survivorratio=8 Solaris Amd64:6, Sparc in 1.3.1:25, Solaris platforms 5.0 before: 32, other default 8 The occupancy ratio of Eden to survivor. For example, 8 indicates that a survivor area occupies 1/8 of the Eden Memory, or 1/10 of the Cenozoic memory, why not 1/9?
Because our new generation has 2 survivor, namely S0 and S1. So survivor is a total of 8/10 of the 2/10,eden and Cenozoic of the Cenozoic memory.
-xx:targetsurvivorratio=50 50 The actual amount of survivor space used. Default is 50%, up to 90%
-xx:threadstacksize=512 sparc:512, Solaris x86:320 (5.0 ago), Sparc bit:1024, Linux amd64:1024 (5.0 ago 0), other default 512. Thread stack size
-xx:+usebiasedlocking Introduced after JDK 5 update 6, but needs to be enabled manually, JDK6 is enabled by default Enable biased locking
-xx:+usefastaccessormethods Enabled by default Optimize Getter method performance for primitive types (get/set:primitive type)
-xx:-useism Enabled by default Enable Solaris for ISM
-xx:+uselargepages Introduced after JDK 5 update 5, but needs to be enabled manually, JDK6 is enabled by default Enable Large Memory Paging
-xx:+usempss Before 1.4.1: Not enabled, the remaining versions are enabled by default Solaris MPSS is enabled and cannot be used concurrently with ISM
-xx:+usestringcache Enabled by default Enables caching of commonly used strings.
-xx:allocateprefetchlines=1 1 Number of cache lines to load after the last object allocation using prefetch instructions generated in JIT compiled code. Default values is 1 if the last allocated object is an instance and 3 if it is an array.
-xx:allocateprefetchstyle=1 1 Generated code style for prefetch instructions.
0–no prefetch instructions is generate*d*,
1–execute prefetch instructions after each allocation,
2–use Tlab allocation watermark Pointer to gate when prefetch instructions is executed.
-xx:+usecompressedstrings Java 6 Update 21 has an option For strings that do not require 16-bit characters, you can use byte[] rather than char[]. For many applications, this saves memory but slows down (5%-10%)
-xx:+optimizestringconcat Introduced in Java 6 update 20 Optimize string connection operations where possible

Debug Parameters:

Parameters default value or limit Description
-xx:-citime The time that the issuance fee was JIT compiled
-xx:errorfile=./hs_err_pid<pid>.log Introduced in JDK6 Error file
-xx:-extendeddtraceprobes JDK6 is introduced only in the Solaris Enable performance impact of DTrace probes
-xx:heapdumppath=./java_pid<pid>.hprof 1.4.2 Update, 5.0 update 7 Specifies the file path or directory of the Heapdump
-xx:-heapdumponoutofmemoryerror 1.4.2 Update, 5.0 update 7 Heapdump when an oom is thrown
-xx:onerror= "<cmd args>;<cmd args>" 1.4.2 Update 9 Execute user-specified commands when an error occurs
-xx:onoutofmemoryerror= "<cmd args>;
<cmd args> "
1.4.2 Update 12, 6 Execute user-specified commands when oom occurs
-xx:-P Rintclasshistogram 1.4.2 Print class instance information when ctrl+break occurs, same as Jmap-histo
-xx:-P Rintconcurrentlocks 6 Print java.util.concurrent lock information when ctrl+break occurs, same as Jstack-l
-xx:-P Rintcommandlineflags 5 Print markup on the command line
-xx:-P rintcompilation Print information When the method is compiled
-xx:-P RINTGC Print information when GC occurs
-xx:-P Rintgcdetails 1.4.0 Print GC Details
-xx:-P Rintgctimestamps 1.4.0 Print GC Time
-xx:-P rinttenuringdistribution Print tenuring Age Information
-xx:-traceclassloading Tracking class loading
-xx:-traceclassloadingpreorder 1.4.2 Keep track of all loaded reference classes
-xx:-traceclassresolution 1.4.2 Track changes in constant pools
-xx:-traceclassunloading Unloading of trace classes
-xx:-traceloaderconstraints 6 Trace Recording of loader constraints
-xx:+perfsavedatatofile Save Jvmstat Binary when exiting
-xx:parallelgcthreads= Set the number of threads for the parallel garbage collector between the Cenozoic and the older generations
-xx:+usecompressedoops Enables the use of compressed pointers (object references represented as + bit offsets instead of 64-bit pointers) for op Timized 64-bit Performance with Java heap sizes less than 32GB.
-xx:+alwayspretouch Pre-touch the Java heap during JVM initialization. Every page of the heap is thus demand-zeroed during initialization rather than incrementally during application execution.
-xx:allocateprefetchdistance= Sets the prefetch distance for object allocation. Memory about-to-being written with the value of new objects are prefetched into caches at this distance (in bytes) beyond the A Ddress of the last allocated object. Each Java thread have its own allocation point. The default value varies with the platform on which, the JVM is running.
-xx:inlinesmallcode= Inline compiled code when the compiled code is less than the specified value
-xx:maxinlinesize=35 Maximum number of bytes in an inline method
-xx:freqinlinesize= Maximum bytecode size for a method that is frequently implemented inline
-xx:loopunrolllimit= Unroll loop bodies with server compiler intermediate representation node count less than this value. The limit used by the server compiler are a function of this value, not the actual value. The default value varies with the platform on which, the JVM is running.
-xx:initialtenuringthreshold=7 Sets the maximum number of initial objects to survive in the Cenozoic
-xx:maxtenuringthreshold= Set the maximum number of objects to survive in the Cenozoic, Max 15, parallel recycle mechanism default to 15,CMS default is 4

JVM-XX: Parameter Introduction (RPM)

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.