Because the previous use of the default GC, the old age often accounted for more than 99% before a GC behavior occurred, feel uncomfortable ... Although each full GC is as long as 0.5S.
Combined with the last listen to the Chinese architect Assembly, a buddy to share the G1 GC ... Try it.
In Tomcat's catania.sh, Java's startup parameters add a paragraph.
Java_opts= '-xms512m-xmx1024m-xx:permsize=256m-xx:maxnewsize=256m-xx:maxpermsize=256m -XX:+ UNLOCKEXPERIMENTALVMOPTIONS-XX:+USEG1GC '
The Jmap output is as follows:
Jmap-heap xxxxattaching to process ID xxx, please wait ... Debugger attached successfully. Server compiler detected. JVM version is24.0-b56using Thread-local object allocation. Garbage-first (G1) GC with 4thread (s) Heap Configuration:minheapfreeratio= 40Maxheapfreeratio= 70maxheapsize= 1073741824 (1024. 0MB) NewSize= 1363144 (1. 2999954223632812MB) Maxnewsize= 268435456 (256. 0MB) Oldsize= 5452592 (5. 1999969482421875MB) Newratio= 2Survivorratio= 8PermSize= 268435456 (256. 0MB) MaxPermSize= 268435456 (256. 0MB) G1heapregionsize= 1048576 (1. 0MB) Heap usage:g1 heap:regions= 1024capacity= 1073741824 (1024. 0MB) Used= 525790240 (501. 4326477050781MB) Free= 547951584 (522. 5673522949219MB)48.968032002449%usedG1 Young Generation:eden space:regions= 108capacity= 275775488 (263. 0MB) Used= 113246208 (108. 0MB) Free= 162529280 (155. 0MB)41.06463878327%Usedsurvivor space:regions= 6capacity= 6291456 (6. 0MB) Used= 6291456 (6. 0MB) Free= 0 (0. 0MB)100%usedG1 Old Generation:regions= 415capacity= 791674880 (755. 0MB) Used= 406252576 (387. 4326477050781MB) Free= 385422304 (367. 5673522949219MB)51.3155824774938%usedperm generation:capacity= 268435456 (256. 0MB) Used= 65695576 (62. 652183532714844MB) Free= 202739880 (193. 34781646728516MB)24.4735091924667%used35236 interned Strings occupying 3876240 bytes.
Jmap related GC output is as follows:
JSTAT-GC xxxx s0c s1c s0u s1u EC EU OC OU PC PU ygc ygct F GC fgct GCT 0.0 6144.0 0.0 6144.0 269312.0 81920.0 773120.0 396840.2 262144.0 64155.8 3579 84.690 0 0.000 84.690 0.0 6144.0 0.0 6144.0 269312.0 100352.0 773120.0 396840.2 262144.0 64155.8 3579 84.69 0 0 0.000 84.690 0.0 6144.0 0.0 6144.0 269312.0 120832.0 773120.0 396840.2 262144.0 64155.8 3579 84. 690 0 0.000 84.690 0.0 6144.0 0.0 6144.0 269312.0 139264.0 773120.0 396840.2 262144.0 64155.8 3579 8 4.690 0 0.000 84.690 0.0 6144.0 0.0 6144.0 269312.0 176128.0 773120.0 396840.2 262144.0 64155.8 3579 84.690 0 0.000 84.690 0.0 6144.0 0.0 6144.0 269312.0 193536.0 773120.0 396840.2 262144.0 64155.8 3579 84.690 0 0.000 84.690 0.0 6144.0 0.0 6144.0 269312.0 211968.0 773120.0 396840.2 262144.0 64155.8 35 79 84.690 0 0.000 84.690 0.0 6144.0 0.0 6144.0 269312.0 229376.0 773120.0 396840.2 262144.0 64155.8 3579 84.690 0 0 .000 84.690 0.0 6144.0 0.0 6144.0 269312.0 243712.0 773120.0 400994.0 262144.0 64155.8 3579 84.690 0 0.000 84.690 0.0 8192.0 0.0 8192.0 267264.0 44032.0 773120.0 402843.3 262144.0 64155.8 3580 84.719 0 0.000 84.719
The output of the Zabbix is immediately transformed from a big sword into a climbed snake ...
JVM Trial G1 Garbage collector