{"id":50438,"date":"2025-08-10T08:14:35","date_gmt":"2025-08-10T00:14:35","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/50438.html"},"modified":"2025-08-10T08:14:35","modified_gmt":"2025-08-10T00:14:35","slug":"jvm%e5%88%86%e4%bb%a3%e5%86%85%e5%ad%98%e6%a8%a1%e5%9e%8b%e6%b7%b1%e5%ba%a6%e8%a7%a3%e6%9e%90%ef%bc%9a%e6%96%b0%e7%94%9f%e4%bb%a3%e4%b8%8e%e8%80%81%e5%b9%b4%e4%bb%a3%e7%9a%84%e6%9e%b6%e6%9e%84","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/50438.html","title":{"rendered":"JVM\u5206\u4ee3\u5185\u5b58\u6a21\u578b\u6df1\u5ea6\u89e3\u6790\uff1a\u65b0\u751f\u4ee3\u4e0e\u8001\u5e74\u4ee3\u7684\u67b6\u6784\u54f2\u5b66\u4e0e\u5b9e\u8df5\u667a\u6167"},"content":{"rendered":"<h2 style=\"background-color:transparent\">\u5206\u4ee3\u5047\u8bf4\u7684\u7406\u8bba\u57fa\u77f3<\/h2>\n<p>\u201c\u5f31\u5206\u4ee3\u5047\u8bf4\u201d&#xff08;Weak Generational Hypothesis&#xff09;\u662fJVM\u5185\u5b58\u5206\u4ee3\u8bbe\u8ba1\u7684\u7406\u8bba\u57fa\u7840&#xff0c;\u5b83\u6307\u51fa&#xff1a;\u7edd\u5927\u591a\u6570\u5bf9\u8c61\u7684\u751f\u547d\u5468\u671f\u90fd\u975e\u5e38\u77ed\u6682\u3002\u8fd9\u4e00\u770b\u4f3c\u7b80\u5355\u7684\u89c2\u5bdf\u7ed3\u8bba&#xff0c;\u5374\u5f7b\u5e95\u6539\u53d8\u4e86\u5783\u573e\u56de\u6536\u6280\u672f\u7684\u53d1\u5c55\u65b9\u5411\u3002\u6839\u636eOracle\u5b98\u65b9\u7edf\u8ba1&#xff0c;\u5728\u5178\u578b\u7684Java\u5e94\u7528\u4e2d&#xff0c;\u7ea698%\u7684\u5bf9\u8c61\u5728\u7b2c\u4e00\u6b21GC\u65f6\u5c31\u4f1a\u88ab\u56de\u6536&#xff0c;\u53ea\u6709\u4e0d\u52302%\u7684\u5bf9\u8c61\u4f1a\u5b58\u6d3b\u8db3\u591f\u957f\u7684\u65f6\u95f4\u8fdb\u5165\u8001\u5e74\u4ee3\u3002<\/p>\n<p>\u8ba9\u6211\u4eec\u7528\u4e00\u4e2a\u57ce\u5e02\u4eba\u53e3\u8fc1\u5f99\u7684\u6bd4\u55bb\u6765\u7406\u89e3\u8fd9\u4e2a\u8bbe\u8ba1&#xff1a;\u65b0\u751f\u4ee3\u5c31\u50cf\u5927\u5b66\u57ce\u2014\u2014\u4eba\u53e3\u6d41\u52a8\u9891\u7e41&#xff0c;\u6bcf\u5e74\u90fd\u6709\u5927\u91cf\u65b0\u751f\u5165\u5b66\u548c\u6bd5\u4e1a\u751f\u79bb\u5f00&#xff1b;\u800c\u8001\u5e74\u4ee3\u5219\u50cf\u5c45\u6c11\u533a\u2014\u2014\u4eba\u53e3\u76f8\u5bf9\u7a33\u5b9a&#xff0c;\u53d8\u5316\u7f13\u6162\u3002\u8fd9\u79cd\u5dee\u5f02\u51b3\u5b9a\u4e86\u6211\u4eec\u9700\u8981\u5bf9\u5b83\u4eec\u91c7\u7528\u5b8c\u5168\u4e0d\u540c\u7684\u7ba1\u7406\u7b56\u7565\u3002<\/p>\n<h2>\u5206\u4ee3\u5185\u5b58\u6a21\u578b\u67b6\u6784\u5168\u666f<\/h2>\n<h3>\u5206\u4ee3\u8bbe\u8ba1\u6838\u5fc3\u601d\u60f3<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1485\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001407-6897e44f671b0.png\" width=\"3840\" \/><\/p>\n<p>\u8bbe\u8ba1\u539f\u7406&#xff1a;<\/p>\n<li>\n<p>\u7a7a\u95f4\u5212\u5206&#xff1a;\u65b0\u751f\u4ee3\u901a\u5e38\u5360\u5806\u7a7a\u95f4\u76841\/3&#xff0c;\u8001\u5e74\u4ee3\u53602\/3&#xff08;\u53ef\u901a\u8fc7-XX:NewRatio\u8c03\u6574&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u5bf9\u8c61\u664b\u5347\u8def\u5f84&#xff1a;Eden \u2192 Survivor \u2192 \u8001\u5e74\u4ee3<\/p>\n<\/li>\n<li>\n<p>\u4ee3\u9645\u9694\u79bb&#xff1a;\u907f\u514d\u5168\u5806\u626b\u63cf&#xff0c;\u51cf\u5c11GC\u5f00\u9500<\/p>\n<\/li>\n<h3>\u5404\u533a\u57df\u9ed8\u8ba4\u6bd4\u4f8b<\/h3>\n<table>\n<tr>\u533a\u57df\u5360\u6bd4\u53c2\u6570\u9ed8\u8ba4\u503c\u8c03\u4f18\u5efa\u8bae<\/tr>\n<tbody>\n<tr>\n<td>\u65b0\u751f\u4ee3\/\u8001\u5e74\u4ee3<\/td>\n<td style=\"text-align:center\">NewRatio<\/td>\n<td style=\"text-align:center\">2<\/td>\n<td>\u77ed\u751f\u547d\u5468\u671f\u5bf9\u8c61\u591a\u65f6\u53ef\u589e\u5927\u65b0\u751f\u4ee3<\/td>\n<\/tr>\n<tr>\n<td>Eden\/Survivor<\/td>\n<td style=\"text-align:center\">SurvivorRatio<\/td>\n<td style=\"text-align:center\">8<\/td>\n<td>\u6839\u636e\u5bf9\u8c61\u5b58\u6d3b\u7387\u8c03\u6574<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8ba1\u7b97\u516c\u5f0f&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"\\\\text{Eden\\\\_size} &#061; \\\\frac{\\\\text{Young\\\\_Generation}}{(\\\\text{SurvivorRatio} &#043; 2)}\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001409-6897e4514375a.png\" \/><\/p>\n<h3>\u8de8\u4ee3\u5f15\u7528\u95ee\u9898\u89e3\u51b3\u65b9\u6848<\/h3>\n<p>\u5206\u4ee3\u8bbe\u8ba1\u5e26\u6765\u7684\u6838\u5fc3\u6311\u6218\u662f\u8de8\u4ee3\u5f15\u7528\u2014\u2014\u8001\u5e74\u4ee3\u5bf9\u8c61\u53ef\u80fd\u5f15\u7528\u65b0\u751f\u4ee3\u5bf9\u8c61\u3002JVM\u901a\u8fc7\u8bb0\u5fc6\u96c6&#xff08;Remembered Set&#xff09;\u89e3\u51b3&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"3840\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001409-6897e45149bb3.png\" width=\"2420\" \/><\/p>\n<p>\u5199\u5c4f\u969c&#xff08;Write Barrier&#xff09;\u7ef4\u62a4\u8de8\u4ee3\u5f15\u7528&#xff1a;<\/p>\n<p>\/\/ \u5199\u5c4f\u969c\u4f2a\u4ee3\u7801<br \/>\nvoid oop_field_store(oop* field, oop new_value) {<br \/>\n    *field &#061; new_value; \/\/ \u6b63\u5e38\u5199\u64cd\u4f5c<br \/>\n    if (cross_generation_ref(field, new_value)) {<br \/>\n        card_table.mark_dirty(field); \/\/ \u6807\u8bb0\u810f\u5361<br \/>\n    }<br \/>\n}<\/p>\n<h2>\u65b0\u751f\u4ee3\u5185\u5b58\u7ba1\u7406\u673a\u5236<\/h2>\n<h3>\u65b0\u751f\u4ee3GC&#xff08;Minor GC&#xff09;\u89e6\u53d1\u6761\u4ef6<\/h3>\n<p>\u89e6\u53d1\u6761\u4ef6\u516c\u5f0f&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"\\\\text{Trigger\\\\_Minor\\\\_GC} &#061; \\\\begin{cases} \\\\text{true}, &amp; \\\\text{if\\\\ Eden\\\\ is\\\\ full} \\\\\\\\ \\\\text{true}, &amp; \\\\text{if\\\\ allocation\\\\ request\\\\ &gt;\\\\ remaining\\\\ space} \\\\\\\\ \\\\text{false}, &amp; \\\\text{otherwise} \\\\end{cases}\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001413-6897e4553fdde.png\" \/><\/p>\n<p>\u5173\u952e\u53c2\u6570&#xff1a;<\/p>\n<ul>\n<li>\n<p>-XX:MaxTenuringThreshold&#xff1a;\u664b\u5347\u9608\u503c&#xff08;\u9ed8\u8ba415&#xff09;<\/p>\n<\/li>\n<li>\n<p>-XX:TargetSurvivorRatio&#xff1a;Survivor\u533a\u76ee\u6807\u4f7f\u7528\u7387&#xff08;\u9ed8\u8ba450%&#xff09;<\/p>\n<\/li>\n<\/ul>\n<h3>\u590d\u5236\u7b97\u6cd5\u5b9e\u73b0\u7ec6\u8282<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"2803\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001413-6897e455489c5.png\" width=\"3840\" \/><\/p>\n<p>\u590d\u5236\u7b97\u6cd5\u4f18\u52bf&#xff1a;<\/p>\n<li>\n<p>\u65e0\u788e\u7247\u95ee\u9898<\/p>\n<\/li>\n<li>\n<p>\u65f6\u95f4\u590d\u6742\u5ea6O(\u5b58\u6d3b\u5bf9\u8c61)<\/p>\n<\/li>\n<li>\n<p>\u7a7a\u95f4\u5c40\u90e8\u6027\u597d<\/p>\n<\/li>\n<h3>\u52a8\u6001\u5e74\u9f84\u8ba1\u7b97<\/h3>\n<p>JVM\u5e76\u4e0d\u4e25\u683c\u9075\u5faaMaxTenuringThreshold&#xff0c;\u800c\u662f\u57fa\u4e8eSurvivor\u533a\u7684\u76ee\u6807\u4f7f\u7528\u7387\u52a8\u6001\u8ba1\u7b97\u664b\u5347\u5e74\u9f84&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"\\\\text{Actual\\\\_Promotion\\\\_Age} &#061; \\\\min\\\\left(\\\\text{Age}\\\\ \\\\text{where}\\\\ \\\\sum_{i&#061;1}^{n}\\\\text{age}_i\\\\text{\\\\_size} &gt; \\\\text{SurvivorSize} \\\\times \\\\text{TargetSurvivorRatio}, \\\\text{MaxTenuringThreshold}\\\\right)\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001417-6897e459492a6.png\" \/><\/p>\n<p>\u793a\u4f8b\u4ee3\u7801\u89c2\u5bdf\u5e74\u9f84\u53d8\u5316&#xff1a;<\/p>\n<p>public class AgeDemo {<br \/>\n    public static void main(String[] args) {<br \/>\n        byte[] obj &#061; new byte[1024*1024]; \/\/ 1MB\u5bf9\u8c61<\/p>\n<p>        for (int i &#061; 0; i &lt; 20; i&#043;&#043;) {<br \/>\n            System.gc(); \/\/ \u624b\u52a8\u89e6\u53d1GC\u89c2\u5bdf\u5e74\u9f84\u589e\u957f<br \/>\n            Thread.sleep(1000);<br \/>\n        }<br \/>\n    }<br \/>\n}<\/p>\n<p>\u4f7f\u7528jmap -histo:live &lt;pid&gt;\u89c2\u5bdf\u5bf9\u8c61\u5e74\u9f84\u3002<\/p>\n<h2>\u8001\u5e74\u4ee3\u5185\u5b58\u7ba1\u7406\u673a\u5236<\/h2>\n<h3>\u8001\u5e74\u4ee3GC&#xff08;Major\/Full GC&#xff09;\u89e6\u53d1\u6761\u4ef6<\/h3>\n<p>\u89e6\u53d1\u6761\u4ef6\u53d6\u51b3\u4e8e\u4f7f\u7528\u7684GC\u7b97\u6cd5&#xff1a;<\/p>\n<table>\n<tr>GC\u7c7b\u578b\u89e6\u53d1\u6761\u4ef6<\/tr>\n<tbody>\n<tr>\n<td>Serial Old<\/td>\n<td>\u7a7a\u95f4\u5206\u914d\u5931\u8d25<\/td>\n<\/tr>\n<tr>\n<td>Parallel Old<\/td>\n<td>\u8001\u5e74\u4ee3\u4f7f\u7528\u7387 &gt;\u00a0-XX:InitiatingHeapOccupancyPercent<\/td>\n<\/tr>\n<tr>\n<td>CMS<\/td>\n<td>\u8001\u5e74\u4ee3\u4f7f\u7528\u7387 &gt; CMSInitiatingOccupancyFraction<\/td>\n<\/tr>\n<tr>\n<td>G1<\/td>\n<td>\u6574\u4e2a\u5806\u4f7f\u7528\u7387 &gt; InitiatingHeapOccupancyPercent<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u6807\u8bb0-\u6e05\u9664\u4e0e\u6807\u8bb0-\u6574\u7406\u7b97\u6cd5\u5bf9\u6bd4<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"2475\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001417-6897e45954eeb.png\" width=\"3840\" \/><\/p>\n<p>\u7b97\u6cd5\u5bf9\u6bd4\u77e9\u9635&#xff1a;<\/p>\n<table>\n<tr>\u7279\u6027\u6807\u8bb0-\u6e05\u9664\u6807\u8bb0-\u6574\u7406<\/tr>\n<tbody>\n<tr>\n<td>\u901f\u5ea6<\/td>\n<td style=\"text-align:center\">\u5feb<\/td>\n<td style=\"text-align:center\">\u6162<\/td>\n<\/tr>\n<tr>\n<td>\u7a7a\u95f4\u5f00\u9500<\/td>\n<td style=\"text-align:center\">\u4f4e<\/td>\n<td style=\"text-align:center\">\u4e2d\u7b49<\/td>\n<\/tr>\n<tr>\n<td>\u5185\u5b58\u788e\u7247<\/td>\n<td style=\"text-align:center\">\u6709<\/td>\n<td style=\"text-align:center\">\u65e0<\/td>\n<\/tr>\n<tr>\n<td>\u541e\u5410\u91cf<\/td>\n<td style=\"text-align:center\">\u9ad8<\/td>\n<td style=\"text-align:center\">\u4e2d\u7b49<\/td>\n<\/tr>\n<tr>\n<td>\u5ef6\u8fdf<\/td>\n<td style=\"text-align:center\">\u4f4e<\/td>\n<td style=\"text-align:center\">\u9ad8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u5927\u5bf9\u8c61\u76f4\u63a5\u8fdb\u5165\u8001\u5e74\u4ee3<\/h3>\n<p>JVM\u901a\u8fc7\u4ee5\u4e0b\u53c2\u6570\u63a7\u5236\u5927\u5bf9\u8c61\u5206\u914d&#xff1a;<\/p>\n<p>-XX:PretenureSizeThreshold&#061;3m  # \u8d85\u8fc73MB\u76f4\u63a5\u5206\u914d\u8001\u5e74\u4ee3<br \/>\n-XX:&#043;NeverTenure               # \u7981\u6b62\u664b\u5347&#xff08;\u6d4b\u8bd5\u7528&#xff09;<br \/>\n-XX:&#043;AlwaysTenure              # \u7acb\u5373\u664b\u5347&#xff08;\u6d4b\u8bd5\u7528&#xff09;<\/p>\n<p>\u5927\u5bf9\u8c61\u5904\u7406\u6d41\u7a0b\u56fe&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"3844\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001421-6897e45d0d0ad.png\" width=\"1978\" \/><\/p>\n<h2>\u5206\u4ee3GC\u534f\u540c\u5de5\u4f5c\u673a\u5236<\/h2>\n<h3>\u4ee3\u9645\u534f\u540cGC\u6d41\u7a0b<\/h3>\n<p>\u4ee5Parallel Scavenge &#043; Parallel Old\u7ec4\u5408\u4e3a\u4f8b&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"3674\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001424-6897e460ab8b1.png\" width=\"3840\" \/><\/p>\n<h3>\u664b\u5347\u5931\u8d25&#xff08;Promotion Failure&#xff09;\u5904\u7406<\/h3>\n<p>\u5f53\u8001\u5e74\u4ee3\u6ca1\u6709\u8db3\u591f\u7a7a\u95f4\u5bb9\u7eb3\u664b\u5347\u5bf9\u8c61\u65f6&#xff0c;\u89e6\u53d1\u664b\u5347\u5931\u8d25&#xff0c;\u5904\u7406\u6d41\u7a0b&#xff1a;<\/p>\n<li>\n<p>\u4e2d\u65ad\u5f53\u524dMinor GC<\/p>\n<\/li>\n<li>\n<p>\u89e6\u53d1Full GC<\/p>\n<\/li>\n<li>\n<p>\u5982\u679cFull GC\u540e\u4ecd\u7a7a\u95f4\u4e0d\u8db3&#xff0c;\u5219\u629b\u51faOOM<\/p>\n<\/li>\n<p>\u5173\u952e\u65e5\u5fd7\u4fe1\u606f&#xff1a;<\/p>\n<p>[GC (Allocation Failure) [PSYoungGen: 8192K-&gt;1008K(9216K)]<br \/>\n[ParOldGen: 10240K-&gt;11008K(20480K)] 18432K-&gt;12016K(29696K),<br \/>\n[Metaspace: 3278K-&gt;3278K(1056768K)], 0.012345 secs]<\/p>\n<h3>\u7a7a\u95f4\u5206\u914d\u62c5\u4fdd\u673a\u5236<\/h3>\n<p>\u5728Minor GC\u524d&#xff0c;JVM\u4f1a\u68c0\u67e5\u8001\u5e74\u4ee3\u6700\u5927\u53ef\u7528\u7a7a\u95f4\u662f\u5426\u5927\u4e8e\u65b0\u751f\u4ee3\u6240\u6709\u5bf9\u8c61\u5927\u5c0f&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"\\\\text{Safety\\\\_Guarantee} &#061; \\\\begin{cases} \\\\text{true}, &amp; \\\\text{Old\\\\_Gen\\\\_contiguous\\\\_space} &gt; \\\\text{Young\\\\_Gen\\\\_total\\\\_size} \\\\\\\\ \\\\text{false}, &amp; \\\\text{otherwise\\\\ check\\\\ HandlePromotionFailure} \\\\end{cases}\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001430-6897e46607d76.png\" \/><\/p>\n<p>\u62c5\u4fdd\u5931\u8d25\u4f1a\u5bfc\u81f4Full GC\u63d0\u524d\u89e6\u53d1\u3002<\/p>\n<h2>\u5206\u4ee3\u8c03\u4f18\u5b9e\u6218\u6307\u5357<\/h2>\n<h3>\u65b0\u751f\u4ee3\u8c03\u4f18\u53c2\u6570\u77e9\u9635<\/h3>\n<table>\n<tr>\u53c2\u6570\u9ed8\u8ba4\u503c\u8c03\u4f18\u5efa\u8bae\u5f71\u54cd\u8303\u56f4<\/tr>\n<tbody>\n<tr>\n<td>-Xmn<\/td>\n<td style=\"text-align:center\">\u65e0<\/td>\n<td style=\"text-align:center\">\u8bbe\u4e3a\u603b\u58061\/3~1\/2<\/td>\n<td style=\"text-align:center\">\u65b0\u751f\u4ee3\u5927\u5c0f<\/td>\n<\/tr>\n<tr>\n<td>-XX:SurvivorRatio<\/td>\n<td style=\"text-align:center\">8<\/td>\n<td style=\"text-align:center\">\u6839\u636e\u5b58\u6d3b\u7387\u8c03\u6574<\/td>\n<td style=\"text-align:center\">Eden\/Survivor\u6bd4<\/td>\n<\/tr>\n<tr>\n<td>-XX:MaxTenuringThreshold<\/td>\n<td style=\"text-align:center\">15<\/td>\n<td style=\"text-align:center\">\u76d1\u63a7\u8c03\u6574<\/td>\n<td style=\"text-align:center\">\u5bf9\u8c61\u664b\u5347\u5e74\u9f84<\/td>\n<\/tr>\n<tr>\n<td>-XX:TargetSurvivorRatio<\/td>\n<td style=\"text-align:center\">50<\/td>\n<td style=\"text-align:center\">\u914d\u5408\u5e74\u9f84\u9608\u503c<\/td>\n<td style=\"text-align:center\">Survivor\u4f7f\u7528\u7387<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u8001\u5e74\u4ee3\u8c03\u4f18\u7b56\u7565<\/h3>\n<p>CMS\u8c03\u4f18\u793a\u4f8b&#xff1a;<\/p>\n<p>-XX:&#043;UseConcMarkSweepGC<br \/>\n-XX:CMSInitiatingOccupancyFraction&#061;75  # \u63d0\u524d\u542f\u52a8\u907f\u514d\u5e76\u53d1\u6a21\u5f0f\u5931\u8d25<br \/>\n-XX:&#043;UseCMSInitiatingOccupancyOnly<br \/>\n-XX:&#043;ExplicitGCInvokesConcurrent      # System.gc()\u89e6\u53d1CMS<br \/>\n-XX:&#043;CMSScavengeBeforeRemark          # \u91cd\u65b0\u6807\u8bb0\u524dMinor GC<\/p>\n<p>G1\u8c03\u4f18\u8981\u70b9&#xff1a;<\/p>\n<p>-XX:G1HeapRegionSize&#061;4m               # \u5927\u5806\u8bbe\u7f6e\u8f83\u5927Region<br \/>\n-XX:InitiatingHeapOccupancyPercent&#061;45  # \u66f4\u65e9\u542f\u52a8\u5e76\u53d1\u5468\u671f<br \/>\n-XX:G1NewSizePercent&#061;5                # \u65b0\u751f\u4ee3\u6700\u5c0f\u5360\u6bd4<br \/>\n-XX:G1MaxNewSizePercent&#061;60            # \u65b0\u751f\u4ee3\u6700\u5927\u5360\u6bd4<\/p>\n<h3>\u5206\u4ee3\u5927\u5c0f\u8ba1\u7b97\u793a\u4f8b<\/h3>\n<p>\u5047\u8bbe\u603b\u58064GB&#xff0c;NewRatio&#061;2&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"\\\\text{Young\\\\_Gen} &#061; \\\\frac{4\\\\text{GB}}{2 &#043; 1} \\\\approx 1.33\\\\text{GB}\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001430-6897e466107f3.png\" \/><\/p>\n<p><img decoding=\"async\" alt=\"\\\\text{Old\\\\_Gen} &#061; 4\\\\text{GB} - 1.33\\\\text{GB} &#061; 2.67\\\\text{GB}\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001430-6897e466170d8.png\" \/><\/p>\n<p>SurvivorRatio&#061;8\u65f6&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"\\\\text{Survivor\\\\_Size} &#061; \\\\frac{1.33\\\\text{GB}}{8 &#043; 2} \\\\approx 133\\\\text{MB}\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001430-6897e4661f3b5.png\" \/><\/p>\n<p><img decoding=\"async\" alt=\"\\\\text{Eden\\\\_Size} &#061; 1.33\\\\text{GB} - 2 \\\\times 133\\\\text{MB} \\\\approx 1.06\\\\text{GB}\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001430-6897e46625984.png\" \/><\/p>\n<h2>\u5206\u4ee3\u6a21\u578b\u95ee\u9898\u8bca\u65ad<\/h2>\n<h3>\u5e38\u89c1\u95ee\u9898\u5206\u7c7b<\/h3>\n<table>\n<tr>\u75c7\u72b6\u53ef\u80fd\u539f\u56e0\u8bca\u65ad\u65b9\u6cd5<\/tr>\n<tbody>\n<tr>\n<td>\u9891\u7e41Minor GC<\/td>\n<td>Eden\u8fc7\u5c0f<\/td>\n<td>jstat -gcutil<\/td>\n<\/tr>\n<tr>\n<td>\u8fc7\u65e9\u664b\u5347<\/td>\n<td>Survivor\u4e0d\u8db3<\/td>\n<td>\u5bf9\u8c61\u5e74\u9f84\u5206\u6790<\/td>\n<\/tr>\n<tr>\n<td>Full GC\u9891\u7e41<\/td>\n<td>\u8001\u5e74\u4ee3\u8fc7\u5c0f<\/td>\n<td>GC\u65e5\u5fd7\u5206\u6790<\/td>\n<\/tr>\n<tr>\n<td>\u957f\u65f6\u95f4GC\u505c\u987f<\/td>\n<td>\u664b\u5347\u5931\u8d25<\/td>\n<td>-XX:&#043;PrintPromotionFailure<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>GC\u65e5\u5fd7\u5206\u6790\u793a\u4f8b<\/h3>\n<p>[GC (Allocation Failure)<br \/>\n[PSYoungGen: 6144K-&gt;608K(6400K)]<br \/>\n10240K-&gt;4768K(19968K), 0.0034 secs]<\/p>\n<p>\u5b57\u6bb5\u89e3\u6790&#xff1a;<\/p>\n<ul>\n<li>\n<p>6144K-&gt;608K&#xff1a;GC\u524d\/\u540e\u65b0\u751f\u4ee3\u4f7f\u7528\u91cf<\/p>\n<\/li>\n<li>\n<p>(6400K)&#xff1a;\u65b0\u751f\u4ee3\u603b\u5bb9\u91cf<\/p>\n<\/li>\n<li>\n<p>10240K-&gt;4768K&#xff1a;GC\u524d\/\u540e\u5806\u603b\u4f7f\u7528\u91cf<\/p>\n<\/li>\n<li>\n<p>0.0034 secs&#xff1a;\u6682\u505c\u65f6\u95f4<\/p>\n<\/li>\n<\/ul>\n<h3>\u5bf9\u8c61\u5206\u5e03\u5206\u6790\u5de5\u5177<\/h3>\n<p># \u5806\u76f4\u65b9\u56fe<br \/>\njmap -histo:live &lt;pid&gt;<\/p>\n<p># \u5bf9\u8c61\u5e74\u9f84\u5206\u5e03<br \/>\njmap -histo:live &lt;pid&gt; | grep -E &#039;Instance|Total&#039;<\/p>\n<p># Survivor\u533a\u4f7f\u7528\u60c5\u51b5<br \/>\njstat -gc &lt;pid&gt; 1000 5<\/p>\n<h2>\u5206\u4ee3\u8bbe\u8ba1\u7684\u672a\u6765\u6f14\u8fdb<\/h2>\n<h3>ZGC\u7684\u5206\u4ee3\u5316\u6539\u8fdb<\/h3>\n<p>ZGC\u6700\u521d\u91c7\u7528\u4e0d\u5206\u4ee3\u8bbe\u8ba1&#xff0c;\u4f46\u5728JDK 16\u4e2d\u5f15\u5165\u5b9e\u9a8c\u6027\u5206\u4ee3\u652f\u6301&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"2972\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001430-6897e4662d968.png\" width=\"3848\" \/><\/p>\n<p>\u5206\u4ee3ZGC\u4f18\u52bf&#xff1a;<\/p>\n<li>\n<p>\u5e74\u8f7b\u4ee3\u6536\u96c6\u9891\u7387\u66f4\u9ad8<\/p>\n<\/li>\n<li>\n<p>\u51cf\u5c11\u8001\u5e74\u4ee3\u626b\u63cf\u5f00\u9500<\/p>\n<\/li>\n<li>\n<p>\u964d\u4f4e\u5185\u5b58\u5360\u7528<\/p>\n<\/li>\n<h3>Shenandoah\u7684Generational\u6a21\u5f0f<\/h3>\n<p>Shenandoah GC\u5728JDK 21\u4e2d\u5f15\u5165\u5206\u4ee3\u652f\u6301&#xff1a;<\/p>\n<p>-XX:&#043;UnlockExperimentalVMOptions<br \/>\n-XX:&#043;ShenandoahGCMode&#061;generational<\/p>\n<p>\u6539\u8fdb\u6548\u679c&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u541e\u5410\u91cf\u63d0\u534720-30%<\/p>\n<\/li>\n<li>\n<p>\u6682\u505c\u65f6\u95f4\u51cf\u5c1150%<\/p>\n<\/li>\n<li>\n<p>\u5185\u5b58\u5f00\u9500\u964d\u4f4e15%<\/p>\n<\/li>\n<\/ul>\n<h3>\u5206\u4ee3\u6a21\u578b\u7684\u6839\u672c\u6311\u6218<\/h3>\n<li>\n<p>\u5bf9\u8c61\u5e74\u9f84\u9884\u6d4b\u96be\u9898&#xff1a;\u90e8\u5206\u4e2d\u95f4\u5bff\u547d\u5bf9\u8c61\u7834\u574f\u5206\u4ee3\u5047\u8bbe<\/p>\n<\/li>\n<li>\n<p>\u8de8\u4ee3\u5f15\u7528\u5f00\u9500&#xff1a;\u8bb0\u5fc6\u96c6\u7ef4\u62a4\u6210\u672c\u968f\u5806\u589e\u5927\u800c\u589e\u52a0<\/p>\n<\/li>\n<li>\n<p>\u73b0\u4ee3\u786c\u4ef6\u5f71\u54cd&#xff1a;\u5927\u5185\u5b58\u3001NUMA\u67b6\u6784\u5bf9\u5206\u4ee3\u8bbe\u8ba1\u63d0\u51fa\u65b0\u8981\u6c42<\/p>\n<\/li>\n<h2 style=\"background-color:transparent\">\u7ed3\u8bed&#xff1a;\u5206\u4ee3\u8bbe\u8ba1\u7684\u67b6\u6784\u54f2\u5b66<\/h2>\n<p>JVM\u7684\u5206\u4ee3\u5185\u5b58\u6a21\u578b\u5c55\u73b0\u4e86\u8ba1\u7b97\u673a\u79d1\u5b66\u4e2d\u4e00\u4e2a\u6df1\u523b\u7684\u5de5\u7a0b\u667a\u6167&#xff1a;\u901a\u8fc7\u7a7a\u95f4\u5212\u5206\u6362\u53d6\u65f6\u95f4\u6548\u7387\u3002\u8fd9\u79cd\u8bbe\u8ba1\u80cc\u540e\u8574\u542b\u7740\u51e0\u4e2a\u5173\u952e\u67b6\u6784\u539f\u5219&#xff1a;<\/p>\n<li>\n<p>\u5c40\u90e8\u6027\u539f\u7406\u7684\u5e94\u7528&#xff1a;\u5229\u7528\u5bf9\u8c61\u751f\u547d\u5468\u671f\u7684\u5f3a\u5c40\u90e8\u6027\u7279\u5f81<\/p>\n<\/li>\n<li>\n<p>\u5206\u800c\u6cbb\u4e4b\u7b56\u7565&#xff1a;\u5bf9\u4e0d\u540c\u7279\u6027\u7684\u5bf9\u8c61\u91c7\u7528\u5dee\u5f02\u5316\u7ba1\u7406<\/p>\n<\/li>\n<li>\n<p>\u6743\u8861\u7684\u827a\u672f&#xff1a;\u5728\u541e\u5410\u91cf\u3001\u5ef6\u8fdf\u548c\u5185\u5b58\u5f00\u9500\u95f4\u5bfb\u627e\u5e73\u8861\u70b9<\/p>\n<\/li>\n<p>\u6b63\u5982\u8ba1\u7b97\u673a\u79d1\u5b66\u5bb6David Wheeler\u6240\u8bf4&#xff1a;\u201cAll problems in computer science can be solved by another level of indirection\u201d&#xff08;\u8ba1\u7b97\u673a\u79d1\u5b66\u4e2d\u7684\u6240\u6709\u95ee\u9898\u90fd\u53ef\u4ee5\u901a\u8fc7\u589e\u52a0\u4e00\u4e2a\u95f4\u63a5\u5c42\u6765\u89e3\u51b3&#xff09;\u3002\u5206\u4ee3\u8bbe\u8ba1\u6b63\u662f\u8fd9\u4e00\u601d\u60f3\u7684\u5b8c\u7f8e\u4f53\u73b0&#xff0c;\u5b83\u901a\u8fc7\u5728\u5bf9\u8c61\u548c\u5185\u5b58\u7ba1\u7406\u4e4b\u95f4\u5f15\u5165\u4ee3\u9645\u62bd\u8c61\u5c42&#xff0c;\u4ece\u6839\u672c\u4e0a\u63d0\u5347\u4e86\u5185\u5b58\u7ba1\u7406\u6548\u7387\u3002<\/p>\n<p>\u7406\u89e3\u65b0\u751f\u4ee3\u4e0e\u8001\u5e74\u4ee3\u7684\u5de5\u4f5c\u539f\u7406&#xff0c;\u4e0d\u4ec5\u6709\u52a9\u4e8e\u6211\u4eec\u66f4\u597d\u5730\u8c03\u4f18JVM&#xff0c;\u66f4\u80fd\u57f9\u517b\u4e00\u79cd\u201c\u5dee\u5f02\u5316\u7ba1\u7406\u201d\u7684\u7cfb\u7edf\u601d\u7ef4\u2014\u2014\u8fd9\u662f\u6bcf\u4e2a\u9ad8\u7ea7\u67b6\u6784\u5e08\u90fd\u5e94\u8be5\u5177\u5907\u7684\u6838\u5fc3\u80fd\u529b\u3002\u5728\u65e5\u76ca\u590d\u6742\u7684\u6280\u672f\u73af\u5883\u4e2d&#xff0c;\u8fd9\u79cd\u80fd\u591f\u8bc6\u522b\u4e0d\u540c\u5bf9\u8c61\u7279\u6027\u5e76\u9488\u5bf9\u6027\u4f18\u5316\u7684\u80fd\u529b&#xff0c;\u5c06\u6210\u4e3a\u6211\u4eec\u6784\u5efa\u9ad8\u6027\u80fd\u7cfb\u7edf\u7684\u5173\u952e\u6b66\u5668\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.4k\u6b21\uff0c\u70b9\u8d5e44\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u901a\u8fc7\u7a7a\u95f4\u5212\u5206\u6362\u53d6\u65f6\u95f4\u6548\u7387\u3002\u5c40\u90e8\u6027\u539f\u7406\u7684\u5e94\u7528\uff1a\u5229\u7528\u5bf9\u8c61\u751f\u547d\u5468\u671f\u7684\u5f3a\u5c40\u90e8\u6027\u7279\u5f81\u5206\u800c\u6cbb\u4e4b\u7b56\u7565\uff1a\u5bf9\u4e0d\u540c\u7279\u6027\u7684\u5bf9\u8c61\u91c7\u7528\u5dee\u5f02\u5316\u7ba1\u7406\u6743\u8861\u7684\u827a\u672f\uff1a\u5728\u541e\u5410\u91cf\u3001\u5ef6\u8fdf\u548c\u5185\u5b58\u5f00\u9500\u95f4\u5bfb\u627e\u5e73\u8861\u70b9\u6b63\u5982\u8ba1\u7b97\u673a\u79d1\u5b66\u5bb6David Wheeler\u6240\u8bf4\uff1a\u201cAll problems in computer science can be solved by another level of indirection\u201d\uff08\u8ba1\u7b97\u673a\u79d1\u5b66\u4e2d\u7684\u6240\u6709\u95ee\u9898\u90fd\u53ef\u4ee5\u901a\u8fc7\u589e\u52a0\u4e00\u4e2a\u95f4\u63a5\u5c42\u6765\u89e3\u51b3\uff09\u3002<\/p>\n","protected":false},"author":2,"featured_media":50421,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,426,763,664,1348,188,442],"topic":[],"class_list":["post-50438","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-java","tag-jvm","tag-763","tag-664","tag-1348","tag-188","tag-442"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JVM\u5206\u4ee3\u5185\u5b58\u6a21\u578b\u6df1\u5ea6\u89e3\u6790\uff1a\u65b0\u751f\u4ee3\u4e0e\u8001\u5e74\u4ee3\u7684\u67b6\u6784\u54f2\u5b66\u4e0e\u5b9e\u8df5\u667a\u6167 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/50438.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JVM\u5206\u4ee3\u5185\u5b58\u6a21\u578b\u6df1\u5ea6\u89e3\u6790\uff1a\u65b0\u751f\u4ee3\u4e0e\u8001\u5e74\u4ee3\u7684\u67b6\u6784\u54f2\u5b66\u4e0e\u5b9e\u8df5\u667a\u6167 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.4k\u6b21\uff0c\u70b9\u8d5e44\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u901a\u8fc7\u7a7a\u95f4\u5212\u5206\u6362\u53d6\u65f6\u95f4\u6548\u7387\u3002\u5c40\u90e8\u6027\u539f\u7406\u7684\u5e94\u7528\uff1a\u5229\u7528\u5bf9\u8c61\u751f\u547d\u5468\u671f\u7684\u5f3a\u5c40\u90e8\u6027\u7279\u5f81\u5206\u800c\u6cbb\u4e4b\u7b56\u7565\uff1a\u5bf9\u4e0d\u540c\u7279\u6027\u7684\u5bf9\u8c61\u91c7\u7528\u5dee\u5f02\u5316\u7ba1\u7406\u6743\u8861\u7684\u827a\u672f\uff1a\u5728\u541e\u5410\u91cf\u3001\u5ef6\u8fdf\u548c\u5185\u5b58\u5f00\u9500\u95f4\u5bfb\u627e\u5e73\u8861\u70b9\u6b63\u5982\u8ba1\u7b97\u673a\u79d1\u5b66\u5bb6David Wheeler\u6240\u8bf4\uff1a\u201cAll problems in computer science can be solved by another level of indirection\u201d\uff08\u8ba1\u7b97\u673a\u79d1\u5b66\u4e2d\u7684\u6240\u6709\u95ee\u9898\u90fd\u53ef\u4ee5\u901a\u8fc7\u589e\u52a0\u4e00\u4e2a\u95f4\u63a5\u5c42\u6765\u89e3\u51b3\uff09\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/50438.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-10T00:14:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001407-6897e44f671b0.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/50438.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/50438.html\",\"name\":\"JVM\u5206\u4ee3\u5185\u5b58\u6a21\u578b\u6df1\u5ea6\u89e3\u6790\uff1a\u65b0\u751f\u4ee3\u4e0e\u8001\u5e74\u4ee3\u7684\u67b6\u6784\u54f2\u5b66\u4e0e\u5b9e\u8df5\u667a\u6167 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-10T00:14:35+00:00\",\"dateModified\":\"2025-08-10T00:14:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/50438.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/50438.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/50438.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JVM\u5206\u4ee3\u5185\u5b58\u6a21\u578b\u6df1\u5ea6\u89e3\u6790\uff1a\u65b0\u751f\u4ee3\u4e0e\u8001\u5e74\u4ee3\u7684\u67b6\u6784\u54f2\u5b66\u4e0e\u5b9e\u8df5\u667a\u6167\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JVM\u5206\u4ee3\u5185\u5b58\u6a21\u578b\u6df1\u5ea6\u89e3\u6790\uff1a\u65b0\u751f\u4ee3\u4e0e\u8001\u5e74\u4ee3\u7684\u67b6\u6784\u54f2\u5b66\u4e0e\u5b9e\u8df5\u667a\u6167 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/50438.html","og_locale":"zh_CN","og_type":"article","og_title":"JVM\u5206\u4ee3\u5185\u5b58\u6a21\u578b\u6df1\u5ea6\u89e3\u6790\uff1a\u65b0\u751f\u4ee3\u4e0e\u8001\u5e74\u4ee3\u7684\u67b6\u6784\u54f2\u5b66\u4e0e\u5b9e\u8df5\u667a\u6167 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.4k\u6b21\uff0c\u70b9\u8d5e44\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u901a\u8fc7\u7a7a\u95f4\u5212\u5206\u6362\u53d6\u65f6\u95f4\u6548\u7387\u3002\u5c40\u90e8\u6027\u539f\u7406\u7684\u5e94\u7528\uff1a\u5229\u7528\u5bf9\u8c61\u751f\u547d\u5468\u671f\u7684\u5f3a\u5c40\u90e8\u6027\u7279\u5f81\u5206\u800c\u6cbb\u4e4b\u7b56\u7565\uff1a\u5bf9\u4e0d\u540c\u7279\u6027\u7684\u5bf9\u8c61\u91c7\u7528\u5dee\u5f02\u5316\u7ba1\u7406\u6743\u8861\u7684\u827a\u672f\uff1a\u5728\u541e\u5410\u91cf\u3001\u5ef6\u8fdf\u548c\u5185\u5b58\u5f00\u9500\u95f4\u5bfb\u627e\u5e73\u8861\u70b9\u6b63\u5982\u8ba1\u7b97\u673a\u79d1\u5b66\u5bb6David Wheeler\u6240\u8bf4\uff1a\u201cAll problems in computer science can be solved by another level of indirection\u201d\uff08\u8ba1\u7b97\u673a\u79d1\u5b66\u4e2d\u7684\u6240\u6709\u95ee\u9898\u90fd\u53ef\u4ee5\u901a\u8fc7\u589e\u52a0\u4e00\u4e2a\u95f4\u63a5\u5c42\u6765\u89e3\u51b3\uff09\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/50438.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-10T00:14:35+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810001407-6897e44f671b0.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/50438.html","url":"https:\/\/www.wsisp.com\/helps\/50438.html","name":"JVM\u5206\u4ee3\u5185\u5b58\u6a21\u578b\u6df1\u5ea6\u89e3\u6790\uff1a\u65b0\u751f\u4ee3\u4e0e\u8001\u5e74\u4ee3\u7684\u67b6\u6784\u54f2\u5b66\u4e0e\u5b9e\u8df5\u667a\u6167 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-10T00:14:35+00:00","dateModified":"2025-08-10T00:14:35+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/50438.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/50438.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/50438.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"JVM\u5206\u4ee3\u5185\u5b58\u6a21\u578b\u6df1\u5ea6\u89e3\u6790\uff1a\u65b0\u751f\u4ee3\u4e0e\u8001\u5e74\u4ee3\u7684\u67b6\u6784\u54f2\u5b66\u4e0e\u5b9e\u8df5\u667a\u6167"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/50438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=50438"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/50438\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/50421"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=50438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=50438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=50438"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=50438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}