{"id":58831,"date":"2023-10-26T21:52:48","date_gmt":"2023-10-26T13:52:48","guid":{"rendered":"https:\/\/docs.pingcode.com\/?p=58831"},"modified":"2023-10-26T22:10:29","modified_gmt":"2023-10-26T14:10:29","slug":"g1gc-%e4%b8%ad%e7%9a%84-mmu-target-violated-%e6%98%af%e4%bb%80%e4%b9%88%e6%84%8f%e6%80%9d","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/58831.html","title":{"rendered":"G1GC \u4e2d\u7684 MMU target violated \u662f\u4ec0\u4e48\u610f\u601d"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote\">\n<p>G1GC\u4e2d\u7684&#8221;MMU target violated&#8221;\u6307\u7684\u662f\u5783\u573e\u56de\u6536\u65f6\u672a\u80fd\u6ee1\u8db3\u7528\u6237\u6307\u5b9a\u7684\u505c\u987f\u65f6\u95f4\u76ee\u6807\uff0c\u5373Maximal Minimal Pause time\u3002\u8fd9\u901a\u5e38\u610f\u5473\u7740G1GC\u8bd5\u56fe\u5728\u7ed9\u5b9a\u7684\u65f6\u95f4\u5185\u5b8c\u6210\u5783\u573e\u56de\u6536\uff0c\u4f46\u5b9e\u9645\u505c\u987f\u65f6\u95f4\u8d85\u8fc7\u4e86\u9884\u671f\u3002\u7406\u89e3\u8fd9\u4e00\u6982\u5ff5\u53ca\u5176\u80cc\u540e\u7684\u539f\u56e0\u6709\u52a9\u4e8eJava\u5f00\u53d1\u8005\u66f4\u597d\u5730\u8c03\u4f18\u4ed6\u4eec\u7684\u5e94\u7528\uff0c\u786e\u4fdd\u7cfb\u7edf\u7684\u54cd\u5e94\u6027\u3002<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1.G1GC <\/strong><strong>\u7684\u57fa\u672c\u4ecb\u7ecd<\/strong><\/h2>\n\n\n\n<p>G1\u6536\u96c6\u5668\uff08G1GC\uff09\u662fJava\u7684\u4e00\u79cd\u5783\u573e\u56de\u6536\u5668\uff0c\u5b83\u662f\u4e3a\u4e86\u6ee1\u8db3\u4f4e\u505c\u987f\u65f6\u95f4\u9700\u6c42\u800c\u8bbe\u8ba1\u7684\u3002\u5b83\u901a\u8fc7\u5c06Java\u5806\u5206\u4e3a\u591a\u4e2a\u5c0f\u5757\u6216\u533a\u57df\u6765\u5de5\u4f5c\u3002\u5728GC\u65f6\uff0cG1\u4f1a\u9009\u62e9\u6027\u5730\u6e05\u7406\u90a3\u4e9b\u5b58\u6709\u6700\u591a\u5783\u573e\u7684\u533a\u57df\uff0c\u4ece\u800c\u5728\u7ed9\u5b9a\u7684\u505c\u987f\u65f6\u95f4\u5185\u56de\u6536\u6700\u5927\u91cf\u7684\u5185\u5b58\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2.MMU target<\/strong><strong>\u548c\u505c\u987f\u65f6\u95f4<\/strong><\/h2>\n\n\n\n<p>MMU\uff0c\u5168\u79f0\u4e3aMinimum Mutator Utilization\uff0c\u662f\u63cf\u8ff0\u5728\u4e00\u6bb5\u65f6\u95f4\u5185\u5e94\u7528\u7a0b\u5e8f\u80fd\u591f\u8fd0\u884c\u7684\u6700\u5c0f\u767e\u5206\u6bd4\u3002\u4f8b\u5982\uff0c\u8bbe\u5b9aMMU\u4e3a95%\u8868\u793a\uff0c\u5728\u4e00\u4e2a\u6307\u5b9a\u7684\u65f6\u95f4\u7a97\u53e3\u5185\uff0c\u5e94\u7528\u6700\u591a\u53ea\u80fd\u88ab\u505c\u987f5%\u7684\u65f6\u95f4\u3002\u5f53G1GC\u4e2d\u7684\u5b9e\u9645\u505c\u987f\u65f6\u95f4\u8d85\u8fc7\u8fd95%\uff0c\u6211\u4eec\u8bf4MMU target\u88ab\u8fdd\u53cd\u4e86\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3.<\/strong><strong>\u4e3a\u4ec0\u4e48\u4f1a\u51fa\u73b0MMU target violated<\/strong><\/h2>\n\n\n\n<p>\u6709\u8bb8\u591a\u539f\u56e0\u53ef\u80fd\u5bfc\u81f4MMU\u76ee\u6807\u88ab\u8fdd\u53cd\uff0c\u5176\u4e2d\u5305\u62ec\uff1a<\/p>\n\n\n\n<p>Java\u5806\u4e2d\u7684\u5783\u573e\u91cf\u8fc7\u5927\u3002<\/p>\n\n\n\n<p>Java\u5e94\u7528\u4ea7\u751f\u5927\u91cf\u77ed\u751f\u547d\u5468\u671f\u7684\u5bf9\u8c61\u3002<\/p>\n\n\n\n<p>G1GC\u7684\u9884\u4f30\u4e0e\u5b9e\u9645\u56de\u6536\u65f6\u95f4\u4e0d\u7b26\u3002<\/p>\n\n\n\n<p>\u5783\u573e\u56de\u6536\u7ebf\u7a0b\u6570\u91cf\u4e0d\u8db3\u6216\u4e0d\u5408\u7406\u3002<\/p>\n\n\n\n<p>JVM\u53c2\u6570\u6ca1\u6709\u6b63\u786e\u8bbe\u7f6e\u6216\u4f18\u5316\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4.<\/strong><strong>\u5982\u4f55\u5e94\u5bf9MMU target violated<\/strong><\/h2>\n\n\n\n<p>\u5bf9\u4e8eMMU\u76ee\u6807\u8fdd\u53cd\u7684\u60c5\u51b5\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u91c7\u53d6\u4ee5\u4e0b\u63aa\u65bd\uff1a<\/p>\n\n\n\n<p>\u589e\u52a0Java\u5806\u5927\u5c0f\u3002<\/p>\n\n\n\n<p>\u4f18\u5316\u6216\u51cf\u5c11\u5e94\u7528\u4e2d\u7684\u5bf9\u8c61\u5206\u914d\u3002<\/p>\n\n\n\n<p>\u8c03\u6574G1GC\u7684\u53c2\u6570\uff0c\u5982\u589e\u52a0\u7ebf\u7a0b\u6570\u91cf\u6216\u8c03\u6574\u9884<a href=\"https:\/\/docs.pingcode.com\/agile\/project-management\/estimation\" target=\"_blank\">\u4f30\u7b97<\/a>\u6cd5\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528JVM\u76d1\u63a7\u5de5\u5177\u6765\u8ddf\u8e2a\u548c\u4f18\u5316\u5783\u573e\u56de\u6536\u7684\u6027\u80fd\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>5.<\/strong><strong>\u7ed3\u8bba<\/strong><\/h2>\n\n\n\n<p>&#8220;MMU target violated&#8221;\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5173\u4e8eG1GC\u6027\u80fd\u7684\u91cd\u8981\u6307\u6807\u3002\u5f53\u8fd9\u4e2a\u6307\u6807\u88ab\u8fdd\u53cd\u65f6\uff0c\u5b83\u662f\u4e00\u4e2a\u660e\u786e\u7684\u4fe1\u53f7\uff0c\u544a\u8bc9\u5f00\u53d1\u8005\u9700\u8981\u5bf9\u4ed6\u4eec\u7684\u5e94\u7528\u6216JVM\u8fdb\u884c\u8c03\u4f18\u3002\u901a\u8fc7\u4e86\u89e3\u8fd9\u4e2a\u6982\u5ff5\u4ee5\u53ca\u5982\u4f55\u5e94\u5bf9\u5b83\uff0cJava\u5f00\u53d1\u8005\u53ef\u4ee5\u786e\u4fdd\u4ed6\u4eec\u7684\u5e94\u7528\u4fdd\u6301\u9ad8\u54cd\u5e94\u6027\uff0c\u4ece\u800c\u63d0\u4f9b\u66f4\u597d\u7684\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"484\" height=\"300\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2023\/10\/\u6dfb\u52a0\u6807\u9898-21-2.png?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"\" class=\"wp-image-58910\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>\u5e38\u89c1\u95ee\u7b54<\/strong><\/h2>\n\n\n\n<p><strong>1. G1GC <\/strong><strong>\u4e2d\u7684 &#8220;MMU target violated&#8221; \u662f\u4ec0\u4e48\u610f\u601d\uff1f<\/strong><\/p>\n\n\n\n<p>&#8220;MMU target violated&#8221; \u5728 G1GC \u4e2d\u8868\u793a\u5783\u573e\u56de\u6536\u65f6\u672a\u80fd\u6ee1\u8db3\u7528\u6237\u6307\u5b9a\u7684\u505c\u987f\u65f6\u95f4\u76ee\u6807\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u5b83\u610f\u5473\u7740G1GC\u8bd5\u56fe\u5728\u7ed9\u5b9a\u7684\u65f6\u95f4\u5185\u5b8c\u6210\u5783\u573e\u56de\u6536\uff0c\u4f46\u5b9e\u9645\u7684\u505c\u987f\u65f6\u95f4\u8d85\u8fc7\u4e86\u9884\u671f\u3002<\/p>\n\n\n\n<p><strong>2.MMU<\/strong><strong>\u662f\u4ec0\u4e48\u7684\u7f29\u5199\uff0c\u5e76\u4e14\u5b83\u5728G1GC\u4e2d\u8d77\u5230\u4ec0\u4e48\u4f5c\u7528\uff1f<\/strong><\/p>\n\n\n\n<p>MMU \u662f Minimum Mutator Utilization \u7684\u7f29\u5199\u3002\u5728 G1GC \u4e2d\uff0c\u5b83\u63cf\u8ff0\u4e86\u5728\u4e00\u6bb5\u65f6\u95f4\u5185\u5e94\u7528\u7a0b\u5e8f\u80fd\u591f\u8fd0\u884c\u7684\u6700\u5c0f\u767e\u5206\u6bd4\u3002\u4f8b\u5982\uff0c\u5982\u679cMMU\u8bbe\u7f6e\u4e3a95%\uff0c\u5219\u610f\u5473\u7740\u5728\u6307\u5b9a\u7684\u65f6\u95f4\u7a97\u53e3\u5185\uff0c\u5e94\u7528\u6700\u591a\u53ea\u80fd\u88ab\u505c\u987f5%\u7684\u65f6\u95f4\u3002<\/p>\n\n\n\n<p><strong>3.<\/strong><strong>\u51fa\u73b0 &#8220;MMU target violated&#8221; \u7684\u539f\u56e0\u6709\u54ea\u4e9b\uff1f<\/strong><\/p>\n\n\n\n<p>\u51fa\u73b0 &#8220;MMU target violated&#8221; \u7684\u539f\u56e0\u53ef\u80fd\u5305\u62ec\uff1aJava\u5806\u4e2d\u7684\u5783\u573e\u91cf\u8fc7\u5927\u3001\u5e94\u7528\u4ea7\u751f\u5927\u91cf\u77ed\u751f\u547d\u5468\u671f\u7684\u5bf9\u8c61\u3001G1GC\u7684\u9884\u4f30\u4e0e\u5b9e\u9645\u56de\u6536\u65f6\u95f4\u4e0d\u7b26\u3001\u5783\u573e\u56de\u6536\u7ebf\u7a0b\u6570\u91cf\u4e0d\u8db3\u6216JVM\u53c2\u6570\u6ca1\u6709\u6b63\u786e\u8bbe\u7f6e\u3002<\/p>\n\n\n\n<p><strong>4.<\/strong><strong>\u5982\u4f55\u907f\u514d\u6216\u89e3\u51b3 &#8220;MMU target violated&#8221; \u7684\u95ee\u9898\uff1f<\/strong><\/p>\n\n\n\n<p>\u53ef\u4ee5\u901a\u8fc7\u589e\u52a0Java\u5806\u5927\u5c0f\u3001\u4f18\u5316\u5e94\u7528\u4e2d\u7684\u5bf9\u8c61\u5206\u914d\u3001\u8c03\u6574G1GC\u7684\u53c2\u6570\u6216\u4f7f\u7528JVM\u76d1\u63a7\u5de5\u5177\u6765\u8ddf\u8e2a\u548c\u4f18\u5316\u5783\u573e\u56de\u6536\u7684\u6027\u80fd\u6765\u907f\u514d\u6216\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n\n\n\n<p><strong>5.G1GC<\/strong><strong>\u4e0e\u5176\u4ed6\u5783\u573e\u6536\u96c6\u5668\u76f8\u6bd4\uff0c\u6709\u4f55\u4f18\u52bf\uff1f<\/strong><\/p>\n\n\n\n<p>G1GC\u4e3b\u8981\u8bbe\u8ba1\u7528\u4e8e\u6ee1\u8db3\u4f4e\u505c\u987f\u65f6\u95f4\u7684\u9700\u6c42\u3002\u5b83\u53ef\u4ee5\u66f4\u7cbe\u7ec6\u5730\u63a7\u5236\u5783\u573e\u56de\u6536\u7684\u505c\u987f\u65f6\u95f4\uff0c\u800c\u4e14\u80fd\u591f\u4e0e\u5927\u578b\u7684Java\u5806\u4e00\u540c\u5de5\u4f5c\u3002\u6b64\u5916\uff0cG1\u901a\u8fc7\u5c06\u5806\u5206\u4e3a\u591a\u4e2a\u533a\u57df\u5e76\u9009\u62e9\u6027\u5730\u6e05\u7406\u90a3\u4e9b\u5783\u573e\u6700\u591a\u7684\u533a\u57df\uff0c\u80fd\u591f\u5b9e\u73b0\u9ad8\u6548\u7684\u5185\u5b58\u56de\u6536\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"G1GC\u4e2d\u7684&#8221;MMU target violated&#8221;\u6307\u7684\u662f\u5783\u573e\u56de\u6536\u65f6\u672a\u80fd\u6ee1\u8db3\u7528\u6237\u6307\u5b9a [&hellip;]","protected":false},"author":5,"featured_media":58910,"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\/58831"}],"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=58831"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/58831\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/58910"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=58831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=58831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=58831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}