Common JVM parameter set (JDK1.8)

parameter meaning Description
-XX:CIComcompile Maximum number of parallel compilations If the setting is greater than 1, although the compilation speed will increase, it will also affect system stability and increase the possibility of JVM crash
-XX:InitialHeapSize=100M Initialize heap size Abbreviation-Xms100M
-XX:MaxHeapSize=100M Maximum heap size Abbreviation-Xmx100M
-XX:NewSize=20M Set the size of the young generation
-XX:MaxNewSize=50M Maximum size of young generation
-XX:OldSize=50M Set old age size
-XX:MetaspaceSize=50M Set method area size
-XX:MaxMetaspaceSize=50M Maximum method area size -XX:+UseParallelGC Use UseParallelGC new generation, throughput priority
-XX:+UseParallelOldGC Use UseParallelOldGC In the old age, throughput first
-XX:+UseConcMarkSweepGC Use CMS In the old age, pause time has priority
-XX:+UseG1GC Use G1GC New generation, old generation, pause time priority
-XX:NewRatio Ratio of new and old generations For example -XX:Ratio=4, it means that the new generation: old generation=1:4, that is, the new generation occupies 1/5 of the entire heap memory
-XX:SurvivorRatio The ratio of the two S and Eden areas For example, -XX:SurvivorRatio=8, which is (S0+S1):Eden=2:8, which means that one S accounts for 1/10 of the entire new generation
-XX:+HeapDumpOnOutOfMemoryError Start heap overflow printing When the JVM heap memory overflows, that is, OOM, a dump file is automatically generated
-XX:HeapDumpPath=heap.hprof Specify the heap memory overflow print directory Indicates that a heap.hprof file is generated in the current directory
-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps Xloggc:$CATALINA_HOME/logs/gc.log Print out the GC log You can use different garbage collectors to compare and view the GC situation
-Xss128k Set the stack size of each thread The experience value is 3000-5000 best
-XX:MaxTenuringThreshold=6 Raise the maximum threshold of the old generation The default value is 15
-XX:InitiatingHeapOccupancyPercent Heap memory usage percentage when starting a concurrent GC cycle Garbage collectors such as G1 use it to trigger concurrent GC cycles based on the usage of the entire heap, not just the usage ratio of a certain generation of memory. A value of 0 means "always execute GC cycles". The default value is 45.
-XX:G1HeapWastePercent Allowable percentage of wasted heap space The default is 10%. If the reclaimable space for concurrent marking is less than 10%, MixedGC will not be triggered.
-XX:MaxGCPauseMillis=200ms G1 maximum pause time The pause time cannot be too small. If it is too small, it will cause G1 to fail to keep up with the rate of garbage generation. Eventually degenerate into Full GC. Therefore, the tuning of this parameter is a continuous process, gradually adjusting to the best state.
-XX:ConcGCThreads=n The number of threads used by the concurrent garbage collector The default value varies with the platform on which the JVM runs
-XX:G1MixedGCLiveThresholdPercent=65 Old locale to be included in the mixed garbage collection cycle Occupancy threshold The default occupancy rate is 65%
-XX:G1MixedGCCountTarget=8 After setting the marking period, the target number of times to perform mixed garbage collection on the old area with the upper limit of survival data as G1MixedGCLIveThresholdPercent There are 8 mixed garbage collections by default. The goal of mixed garbage collection is to control the number of times within this target.
-XX: G1OldCSetRegionThresholdPercent = 1 When describing Mixed GC, Old Region is added to CSet By default, G1 only adds 10% of the Old Region to the CSet

Guess you like

Origin blog.csdn.net/aiwaston/article/details/104890421