{"id":111415,"date":"2024-12-13T07:09:10","date_gmt":"2024-12-12T23:09:10","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=111415"},"modified":"2024-12-13T07:09:10","modified_gmt":"2024-12-12T23:09:10","slug":"jdk11-reduce-delay","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/jdk11-reduce-delay.html","title":{"rendered":"JDK11\u5c06\u65b0\u589e\u5927\u5e45\u964d\u4f4eGC\u5ef6\u8fdf\u7684ZGC\u529f\u80fd"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u4e4b\u524d\u6211\u4eec\u62a5\u5bfc\u8fc7JDK 11 \u8fdb\u5165\u7279\u6027\u51bb\u7ed3\u9636\u6bb5\uff0c\u4eca\u5929\u6765\u770b\u770bJEP 333\u4e3a\u4e86\u5927\u5e45\u51cf\u5c11 GC \u6682\u505c\u65f6\u95f4\u7684\u53ef\u4f38\u7f29\u4f4e\u5ef6\u8fdf\u5783\u573e\u56de\u6536\u5668 ZGC\uff08Scalable Low-Latency Garbage Collector\u00a0\uff09\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n GC \u4e00\u76f4\u4ee5\u6765\u662f Java \u7684\u4e3b\u8981\u4f18\u52bf\u4e4b\u4e00\uff0c\u4f46\u662f\uff0c\u5f53\u5783\u573e\u56de\u6536\u6682\u505c\u65f6\u95f4\u8fc7\u957f\u65f6\uff0c\u4f1a\u5bf9\u5e94\u7528\u7a0b\u5e8f\u7684\u54cd\u5e94\u65f6\u95f4\u4ea7\u751f\u8d1f\u9762\u5f71\u54cd\uff0c\u800c\u73b0\u4ee3\u7cfb\u7edf\u4e2d\u53ef\u7528\u7684\u5185\u5b58\u91cf\u4e0d\u65ad\u589e\u957f\uff0c\u7528\u6237\u548c\u5e94\u7528\u5f00\u53d1\u4eba\u5458\u5e0c\u671b JVM \u80fd\u591f\u4ee5\u9ad8\u6548\u7684\u65b9\u5f0f\u5145\u5206\u5229\u7528\u6b64\u5185\u5b58\uff0c\u5e76\u4e14\u4e0d\u8981\u6709\u8fc7\u957f\u7684 GC \u6682\u505c\u65f6\u95f4\u3002\u6b64\u6b21\u5c06\u65b0\u589e\u7684 ZGC \u529f\u80fd\uff0c\u80fd\u591f\u6d88\u9664\u6216\u5927\u5e45\u7f29\u77ed GC \u6682\u505c\u7684\u65f6\u95f4\u3002<\/p>\n ZGC \u6709\u4ee5\u4e0b\u51e0\u4e2a\u76ee\u6807\uff1a ZGC \u662f\u4e00\u4e2a\u5e76\u53d1\u7684\u3001\u5355\u4ee3\u7684\u3001\u57fa\u4e8e\u533a\u57df\u7684\u3001NUMA \u611f\u77e5\u7684\u538b\u7f29\u6536\u96c6\u5668\uff0cStop-the-world \u9636\u6bb5\u4ec5\u9650\u4e8e\u6839\u626b\u63cf\uff0c\u56e0\u6b64 GC \u6682\u505c\u65f6\u95f4\u4e0d\u4f1a\u968f\u5806\u6216\u6d3b\u52a8\u96c6\uff08live set\uff09\u7684\u53d8\u5927\u800c\u589e\u52a0\u3002<\/p>\n ZGC \u7684\u6838\u5fc3\u8bbe\u8ba1\u539f\u5219\/\u9009\u62e9\u662f\u5c06\u52a0\u8f7d\u5c4f\u969c\u4e0e\u6709\u8272\u5bf9\u8c61\u6307\u9488\uff08colored oops\uff09\u7ed3\u5408\u4f7f\u7528\uff0c\u8fd9\u4f7f\u5f97 ZGC \u80fd\u591f\u5728 Java \u5e94\u7528\u7a0b\u5e8f\u7ebf\u7a0b\u8fd0\u884c\u65f6\u6267\u884c\u5e76\u53d1\u64cd\u4f5c\uff0c\u4f8b\u5982\u5bf9\u8c61\u91cd\u5b9a\u5411\u3002\u4ece Java \u7ebf\u7a0b\u7684\u89d2\u5ea6\u6765\u770b\uff0c\u5728 Java \u5bf9\u8c61\u4e2d\u52a0\u8f7d\u5f15\u7528\u5b57\u6bb5\u7684\u884c\u4e3a\u53d7\u5230\u52a0\u8f7d\u5c4f\u969c\u7684\u5f71\u54cd\u3002\u9664\u4e86\u5bf9\u8c61\u5730\u5740\u4e4b\u5916\uff0ccolored oops \u8fd8\u5305\u542b\u52a0\u8f7d\u5c4f\u969c\u4f7f\u7528\u7684\u4fe1\u606f\uff0c\u4ee5\u786e\u5b9a\u5728\u5141\u8bb8 Java \u7ebf\u7a0b\u4f7f\u7528\u6307\u9488\u4e4b\u524d\u662f\u5426\u9700\u8981\u91c7\u53d6\u67d0\u4e9b\u64cd\u4f5c\u3002\u4f8b\u5982\uff0c\u5bf9\u8c61\u6709\u53ef\u80fd\u5df2\u7ecf\u88ab\u91cd\u5b9a\u5411\uff0c\u90a3\u4e48\u52a0\u8f7d\u5c4f\u969c\u5c06\u5bf9\u6b64\u8fdb\u884c\u68c0\u6d4b\u5e76\u91c7\u53d6\u9002\u5f53\u7684\u64cd\u4f5c\u3002<\/p>\n JEP 333 \u8fd8\u5c55\u793a\u4e86 ZGC \u7684\u6027\u80fd\u7b49\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bbf\u95ee\u00a0http:\/\/openjdk.java.net\/jeps\/333 \u67e5\u770b\u3002<\/p>\n \n |