While pressing the code, an internal chat tool pops up a message:
" Brother Wolf, my machine always FGC frequently...please help me see "
I opened the dialog box and witty reply with an emoji
Continue to code silently
Later, the friend smashed a piece of GC log.
2019-09-17T20:33:57.889+0800: 4753520.554: [Full GC (Metadata GC Threshold) 4753520.554: [CMS[YG occupancy: 723220 K (1887488 K)]4753520.988: [weak refs process ing, 0.0042134 secs]4753520.992: [class unloading, 0.0987343 secs]4753521.091: [scrub symbol table, 0.0237609 secs]4753521.115: [scrub string table, 0.0025983 s ecs]: 145423K->141376K(3354624K), 0.6260023 secs] 868644K->864597K(5242112K), [Metaspace: 128179K->128179K(1234944K)], 0.6264315 secs] [Times: user=1.24 sys=0.0 0, real=0.63 secs]4159962 Heap after GC invocations=8029 (full 50):4159963 par new generation total 1887488K, used 723220K [0x0000000673400000, 0x00000006f3400000, 0x00000006f3400000)4159964 eden space 1677824K, 42% used [0x0000000673400000, 0x000000069ed59090, 0x00000006d9a80000)4159965 from space 209664K, 4% used [0x00000006d9a80000, 0x00000006da36c210, 0x00000006e6740000)4159966 to space 209664K, 0% used [0x00000006e6740000, 0x00000006e6740000, 0x00000006f3400000)4159967 concurrent mark-sweep generation total 3354624K, used 141376K [0x00000006f3400000, 0x00000007c0000000, 0x00000007c0000000)4159968 Metaspace used 128145K, capacity 136860K, committed 262144K, reserved 1234944K4159969 class space used 14443K, capacity 16168K, committed 77312K, reserved 1048576K4159970 }4159971 {Heap before GC invocations=8029 (full 50):4159972 par new generation total 1887488K, used 723220K [0x0000000673400000, 0x00000006f3400000, 0x00000006f3400000)4159973 eden space 1677824K, 42% used [0x0000000673400000, 0x000000069ed59090, 0x00000006d9a80000)4159974 from space 209664K, 4% used [0x00000006d9a80000, 0x00000006da36c210, 0x00000006e6740000)4159975 to space 209664K, 0% used [0x00000006e6740000, 0x00000006e6740000, 0x00000006f3400000)4159976 concurrent mark-sweep generation total 3354624K, used 141376K [0x00000006f3400000, 0x00000007c0000000, 0x00000007c0000000)4159977 Metaspace used 128145K, capacity 136860K, committed 262144K, reserved 1234944K4159978 class space used 14443K, capacity 16168K, committed 77312K, reserved 1048576K
My eye look, see a few key words , and thenFullGC
MetadataGCThreshold
" Is the metaspace not set, or the setting is too small, resulting in FGC