{"id":37527,"date":"2023-12-11T14:41:47","date_gmt":"2023-12-11T06:41:47","guid":{"rendered":"https:\/\/wx.kaifamiao.info\/?p=37527"},"modified":"2023-12-11T14:41:47","modified_gmt":"2023-12-11T06:41:47","slug":"jvm-%e9%85%8d%e7%bd%ae%e5%b8%b8%e7%94%a8%e5%8f%82%e6%95%b0%e6%9c%89%e5%93%aa%e4%ba%9b","status":"publish","type":"post","link":"http:\/\/wx.kaifamiao.info\/index.php\/2023\/12\/11\/jvm-%e9%85%8d%e7%bd%ae%e5%b8%b8%e7%94%a8%e5%8f%82%e6%95%b0%e6%9c%89%e5%93%aa%e4%ba%9b\/","title":{"rendered":"JVM \u914d\u7f6e\u5e38\u7528\u53c2\u6570\u6709\u54ea\u4e9b?"},"content":{"rendered":"<p>&#8220;`&#8221;<\/p>\n<p>&lt;div&gt;&lt;b&gt;\u5783\u573e\u56de\u6536\u53c2\u6570&lt;\/b&gt;&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-Xnoclassgc \u662f\u5426\u5bf9\u7c7b\u8fdb\u884c\u56de\u6536&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-verbose:class -XX:+TraceClassUnloading \u67e5\u770b\u7c7b\u52a0\u8f7d\u548c\u5378\u8f7d\u4fe1\u606f&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;&lt;br&gt;&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:SurvivorRatio Eden\u548c\u5176\u4e2d\u4e00\u4e2asurvivor\u7684\u6bd4\u503c&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:PretenureSizeThreshold \u5927\u5bf9\u8c61\u8fdb\u5165\u8001\u5e74\u4ee3\u7684\u9608\u503c\uff0cSerial\u548cParNew\u751f\u6548&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:MaxTenuringThreshold \u664b\u5347\u8001\u5e74\u4ee3\u7684\u5bf9\u8c61\u5e74\u9f84\uff0c\u9ed8\u8ba415, CMS\u9ed8\u8ba4\u662f4&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:HandlePromotionFailure \u8001\u5e74\u4ee3\u62c5\u4fdd&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:+UseAdaptiveSizePolicy\u52a8\u6001\u8c03\u6574Java\u5806\u4e2d\u5404\u4e2a\u533a\u57df\u5927\u5c0f\u548c\u8fdb\u5165\u8001\u5e74\u4ee3\u5e74\u9f84&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:ParallelGCThreads \u5e76\u884c\u56de\u6536\u7684\u7ebf\u7a0b\u6570&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:MaxGCPauseMillis Parallel Scavenge\u53c2\u6570\uff0c\u8bbe\u7f6eGC\u7684\u6700\u5927\u505c\u987f\u65f6\u95f4&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:GCTimeRatio&nbsp; Parallel Scavenge\u53c2\u6570\uff0cGC\u65f6\u95f4\u5360\u603b\u65f6\u95f4\u7684\u6bd4\u7387\uff0c\u9ed8\u8ba499%\uff0c\u53731%\u7684GC\u65f6\u95f4&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:CMSInitiatingOccupancyFraction\uff0cold\u533a\u89e6\u53d1cms\u9608\u503c\uff0c\u9ed8\u8ba468%&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:+UseCMSCompactAtFullCollection(CMS\u5b8c\u6210\u540e\u662f\u5426\u8fdb\u884c\u4e00\u6b21\u788e\u7247\u6574\u7406\uff0c\u505c\u987f\u65f6\u95f4\u52a0\u957f)&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:CMSFullGCsBeforeCompaction(\u6267\u884c\u591a\u5c11\u6b21\u4e0d\u8fdb\u884c\u788e\u7247\u6574\u7406\u7684FullGC\u540e\u8fdb\u884c\u4e00\u6b21\u5e26\u538b\u7f29\u7684)&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:+ScavengeBeforeFullGC\uff0c\u5728fullgc\u524d\u89e6\u53d1\u4e00\u6b21minorGC&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;&lt;br&gt;&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;&lt;b&gt;\u5783\u573e\u56de\u6536\u7edf\u8ba1\u4fe1\u606f&lt;\/b&gt;&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:+PrintGC \u8f93\u51faGC\u65e5\u5fd7&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-verbose:gc\u7b49\u540c\u4e8e\u4e0a\u9762\u90a3\u4e2a&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:+PrintGCDetails \u8f93\u51faGC\u7684\u8be6\u7ec6\u65e5\u5fd7&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;&lt;br&gt;&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;&lt;b&gt;\u5806\u5927\u5c0f\u8bbe\u7f6e&lt;\/b&gt;&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-Xmx:\u6700\u5927\u5806\u5927\u5c0f&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-Xms:\u521d\u59cb\u5806\u5927\u5c0f(\u6700\u5c0f\u5185\u5b58\u503c)&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-Xmn:\u5e74\u8f7b\u4ee3\u5927\u5c0f&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:NewSize\u548c-XX:MaxNewSize \u65b0\u751f\u4ee3\u5927\u5c0f&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:SurvivorRatio:3 \u610f\u601d\u662f\u5e74\u8f7b\u4ee3\u4e2dEden\u533a\u4e0e\u4e24\u4e2aSurvivor\u533a\u7684\u6bd4\u503c\u3002\u6ce8\u610fSurvivor\u533a\u6709\u4e24\u4e2a\u3002\u5982\uff1a3\uff0c\u8868\u793aEden\uff1aSurvivor=3\uff1a2\uff0c\u4e00\u4e2aSurvivor\u533a\u5360\u6574\u4e2a\u5e74\u8f7b\u4ee3\u76841\/5&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:NewRatio=4:\u8bbe\u7f6e\u5e74\u8f7b\u4ee3\uff08\u5305\u62ecEden\u548c\u4e24\u4e2aSurvivor\u533a\uff09\u4e0e\u5e74\u8001\u4ee3\u7684\u6bd4\u503c\uff08\u9664\u53bb\u6301\u4e45\u4ee3\uff09\u3002\u8bbe\u7f6e\u4e3a4\uff0c\u5219\u5e74\u8f7b\u4ee3\u4e0e\u5e74\u8001\u4ee3\u6240\u5360\u6bd4\u503c\u4e3a1\uff1a4\uff0c\u5e74\u8f7b\u4ee3\u5360\u6574\u4e2a\u5806\u6808\u76841\/5&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-Xss\u6808\u5bb9\u91cf \u9ed8\u8ba4256k&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:PermSize\u6c38\u4e45\u4ee3\u521d\u59cb\u503c&lt;\/div&gt;<\/p>\n<p>&lt;div&gt;-XX:MaxPermSize \u6c38\u4e45\u4ee3\u6700\u5927\u503c&lt;\/div&gt;<\/p>\n<p>&lt;pre&gt;&lt;code&gt;            &quot;&#8220;`<br \/>\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;`&#8221; &lt;div&gt;&lt;b&gt;\u5783\u573e\u56de\u6536\u53c2\u6570&lt;\/b&gt;&#038;lt [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-37527","post","type-post","status-publish","format-standard","hentry","category-c"],"_links":{"self":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/37527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/comments?post=37527"}],"version-history":[{"count":1,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/37527\/revisions"}],"predecessor-version":[{"id":37528,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/37527\/revisions\/37528"}],"wp:attachment":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/media?parent=37527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/categories?post=37527"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/tags?post=37527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}