{"id":186,"date":"2024-12-17T10:32:16","date_gmt":"2024-12-17T10:32:16","guid":{"rendered":"https:\/\/www.isvmspace.com\/?p=186"},"modified":"2024-12-17T10:32:16","modified_gmt":"2024-12-17T10:32:16","slug":"jvm%e7%b3%bb%e5%88%97-%e5%86%85%e5%ad%98%e5%88%86%e9%85%8d","status":"publish","type":"post","link":"https:\/\/www.isvmspace.com\/?p=186","title":{"rendered":"JVM\u7cfb\u5217-\u5185\u5b58\u5206\u914d"},"content":{"rendered":"<h1>1.\u5bf9\u8c61\u4f18\u5148\u5728Eden\u533a\u5206\u914d<\/h1>\n<p><strong>VM\u53c2\u6570\uff1a<\/strong><br \/>\n-Xms20M<br \/>\n-Xmx20M<br \/>\n-Xmn10M<br \/>\n-XX:+PrintGCDetails<br \/>\n-verbose:gc<br \/>\n-XX:SurvivorRatio=8<br \/>\n-XX:+UseSerialGC<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/isvm-blogs.oss-cn-shanghai.aliyuncs.com\/static\/imgs\/jvm\/memory%20allocation\/mem_s_01.png\" alt=\"\" \/><\/p>\n<h1>2.\u5927\u5bf9\u8c61\u76f4\u63a5\u8fdb\u5165\u8001\u5e74\u4ee3<\/h1>\n<p><strong>VM\u53c2\u6570\uff1a<\/strong><br \/>\n-Xms20M<br \/>\n-Xmx20M<br \/>\n-Xmn10M<br \/>\n-XX:+PrintGCDetails<br \/>\n-verbose:gc<br \/>\n-XX:SurvivorRatio=8<br \/>\n-XX:+UseSerialGC<br \/>\n-XX:PretenureSizeThreshold=3145728<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/isvm-blogs.oss-cn-shanghai.aliyuncs.com\/static\/imgs\/jvm\/memory%20allocation\/mem_s_03.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/isvm-blogs.oss-cn-shanghai.aliyuncs.com\/static\/imgs\/jvm\/memory%20allocation\/mem_s_04.png\" alt=\"\" \/><\/p>\n<h1>3.\u957f\u671f\u5b58\u6d3b\u7684\u5bf9\u8c61\u5c06\u8fdb\u5165\u8001\u5e74\u4ee3<\/h1>\n<p><strong>VM\u53c2\u6570\uff1a<\/strong><br \/>\n-Xms20M<br \/>\n-Xmx20M<br \/>\n-Xmn10M<br \/>\n-XX:+PrintGCDetails<br \/>\n-verbose:gc<br \/>\n-XX:SurvivorRatio=8<br \/>\n-XX:+UseSerialGC<br \/>\n-XX:+PrintTenuringDistribution<br \/>\n-XX:MaxTenuringThreshold=1<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/isvm-blogs.oss-cn-shanghai.aliyuncs.com\/static\/imgs\/jvm\/memory%20allocation\/mem_s_05.png\" alt=\"\" \/><br \/>\nMaxTenuringThreshold=1<br \/>\n<img decoding=\"async\" src=\"https:\/\/isvm-blogs.oss-cn-shanghai.aliyuncs.com\/static\/imgs\/jvm\/memory%20allocation\/mem_s_06.png\" alt=\"\" \/><br \/>\nMaxTenuringThreshold=15<br \/>\n<img decoding=\"async\" src=\"https:\/\/isvm-blogs.oss-cn-shanghai.aliyuncs.com\/static\/imgs\/jvm\/memory%20allocation\/mem_s_07.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/isvm-blogs.oss-cn-shanghai.aliyuncs.com\/static\/imgs\/jvm\/memory%20allocation\/mem_s_08.png\" alt=\"\" \/><\/p>\n<h1>4.\u52a8\u6001\u5bf9\u8c61\u5e74\u9f84\u5224\u5b9a<\/h1>\n<p>\u52a8\u6001\u5bf9\u8c61\u5e74\u9f84\u5224\u5b9a\uff0c\u5373\u5982\u679cGC\u65f6\uff0c\u5f53\u524dsurvivor\u533a\u7a7a\u95f4\u76f8\u540c\u5e74\u9f84\u7684\u6240\u6709\u5bf9\u8c61\u7684\u5927\u5c0f\u603b\u548c\u5927\u4e8esurvivor\u7a7a\u95f4\u7684\u4e00\u534a\uff0c\u5219\u5e74\u9f84\u5927\u4e8e\u6216\u8005\u7b49\u4e8e\u8be5\u5e74\u9f84\u7684\u5bf9\u8c61\u5c31\u76f4\u63a5\u8fdb\u5165\u8001\u5e74\u4ee3\uff0c\u65e0\u9700\u7b49\u5f85MaxTenuringThreshold\u4e2d\u7684\u5e74\u9f84\u8981\u6c42<\/p>\n<p><strong>VM\u53c2\u6570\uff1a<\/strong><br \/>\n-Xms20M<br \/>\n-Xmx20M<br \/>\n-Xmn10M<br \/>\n-XX:+PrintGCDetails<br \/>\n-verbose:gc<br \/>\n-XX:SurvivorRatio=8<br \/>\n-XX:+UseSerialGC<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/isvm-blogs.oss-cn-shanghai.aliyuncs.com\/static\/imgs\/jvm\/memory%20allocation\/mem_s_09.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/isvm-blogs.oss-cn-shanghai.aliyuncs.com\/static\/imgs\/jvm\/memory%20allocation\/mem_s_10.png\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u5bf9\u8c61\u4f18\u5148\u5728Eden\u533a\u5206\u914d VM\u53c2\u6570\uff1a -Xms20M -Xmx20M -Xmn10M -XX:+Print [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=\/wp\/v2\/posts\/186"}],"collection":[{"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=186"}],"version-history":[{"count":4,"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=\/wp\/v2\/posts\/186\/revisions"}],"predecessor-version":[{"id":190,"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=\/wp\/v2\/posts\/186\/revisions\/190"}],"wp:attachment":[{"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.isvmspace.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}