JVM parameter configuration details


JVM parameter configuration

Set heap size

-ES7en initial heap size -Xmx maximum heap size -Xmn sets the young generation size Set the stack size for each thread -Xss sets the stack size for each thread

Set the young generation size

-XX:NewSize= -ES22en :MaxNewSize= Set the young generation size -ES25en :NewRatio= Set the ratio of the younger generation (including Eden and two Survivor regions) to the older generation (excluding the durable generation) -ES30en :SurvivorRatio= Set the size ratio between Eden and Survivor in the young generation

Sets the persistent generation size

-ES39en :MaxPermSize= Sets the persistent generation size

-ES43en :MaxTenuringThreshold=0: Set the maximum age for garbage

Set the serial collector algorithm

-XX:+UseSerialGC

Set up the parallel collector algorithm

-ES56en :+UseParallelGC sets up the parallel collector -ES59en :ParallelGCThreads= Set the number of threads for parallel garbage collection -ES62en :MaxGCPauseMillis= Specifies the maximum pause time for garbage collection -ES65en :GCTimeRatio= Throughput is the ratio of garbage collection time to non-garbage collection time, default is 99 -ES68en :MaxGCPauseMillis= Set the maximum time for each generation of garbage collection When the -ES71en :+UseAdaptiveSizePolicy option is set, the parallel collector automatically selects the young generation size and the corresponding proportion of Survivor -ES75en :+UseParallelOldGC sets the parallel collection algorithm for old generations

Set up the concurrent collector algorithm

-ES82en :+UseConcMarkSweepGC set up old age to collect concurrent collection -ES85en :+UseParNewGC set young for parallel collection -ES88en :+CMSIncrementalMode set to incremental mode. For single CPU -ES92en :CMSInitiatingOccupancyFraction= Specifies how much heap remains when concurrent collection begins -ES95en :CMSFullGCsBeforeCompaction= Set the number of times GC runs after the memory space compression, collation -ES99en :+UseCMSCompactAtFullCollection turns on compression for older generations

Garbage collection statistics

-XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -ES112en :+PrintGCApplicationConcurrentTime print the uninterrupted execution time of the program before each garbage collection -ES115en :+PrintGCApplicationStoppedTime print garbage collection duration of program pauses -ES118en :PrintHeapAtGC prints detailed stack information before and after GC -Xloggc:filename

Call Heap Dump

-XX:HeapDumpPath

Information about the print heap when controlling OutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError

Thank you for reading, I hope to help you, thank you for your support to this site!