New generation Java garbage collection tool: ZGC
JavaZGCZGC ZGCThe Z Garbage CollectorTBZGC JDK 11 JDK 15 Production ReadyZGC"Z"ZZGC ZFSZFSZFS Zettabyte File SystemJeff Bonwick Oracle ZGCZGC2018Oracle ZGC TB GC 10ms G1 15%202211Oracle ZGClive-set root-set TB 8MB-16TB ZGCZGC 10ms 2018 ZGCConcurrentTracing: CompactingSingle generation: Region-basedRegionNUMA-awareNUMANon-Uniform Memory AccessLoad barriersColored pointers2022 ZGCConcurrentRegion-basedRegionCompactingNUMA-awareNUMANon-Uniform Memory AccessUsing colored pointersUsing load barriers 2018 2022 ZGC Single generation G1G1 Region-based RegionRegionZGC G1ZGC Region-basedRegion-basedZGC G1ZGC Region :Small Region Region 2M 256KMedium Region Region 32M 256K 4MLarge Region Region: 2M 4MBCompactingCompacting ZGC CMSG1"-"NUMANUMANon-Uniform Memory Access CPU CPU CPUUniform Memory Access UMA CPU CPUNUMAUMANUMA ZGC NUMAColored pointersColored pointersJVMGC CMSG1 GC ZGC GC 64 JDK zGlobals_x86.cpp ZGC 31[0 ~ 41] 42-bits 4TB Java[42-45] 4-bits Metadata Bits Marked0Marked1RemappedFinalizable [46-63] 18-bits02[0 ~ 42] 43-bits 8TB Java[43-46] 4-bits Metadata Bits Marked0Marked1RemappedFinalizable [47-63] 17-bits03[0 ~ 43] 44-bits 16TB Java[44-47] 4-bits Metadata Bits Marked0Marked1RemappedFinalizable [48-63] 16-bits0 3 4-bits Marked0Marked1RemappedFinalizable 4Marked01-bitMarked11-bitRemapped1-bitFinalizable1-bitfinalizer Marked0Marked1RemappedZGC Marked0Marked1 RemappedZGC""GCGCLoad barriersLoad barriers JIT just-in-time compilation JVMjavaString n = person...