{"id":4152,"date":"2019-04-25T15:47:03","date_gmt":"2019-04-25T07:47:03","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=4152"},"modified":"2019-04-25T15:47:03","modified_gmt":"2019-04-25T07:47:03","slug":"%e4%bd%a0%e9%9d%a2%e8%af%95%e8%bf%87%e7%a8%8b%e4%b8%ad%e7%9a%84%e6%8b%a6%e8%b7%af%e8%99%8e-minorgc","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=4152","title":{"rendered":"\u4f60\u9762\u8bd5\u8fc7\u7a0b\u4e2d\u7684\u62e6\u8def\u864e MinorGC"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u6628\u5929\uff0c\u6211\u4e00\u4e2a\u670b\u53cb\u7ed9\u6211\u8bf4\u4ed6\u5728\u6296\u97f3\u4e0a\u53d1\u4e86\u4e00\u4e2a\u77ed\u89c6\u9891\uff0c\u83b7\u5f97\u4e86 300 \u4e2a\u8d5e\u3002\u6211\u8bf4\uff0c\u4f60\u8981\u4e48\u88ab\u6296\u97f3\u5e9f\u4e86\uff0c\u8981\u4e48\u5c31\u5e9f\u4e86(\u5378\u8f7d)\u6296\u97f3\uff0c\u8981\u4e48\u4f60\u5c31\u628a\u6296\u97f3\u73a9\u5230\u6781\u81f4\uff0c\u6210\u4e3a\u6296\u97f3\u7f51\u7ea2\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u5728\u4e0b\u8f7d\u6296\u97f3\u7684\u65f6\u5019\uff0c\u73a9\u4e86\u4e00\u4e2a\u5c0f\u65f6\u5c31\u628a\u5b83\u5378\u8f7d\u4e86\u3002\u56e0\u4e3a\u6211\u6df1\u77e5\uff0c\u8981\u60f3\u6210\u529f\uff0c\u4fbf\u4e0d\u8981\u6c89\u8ff7\u4e8e\u80fd\u8f7b\u6613\u7ed9\u4f60\u77ed\u671f\u5feb\u611f\u7684\u4e00\u5207\u4e1c\u897f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5176\u5b9e\uff0c\u4f5c\u4e3a\u7a0b\u5e8f\u5458\u4e5f\u662f\u4e00\u6837\u7684\u3002\u5e73\u65f6\u5de5\u4f5c\uff0c\u4f60\u9762\u5411\u767e\u5ea6\u7f16\u7a0b\u3002\u6162\u6162\u7684\u4f60\u4f1a\u8ff7\u4e0a\u641c\u7d22\uff0c\u65e0\u6cd5\u6446\u8131\u5b83\u3002\u4e0d\u60f3\u770b\u4e66\uff0c\u4e5f\u4e0d\u60f3\u8fdb\u6b65\u53bb\u5b66\u4e60\uff0c\u56e0\u4e3a\u6240\u6709\u7684\u4e1c\u897f\uff0c\u5728\u4f60\u773c\u91cc\u770b\u8d77\u6765\u662f\u4e00\u641c\u7d22\u5c31\u80fd\u89e3\u51b3\u3002\u5176\u5b9e\uff0c\u8fd9\u53ea\u662f\u4f60\u5e9f\u4e86\u7684\u5f00\u59cb\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4eca\u5929\u6211\u7ed9\u5927\u5bb6\u8bb2\u4e00\u4e0b\uff0c\u8fdb\u9636\u4e2d\u7ea7\u3001\u9ad8\u7ea7\u3001\u4e13\u5bb6\u7ea7\u3002\u3002\u3002\u7684\u5fc5\u5907\u8bfe\uff0cGC \u4e2d\u7684 MinorGC\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">JVM \u4e2d\u7684\u5806\uff0c\u4e00\u822c\u5206\u4e3a\u4e09\u5927\u90e8\u5206\uff1a\u65b0\u751f\u4ee3\u3001\u8001\u5e74\u4ee3\u3001\u6c38\u4e45\u4ee3\u3002\u65b0\u751f\u4ee3\u901a\u5e38\u4f7f\u7528 MinorGC\uff0c\u8001\u5e74\u4ee3\u901a\u5e38\u4f7f\u7528 MajorGC\uff0c\u6c38\u4e45\u4ee3\u901a\u5e38\u4f7f\u7528 Full GC\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/wx1.sinaimg.cn\/large\/8fa5dcfcgy1g2exagi7xpj20in07yn12.jpg\" alt=\"\u65b0\u751f\u4ee3 MinorGC\u3001\u8001\u5e74\u4ee3 MajorGC\u3001\u6c38\u4e45\u4ee3\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u65b0\u751f\u4ee3\u4e3b\u8981\u662f\u7528\u6765\u5b58\u653e\u65b0\u751f\u7684\u5bf9\u8c61\u3002\u4e00\u822c\u5360\u636e\u5806\u76841\/3\u7a7a\u95f4\u3002\u7531\u4e8e\u9891\u7e41\u521b\u5efa\u5bf9\u8c61\uff0c\u6240\u4ee5\u65b0\u751f\u4ee3\u4f1a\u9891\u7e41\u89e6\u53d1 MinorGC \u8fdb\u884c\u5783\u573e\u56de\u6536\u3002\u65b0\u751f\u4ee3 MinorGC \u53c8\u901a\u5e38\u88ab\u5206\u4e3a\uff1aEden \u533a\u3001ServivorFrom\u3001ServivorTo \u4e09\u4e2a\u533a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MinorGC \u901a\u5e38\u91c7\u7528\u590d\u5236\u7b97\u6cd5\u3002\u6d41\u7a0b\u662f\u5148\u590d\u5236\uff0c\u518d\u6e05\u7a7a\uff0c\u6700\u540e\u4e92\u6362\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u590d\u5236\u7684\u8fc7\u7a0b\u5f88\u7b80\u5355\u3002\u9996\u5148\uff0cEden \u533a\u6ee1\u7684\u65f6\u5019\u56de\u51fa\u53d1\u7b2c\u4e00\u6b21 GC\uff0c\u628a\u5b58\u6d3b\u7684\u5bf9\u8c61\u62f7\u8d1d\u5230 SurvivorFrom \u533a\uff0c\u5f53 Eden \u533a\u518d\u6b21\u51fa\u53d1 GC \u7684\u65f6\u5019\u4f1a\u626b\u63cf Eden \u533a\u548c From \u533a\uff0c\u5bf9\u8fd9\u4e24\u4e2a\u533a\u57df\u8fdb\u884c\u5783\u573e\u56de\u6536\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7ecf\u8fc7\u8fd9\u6b21\u56de\u6536\u540e\u8fd8\u5b58\u6d3b\u7684\u5bf9\u8c61\uff0c\u5219\u76f4\u63a5\u590d\u5236\u5230 To \u533a\uff0c\u540c\u65f6\u5c06\u8fd9\u4e9b\u5bf9\u8c61\u7684\u5e74\u9f84 +1\u3002\u5982\u679c\u6709\u5bf9\u8c61\u5e74\u9f84\u5df2\u7ecf\u8fbe\u5230\u4e86\u8001\u5e74\u7684\u6807\u51c6(\u5e74\u9f84\u9608\u503c\uff0c\u53ef\u4ee5\u901a\u8fc7-XX:MaxTenuringThreshold\u6765\u8bbe\u7f6e)\uff0c\u5219\u76f4\u63a5\u590d\u5236\u5230\u8001\u5e74\u4ee3\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u53d1\u751f MinorGC \u540e\uff0cEden \u548c ServivorFrom \u533a\u7684\u5bf9\u8c61\uff0c\u5c31\u88ab\u590d\u5236\u5230\u5176\u4ed6\u533a\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u53e6\u5916\u4e00\u4e2a\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679c\u65b0\u521b\u5efa\u7684\u5bf9\u8c61\u5360\u7528\u5185\u5b58\u5f88\u5927\uff0c\u5219\u76f4\u63a5\u5206\u914d\u5230\u8001\u5e74\u4ee3\u3002\u5e76\u4e14 SurvivorTo \u533a\u662f\u6ca1\u6709\u8fdb\u884c\u4efb\u4f55\u56de\u6536\u52a8\u4f5c\u7684\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6e05\u7a7a\u5c31\u5f88\u597d\u7406\u89e3\u4e86\u3002\u56e0\u4e3a\u7ecf\u8fc7 MinorGC \u540e\uff0cEden \u548c ServivorFrom \u533a\u7684\u5bf9\u8c61\uff0c\u5c31\u88ab\u590d\u5236\u5230\u8001\u5e74\u4ee3\u6216\u8005 SurvivorTo \u533a\u3002\u8fd9\u4e2a\u65f6\u5019\u5c31\u53ef\u4ee5\u5bf9 Eden \u533a\u548c ServivorFrom \u8fdb\u884c\u6e05\u7a7a\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6e05\u7a7a\u4e4b\u540e\uff0c\u8fd8\u6709\u4e00\u4e2a\u4e92\u6362\u52a8\u4f5c\u3002\u5c31\u662f\u628a SurvivorTo \u7684\u5bf9\u8c61\u4e92\u6362\u7ed9 ServivorFrom \u533a\u3002SurvivorTo \u548c SurvivorFrom \u4e92\u6362\uff0c\u539f\u6765\u7684 SurvivorTo \u79f0\u4e3a\u4e0b\u4e00\u6b21 GC \u65f6\u7684 SurvivorFrom \u533a\u3002\u90e8\u5206\u5bf9\u8c61\u4f1a\u5728 From \u548c To <br>\n\u533a\u57df\u4e2d\u6765\u56de\u590d\u5236\uff0c\u5982\u6b64\u4ea4\u636215\u6b21\uff08JVM\u53c2\u6570 MaxTenuringThreshold\u51b3\u5b9a\uff0c\u9ed8\u8ba4\u53c2\u6570\u662f15\uff09\uff0c\u6700\u7ec8\u5982\u679c\u8fd8\u662f\u5b58\u6d3b\uff0c\u5c31\u5b58\u5165\u8001\u5e74\u4ee3\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u5c31\u662f MinorGC\uff0c\u975e\u5e38\u7684\u7b80\u5355\u3002\u5927\u5bb6\u5728\u9762\u8bd5\u4e2d\u53ea\u9700\u8981\u8bb0\u4f4f\uff0cServivorTo \u4e00\u5f00\u59cb\u662f\u7a7a\u7684\uff0c\u590d\u5236\u7b97\u6cd5\u6d41\u7a0b\u662f\u5148\u590d\u5236\uff0c\u518d\u6e05\u7a7a\uff0c\u6700\u540e\u4e92\u6362\uff0c\u53e6\u5916\u4e00\u4e2a\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679c\u65b0\u521b\u5efa\u7684\u5bf9\u8c61\u5360\u7528\u5185\u5b58\u5f88\u5927\uff0c\u5219\u76f4\u63a5\u5206\u914d\u5230\u8001\u5e74\u4ee3\u3002\u56de\u7b54\u5230\u8fd9\u4e9b\u5173\u952e\u70b9\uff0c\u81f3\u5c11\u6211\u4e2a\u4eba\u4f1a\u7b97\u9762\u8bd5\u8005\u8fc7\u5173\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u66f4\u591a\u9762\u8bd5\u9898\uff0c\u5982\uff1aGC\u89e6\u53d1\u7684\u6761\u4ef6\uff1f\u4ec0\u4e48\u624b\u673a\u89e6\u53d1\uff1fGC\u56de\u6536\u5bf9\u4ec0\u4e48\u4e1c\u897f\u8fdb\u884c\u56de\u6536\uff1fGC\u56de\u6536\u505a\u4e86\u4ec0\u4e48\u6216\u8005\u8bf4\u662f\u64cd\u4f5c\u4e86\u4ec0\u4e48\uff0c\u600e\u4e48\u64cd\u4f5c\u7684\uff1f\u7b49\u7b49\u8fd9\u4e9b\u9762\u8bd5\u9898\uff0c\u53ef\u4ee5\u901a\u8fc7\u6211\u7684\u9762\u8bd5\u9898\u5c0f\u7a0b\u5e8f\u5b66\u4e60\u5230\uff01<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=4152\">\u4f60\u9762\u8bd5\u8fc7\u7a0b\u4e2d\u7684\u62e6\u8def\u864e MinorGC<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u6628\u5929\uff0c\u6211\u4e00\u4e2a\u670b\u53cb\u7ed9\u6211\u8bf4\u4ed6\u5728\u6296\u97f3\u4e0a\u53d1\u4e86\u4e00\u4e2a\u77ed\u89c6\u9891\uff0c\u83b7\u5f97\u4e86 300 \u4e2a\u8d5e\u3002\u6211\u8bf4\uff0c\u4f60\u8981\u4e48\u88ab\u6296\u97f3\u5e9f\u4e86\uff0c\u8981\u4e48\u5c31\u5e9f\u4e86(\u5378\u8f7d [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1174,328,1964,1963,1744],"class_list":["post-4152","post","type-post","status-publish","format-standard","hentry","category-java","tag-gc","tag-majorgc","tag-minorgc","tag-useparallelgc"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4152"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4152\/revisions"}],"predecessor-version":[{"id":4153,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4152\/revisions\/4153"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}