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 |