{"id":57391,"date":"2023-10-18T20:17:53","date_gmt":"2023-10-18T12:17:53","guid":{"rendered":"https:\/\/docs.pingcode.com\/?p=57391"},"modified":"2023-10-18T20:18:01","modified_gmt":"2023-10-18T12:18:01","slug":"zgc-%e5%8e%9f%e7%90%86%e6%98%af%e4%bb%80%e4%b9%88%ef%bc%8c%e5%ae%83%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e5%81%9a%e5%88%b0%e4%bd%8e%e5%bb%b6%e6%97%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/57391.html","title":{"rendered":"ZGC \u539f\u7406\u662f\u4ec0\u4e48\uff0c\u5b83\u4e3a\u4ec0\u4e48\u80fd\u505a\u5230\u4f4e\u5ef6\u65f6"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote\">\n<p>ZGC (Z Garbage Collector) \u662f Java \u7684\u65b0\u4e00\u4ee3\u5783\u573e\u56de\u6536\u5668\uff0c\u4e13\u4e3a\u89e3\u51b3\u5927\u5185\u5b58\u5e94\u7528\u7a0b\u5e8f\u7684\u5ef6\u8fdf\u95ee\u9898\u800c\u8bbe\u8ba1\u3002\u901a\u8fc7\u5229\u7528\u52a0\u8f7d\u56e0\u5b50\u3001\u67d3\u8272\u6307\u9488\u6280\u672f\u548c\u5e76\u53d1\u6027\uff0cZGC \u80fd\u591f\u5728\u4fdd\u8bc1\u6027\u80fd\u7684\u540c\u65f6\uff0c\u663e\u8457\u5730\u964d\u4f4e\u505c\u987f\u65f6\u95f4\u3002\u8fd9\u7bc7\u6587\u7ae0\u5c06\u6df1\u5165\u63a2\u7d22 ZGC \u7684\u6838\u5fc3\u539f\u7406\u53ca\u5176\u5982\u4f55\u505a\u5230\u4f4e\u5ef6\u65f6\u7684\u9b54\u6cd5\u3002<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1.ZGC<\/strong><strong>\u7684\u57fa\u672c\u4ecb\u7ecd<\/strong><\/h2>\n\n\n\n<p>ZGC \u662f Java \u5e73\u53f0\u7684\u4e00\u6b3e\u5783\u573e\u6536\u96c6\u5668\uff0c\u4e3b\u8981\u76ee\u6807\u662f\u89e3\u51b3\u9ad8\u5ef6\u8fdf\u95ee\u9898\u3002\u4e3a\u4e86\u6ee1\u8db3\u5927\u578b\u3001\u9ad8\u541e\u5410\u91cf\u7684\u5e94\u7528\u7a0b\u5e8f\uff0cZGC \u63d0\u4f9b\u4e86\u4e00\u4e2a\u4e0e\u5806\u5927\u5c0f\u548c\u5b58\u6d3b\u5bf9\u8c61\u6570\u91cf\u65e0\u5173\u7684\u505c\u987f\u65f6\u95f4\u6a21\u578b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2.ZGC<\/strong><strong>\u7684\u6838\u5fc3\u539f\u7406<\/strong><\/h2>\n\n\n\n<p>\u52a0\u8f7d\u56e0\u5b50: ZGC \u4f7f\u7528\u4e86\u4e00\u4e2a\u88ab\u79f0\u4e3a\u52a0\u8f7d\u56e0\u5b50\u7684\u6982\u5ff5\uff0c\u5b83\u53ef\u4ee5\u6709\u6548\u5730\u5e73\u8861\u5185\u5b58\u4f7f\u7528\u548c\u5ef6\u8fdf\u3002\u9ad8\u52a0\u8f7d\u56e0\u5b50\u610f\u5473\u7740\u66f4\u597d\u7684\u5185\u5b58\u5229\u7528\u7387\u4f46\u53ef\u80fd\u7684\u66f4\u9ad8\u5ef6\u8fdf\uff0c\u800c\u4f4e\u52a0\u8f7d\u56e0\u5b50\u5219\u662f\u53cd\u4e4b\u3002<\/p>\n\n\n\n<p>\u67d3\u8272\u6307\u9488\u6280\u672f: \u5728 ZGC \u4e2d\uff0c\u901a\u8fc7\u67d3\u8272\u6307\u9488\u6280\u672f\u5bf9\u5185\u5b58\u4e2d\u7684\u5bf9\u8c61\u8fdb\u884c\u6807\u8bb0\u3002\u8fd9\u4e0d\u4ec5\u53ef\u4ee5\u8fc5\u901f\u8bc6\u522b\u51fa\u5b58\u6d3b\u548c\u6b7b\u4ea1\u7684\u5bf9\u8c61\uff0c\u8fd8\u4e3a\u5e76\u53d1\u56de\u6536\u63d0\u4f9b\u4e86\u57fa\u7840\u3002<\/p>\n\n\n\n<p>\u5e76\u53d1\u6027: ZGC \u7684\u8bbe\u8ba1\u51c6\u5219\u4e4b\u4e00\u662f\u6700\u5927\u5316\u5e76\u53d1\u6027\u3002\u5b83\u7684\u5927\u90e8\u5206\u64cd\u4f5c\uff08\u5982\u6807\u8bb0\u3001\u91cd\u5b9a\u4f4d\u548c\u6e05\u9664\uff09\u90fd\u662f\u5e76\u53d1\u6267\u884c\u7684\uff0c\u8fd9\u610f\u5473\u7740 JVM \u7684\u6267\u884c\u7ebf\u7a0b\u548c\u5783\u573e\u6536\u96c6\u7ebf\u7a0b\u53ef\u4ee5\u540c\u65f6\u8fd0\u884c\uff0c\u4ece\u800c\u5927\u5927\u964d\u4f4e\u4e86\u505c\u987f\u65f6\u95f4\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3.<\/strong><strong>\u4e3a\u4ec0\u4e48ZGC\u80fd\u505a\u5230\u4f4e\u5ef6\u65f6<\/strong><\/h2>\n\n\n\n<p>\u5206\u533a\u8bbe\u8ba1: ZGC \u7684\u5185\u5b58\u533a\u57df\u88ab\u5206\u4e3a\u591a\u4e2a\u5c0f\u7684\u5206\u533a\uff0c\u6bcf\u4e2a\u5206\u533a\u53ef\u4ee5\u72ec\u7acb\u5730\u8fdb\u884c\u5783\u573e\u56de\u6536\u3002\u8fd9\u79cd\u5206\u533a\u8bbe\u8ba1\u786e\u4fdd\u4e86\u5373\u4f7f\u4e00\u90e8\u5206\u5185\u5b58\u6b63\u5728\u8fdb\u884c\u56de\u6536\uff0c\u5176\u4ed6\u90e8\u5206\u4ecd\u7136\u53ef\u4ee5\u6b63\u5e38\u63d0\u4f9b\u670d\u52a1\u3002<\/p>\n\n\n\n<p>\u5e76\u53d1\u6807\u8bb0: \u4e0e\u5176\u4ed6\u5783\u573e\u56de\u6536\u5668\u76f8\u6bd4\uff0cZGC \u7684\u5e76\u53d1\u6807\u8bb0\u9636\u6bb5\u53ea\u6709\u77ed\u6682\u7684\u505c\u987f\uff0c\u5927\u591a\u6570\u5de5\u4f5c\u90fd\u662f\u4e0e\u5e94\u7528\u7ebf\u7a0b\u5e76\u53d1\u6267\u884c\u7684\u3002<\/p>\n\n\n\n<p>\u5e76\u53d1\u91cd\u5b9a\u4f4d: \u4e3a\u4e86\u89e3\u51b3\u5185\u5b58\u788e\u7247\u95ee\u9898\uff0cZGC \u91c7\u7528\u5e76\u53d1\u91cd\u5b9a\u4f4d\u7b56\u7565\uff0c\u8fd9\u907f\u514d\u4e86\u56e0\u91cd\u5b9a\u4f4d\u9020\u6210\u7684\u957f\u65f6\u95f4\u505c\u987f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4.ZGC<\/strong><strong>\u4e0e\u5176\u4ed6\u5783\u573e\u56de\u6536\u5668\u7684\u5bf9\u6bd4<\/strong><\/h2>\n\n\n\n<p>\u4e0e\u4f20\u7edf\u7684 G1 \u6216 Parallel GC \u76f8\u6bd4\uff0cZGC \u63d0\u4f9b\u4e86\u66f4\u4f4e\u7684\u505c\u987f\u65f6\u95f4\u548c\u66f4\u53ef\u9884\u6d4b\u7684\u6027\u80fd\u3002\u867d\u7136\u5728\u67d0\u4e9b\u573a\u666f\u4e2d\uff0c\u5176\u4ed6\u5783\u573e\u56de\u6536\u5668\u53ef\u80fd\u4f1a\u6709\u66f4\u597d\u7684\u541e\u5410\u91cf\uff0c\u4f46\u5bf9\u4e8e\u9700\u8981\u4f4e\u5ef6\u8fdf\u7684\u5927\u578b\u5e94\u7528\u7a0b\u5e8f\uff0cZGC \u65e0\u7591\u662f\u66f4\u4f73\u9009\u62e9\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>5.<\/strong><strong>\u603b\u7ed3<\/strong><\/h2>\n\n\n\n<p>ZGC\uff0c\u4f5c\u4e3a Java \u7684\u65b0\u4e00\u4ee3\u5783\u573e\u56de\u6536\u5668\uff0c\u901a\u8fc7\u5176\u72ec\u7279\u7684\u539f\u7406\u548c\u8bbe\u8ba1\uff0c\u4e3a\u5927\u578b\u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u4e86\u524d\u6240\u672a\u6709\u7684\u4f4e\u5ef6\u65f6\u4f53\u9a8c\u3002\u968f\u7740\u6280\u672f\u7684\u6301\u7eed\u53d1\u5c55\uff0c\u53ef\u4ee5\u9884\u671f\u672a\u6765\u7684 Java \u5e94\u7528\u5c06\u66f4\u591a\u5730\u4ece ZGC \u8fd9\u6837\u7684\u5148\u8fdb\u5783\u573e\u56de\u6536\u5668\u4e2d\u53d7\u76ca\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1280\" height=\"850\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2023\/10\/\u6587\u7ae0\u5185\u914d\u56fe-6-2.png?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"\" class=\"wp-image-57392\" srcset=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2023\/10\/\u6587\u7ae0\u5185\u914d\u56fe-6-2.png 1280w, https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2023\/10\/\u6587\u7ae0\u5185\u914d\u56fe-6-2-768x510.png 768w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u5e38\u89c1\u95ee\u7b54<\/strong><\/h2>\n\n\n\n<p><strong>1.<\/strong><strong>\u7a0b\u5e8f\u7684\u5e95\u5c42\u8bbe\u8ba1\u548c\u524d\u7aef\u5c55\u793a\u4e4b\u95f4\u6709\u4f55\u8054\u7cfb\uff1f<\/strong><\/p>\n\n\n\n<p>\u7a0b\u5e8f\u7684\u5e95\u5c42\u8bbe\u8ba1\u51b3\u5b9a\u4e86\u6570\u636e\u5904\u7406\u3001\u903b\u8f91\u5904\u7406\u548c\u4fe1\u606f\u4f20\u8f93\u7684\u6548\u7387\u4e0e\u7a33\u5b9a\u6027\u3002\u5982\u679c\u5e95\u5c42\u8bbe\u8ba1\u5f97\u5f53\uff0c\u524d\u7aef\u7684\u5c55\u793a\u4f1a\u66f4\u52a0\u6d41\u7545\u3001\u5feb\u901f\u548c\u7a33\u5b9a\uff1b\u76f8\u53cd\uff0c\u5982\u679c\u5e95\u5c42\u8bbe\u8ba1\u5b58\u5728\u95ee\u9898\uff0c\u53ef\u80fd\u5bfc\u81f4\u524d\u7aef\u52a0\u8f7d\u7f13\u6162\u3001\u529f\u80fd\u5f02\u5e38\u6216\u5176\u5b83\u5c55\u793a\u4e0a\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n<p><strong>2.<\/strong><strong>\u4e3a\u4ec0\u4e48\u8bf4\u524d\u7aef\u53ea\u662f&#8221;\u51b0\u5c71\u4e00\u89d2&#8221;\uff1f<\/strong><\/p>\n\n\n\n<p>\u524d\u7aef\u5c55\u793a\u7684\u5185\u5bb9\u548c\u529f\u80fd\u5f80\u5f80\u57fa\u4e8e\u540e\u7aef\u548c\u5e95\u5c42\u7684\u6570\u636e\u5904\u7406\u3001\u903b\u8f91\u5224\u65ad\u548c\u5176\u4ed6\u590d\u6742\u64cd\u4f5c\u3002\u5c3d\u7ba1\u7528\u6237\u53ea\u80fd\u770b\u5230\u524d\u7aef\u7684\u754c\u9762\uff0c\u4f46\u652f\u6301\u8fd9\u4e2a\u754c\u9762\u7684\u662f\u5927\u91cf\u7684\u540e\u7aef\u4ee3\u7801\u548c\u5e95\u5c42\u7ed3\u6784\u3002\u56e0\u6b64\uff0c\u524d\u7aef\u53ea\u662f\u6574\u4e2a\u5e94\u7528\u7a0b\u5e8f\u7684\u201c\u51b0\u5c71\u4e00\u89d2\u201d\u3002<\/p>\n\n\n\n<p><strong>3.<\/strong><strong>\u5e95\u5c42\u8bbe\u8ba1\u7684\u4e0d\u8db3\u4f1a\u5bf9\u524d\u7aef\u7684\u7528\u6237\u4f53\u9a8c\u4ea7\u751f\u600e\u6837\u7684\u5f71\u54cd\uff1f<\/strong><\/p>\n\n\n\n<p>\u5e95\u5c42\u8bbe\u8ba1\u7684\u4e0d\u8db3\u53ef\u80fd\u5bfc\u81f4\u6570\u636e\u52a0\u8f7d\u7f13\u6162\u3001\u529f\u80fd\u54cd\u5e94\u5ef6\u8fdf\u3001\u9875\u9762\u5361\u987f\u6216\u751a\u81f3\u5d29\u6e83\u3002\u8fd9\u4e9b\u95ee\u9898\u90fd\u4f1a\u4e25\u91cd\u5f71\u54cd\u7528\u6237\u7684\u4f53\u9a8c\uff0c\u5bfc\u81f4\u7528\u6237\u5bf9\u5e94\u7528\u7a0b\u5e8f\u6216\u7f51\u7ad9\u5931\u53bb\u4fe1\u5fc3\u3002<\/p>\n\n\n\n<p><strong>4.<\/strong><strong>\u5982\u679c\u6211\u662f\u4e00\u4e2a\u524d\u7aef\u5f00\u53d1\u8005\uff0c\u6211\u9700\u8981\u4e86\u89e3\u5e95\u5c42\u8bbe\u8ba1\u5417\uff1f<\/strong><\/p>\n\n\n\n<p>\u867d\u7136\u524d\u7aef\u5f00\u53d1\u8005\u4e3b\u8981\u5173\u6ce8\u7528\u6237\u754c\u9762\u548c\u4f53\u9a8c\uff0c\u4f46\u4e86\u89e3\u5e95\u5c42\u8bbe\u8ba1\u53ef\u4ee5\u5e2e\u52a9\u4ed6\u4eec\u66f4\u597d\u5730\u7406\u89e3\u529f\u80fd\u7684\u5de5\u4f5c\u539f\u7406\u3001\u6570\u636e\u7684\u4f20\u8f93\u65b9\u5f0f\u4ee5\u53ca\u53ef\u80fd\u7684\u6027\u80fd\u74f6\u9888\u3002\u8fd9\u53ef\u4ee5\u8ba9\u524d\u7aef\u5f00\u53d1\u8005\u66f4\u52a0\u9ad8\u6548\u5730\u5de5\u4f5c\uff0c\u5e76\u4e0e\u540e\u7aef\u5f00\u53d1\u8005\u66f4\u597d\u5730\u534f\u4f5c\u3002<\/p>\n\n\n\n<p><strong>5.<\/strong><strong>\u4f18\u5316\u5e95\u5c42\u8bbe\u8ba1\u80fd\u5426\u63d0\u9ad8\u524d\u7aef\u7684\u6027\u80fd\uff1f<\/strong><\/p>\n\n\n\n<p>\u7edd\u5bf9\u53ef\u4ee5\u3002\u4f18\u5316\u5e95\u5c42\u8bbe\u8ba1\uff0c\u5982\u63d0\u9ad8\u6570\u636e\u5904\u7406\u901f\u5ea6\u3001\u4f18\u5316\u7b97\u6cd5\u6216\u589e\u5f3a\u670d\u52a1\u5668\u6027\u80fd\uff0c\u90fd\u53ef\u4ee5\u76f4\u63a5\u6216\u95f4\u63a5\u5730\u63d0\u9ad8\u524d\u7aef\u7684\u52a0\u8f7d\u901f\u5ea6\u548c\u54cd\u5e94\u65f6\u95f4\uff0c\u4ece\u800c\u63d0\u5347\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"ZGC (Z Garbage Collector) \u662f Java \u7684\u65b0\u4e00\u4ee3\u5783\u573e\u56de\u6536\u5668\uff0c\u4e13\u4e3a\u89e3\u51b3\u5927\u5185\u5b58\u5e94\u7528\u7a0b\u5e8f\u7684 [&hellip;]","protected":false},"author":5,"featured_media":57358,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/57391"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=57391"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/57391\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/57358"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=57391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=57391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=57391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}