You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
arthas/assets/user-question-history15740....

5 lines
8.6 KiB
JavaScript

import{_ as i,o as h,c,b as o,w as s,a,d as l,e,r as n}from"./app.5024572d.js";const _={},p=l(`<h2 id="\u7528\u6237\u95EE\u9898" tabindex="-1"><a class="header-anchor" href="#\u7528\u6237\u95EE\u9898" aria-hidden="true">#</a> \u7528\u6237\u95EE\u9898 \uFF1A</h2><p>arthas \u5206\u6790\u5185\u5B58\u5347\u9AD8\u7684\u65B9\u6CD5</p><hr><h2 id="\u4E13\u5BB6\u5B98\u65B9\u89E3\u7B54" tabindex="-1"><a class="header-anchor" href="#\u4E13\u5BB6\u5B98\u65B9\u89E3\u7B54" aria-hidden="true">#</a> \u4E13\u5BB6\u5B98\u65B9\u89E3\u7B54 \uFF1A</h2><p>\u8981\u4F7F\u7528Arthas\u5206\u6790\u5E94\u7528\u7A0B\u5E8F\u5185\u5B58\u6301\u7EED\u5347\u9AD8\u7684\u65B9\u6CD5\uFF0C\u53EF\u4EE5\u9075\u5FAA\u4EE5\u4E0B\u6B65\u9AA4\uFF0C\u4F9D\u636E\u7684\u662F\u5DF2\u6709\u7684\u77E5\u8BC6\u5185\u5BB9\uFF1A</p><h3 id="_1-\u521D\u59CB\u8BCA\u65AD\u4E0E\u76D1\u63A7\u5185\u5B58\u72B6\u6001" tabindex="-1"><a class="header-anchor" href="#_1-\u521D\u59CB\u8BCA\u65AD\u4E0E\u76D1\u63A7\u5185\u5B58\u72B6\u6001" aria-hidden="true">#</a> 1. \u521D\u59CB\u8BCA\u65AD\u4E0E\u76D1\u63A7\u5185\u5B58\u72B6\u6001</h3><p>\u9996\u5148\uFF0C\u4F60\u9700\u8981\u4F7F\u7528Arthas\u7684<code>memory</code>\u547D\u4EE4\u6765\u67E5\u770B\u5F53\u524DJava\u865A\u62DF\u673A(JVM)\u7684\u5185\u5B58\u72B6\u6001\u3002\u8FD9\u4E00\u6B65\u9AA4\u80FD\u5E2E\u52A9\u4F60\u786E\u8BA4\u662F\u5426\u5B58\u5728\u5185\u5B58\u6CC4\u6F0F\u7684\u95EE\u9898\uFF0C\u4EE5\u53CA\u5927\u81F4\u786E\u5B9A\u6CC4\u6F0F\u53D1\u751F\u7684\u533A\u57DF\u3002\u591A\u6B21\u8FD0\u884C\u6B64\u547D\u4EE4\u53EF\u4EE5\u89C2\u5BDF\u5230\u5404\u5185\u5B58\u533A\u57DF\u7684\u53D8\u5316\u60C5\u51B5\uFF0C\u7279\u522B\u662F\u6CE8\u610F\u54EA\u4E9B\u533A\u57DF\u7684\u4F7F\u7528\u91CF\u5728\u4E0D\u65AD\u589E\u957F\u800C\u6CA1\u6709\u51CF\u5C11\uFF0C\u8FD9\u901A\u5E38\u662F\u5185\u5B58\u6CC4\u6F0F\u7684\u8FF9\u8C61\u3002</p><p><strong>\u547D\u4EE4\u793A\u4F8B\uFF1A</strong></p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ memory
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="_2-\u5206\u6790\u5806\u5185\u5B58\u8BE6\u7EC6\u4FE1\u606F" tabindex="-1"><a class="header-anchor" href="#_2-\u5206\u6790\u5806\u5185\u5B58\u8BE6\u7EC6\u4FE1\u606F" aria-hidden="true">#</a> 2. \u5206\u6790\u5806\u5185\u5B58\u8BE6\u7EC6\u4FE1\u606F</h3><p>\u5F53\u53D1\u73B0\u7591\u4F3C\u5185\u5B58\u6CC4\u6F0F\u7684\u533A\u57DF\u540E\uFF0C\u91C7\u7528<code>heapdump</code>\u547D\u4EE4\u6765\u83B7\u53D6\u5806\u7684\u5168\u91CF\u5185\u5B58\u4FE1\u606F\u3002\u8FD9\u4E00\u6B65\u5BF9\u4E8E\u5B9A\u4F4D\u5177\u4F53\u7684\u6CC4\u6F0F\u5BF9\u8C61\u81F3\u5173\u91CD\u8981\u3002\u4F60\u9700\u8981\u5728\u4E0D\u540C\u65F6\u95F4\u70B9\u751F\u6210\u591A\u4E2A\u5806\u8F6C\u50A8\u6587\u4EF6\uFF0C\u7136\u540E\u5229\u7528\u8BF8\u5982Eclipse Memory Analyzer (MAT)\u8FD9\u6837\u7684\u5DE5\u5177\u6765\u5206\u6790\u8FD9\u4E9B\u6587\u4EF6\uFF0C\u5BF9\u6BD4\u4E0D\u540C\u65F6\u523B\u7684\u5185\u5B58\u5360\u7528\u60C5\u51B5\uFF0C\u627E\u51FA\u5185\u5B58\u589E\u957F\u8FC5\u901F\u6216\u5F02\u5E38\u7684\u5BF9\u8C61\u3002</p><p><strong>\u547D\u4EE4\u793A\u4F8B\uFF1A</strong></p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token punctuation">[</span>arthas@58205<span class="token punctuation">]</span>$ heapdump arthas-output/dump.hprof
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p><strong>\u5206\u6790\u8BF4\u660E\uFF1A</strong></p><ul><li>\u4F7F\u7528MAT\u6253\u5F00<code>.hprof</code>\u6587\u4EF6\uFF0C\u67E5\u627E\u201C\u76F4\u65B9\u56FE\u201D\u6216\u201C\u6CC4\u6F0F\u5ACC\u7591\u72AF\u62A5\u544A\u201D\u6765\u8BC6\u522B\u5185\u5B58\u6CC4\u6F0F\u7684\u6E90\u5934\u3002</li><li>\u6CE8\u610F\u90A3\u4E9B\u6570\u91CF\u6025\u5267\u589E\u52A0\u7684\u5BF9\u8C61\uFF0C\u5B83\u4EEC\u53EF\u80FD\u5C31\u662F\u5185\u5B58\u6CC4\u6F0F\u7684\u6839\u6E90\u3002</li><li>\u68C0\u67E5\u8FD9\u4E9B\u5BF9\u8C61\u7684\u5F15\u7528\u94FE\uFF0C\u4E86\u89E3\u4E3A\u4EC0\u4E48\u5B83\u4EEC\u672A\u88AB\u5783\u573E\u56DE\u6536\u3002</li></ul><h3 id="_3-\u8C03\u6574\u4E0E\u4F18\u5316" tabindex="-1"><a class="header-anchor" href="#_3-\u8C03\u6574\u4E0E\u4F18\u5316" aria-hidden="true">#</a> 3. \u8C03\u6574\u4E0E\u4F18\u5316</h3><p>\u5982\u679C\u5728\u6267\u884C\u4E0A\u8FF0\u6B65\u9AA4\u65F6\u9047\u5230Arthas\u81EA\u8EAB\u56E0\u5185\u5B58\u4E0D\u8DB3\u800C\u65E0\u6CD5\u542F\u52A8\u7684\u95EE\u9898\uFF0C\u9700\u8981\u8C03\u6574\u76EE\u6807\u5E94\u7528\u7684JVM\u53C2\u6570\uFF0C\u589E\u52A0\u5185\u5B58\u5206\u914D\u3002\u8FD9\u662F\u56E0\u4E3AArthas\u4F5C\u4E3A\u5DE5\u5177\u4E5F\u9700\u8981\u4E00\u5B9A\u7684\u5185\u5B58\u8D44\u6E90\u6765\u8FD0\u884C\u3002</p><p><strong>\u89E3\u51B3Arthas\u542F\u52A8\u65F6\u5185\u5B58\u6EA2\u51FA\u7684\u65B9\u6848\uFF1A</strong></p><ul><li>\u8C03\u6574\u5E94\u7528\u7684JVM\u542F\u52A8\u53C2\u6570\uFF0C\u5982 <code>-Xms</code> \u548C <code>-Xmx</code>\uFF0C\u4EE5\u589E\u52A0\u5176\u53EF\u7528\u5185\u5B58\u3002</li></ul><h3 id="_4-\u76D1\u63A7profiler\u81EA\u8EAB\u5185\u5B58\u5360\u7528" tabindex="-1"><a class="header-anchor" href="#_4-\u76D1\u63A7profiler\u81EA\u8EAB\u5185\u5B58\u5360\u7528" aria-hidden="true">#</a> 4. \u76D1\u63A7Profiler\u81EA\u8EAB\u5185\u5B58\u5360\u7528</h3><p>\u53E6\u5916\uFF0C\u5982\u679C\u5173\u5FC3Arthas Profiler\u81EA\u8EAB\u7684\u5185\u5B58\u6D88\u8017\uFF0C\u53EF\u4EE5\u4F7F\u7528<code>profiler meminfo</code>\u547D\u4EE4\u6765\u67E5\u770B\uFF0C\u4F46\u901A\u5E38\u8FD9\u4E0D\u662F\u5185\u5B58\u6CC4\u6F0F\u5206\u6790\u7684\u4E3B\u8981\u5173\u6CE8\u70B9\u3002</p><p><strong>\u547D\u4EE4\u793A\u4F8B\uFF1A</strong></p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ profiler meminfo
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u7EFC\u4E0A\u6240\u8FF0\uFF0C\u901A\u8FC7\u5B9A\u671F\u68C0\u67E5\u5185\u5B58\u72B6\u6001\u3001\u9002\u65F6\u751F\u6210\u5E76\u5206\u6790\u5806\u8F6C\u50A8\u6587\u4EF6\uFF0C\u4F60\u53EF\u4EE5\u6709\u6548\u5730\u5B9A\u4F4D\u5E76\u89E3\u51B3\u5185\u5B58\u6CC4\u6F0F\u95EE\u9898\u3002\u540C\u65F6\uFF0C\u786E\u4FDDArthas\u81EA\u8EAB\u6709\u8DB3\u591F\u7684\u5185\u5B58\u7A7A\u95F4\u8FD0\u884C\uFF0C\u4EE5\u514D\u5F71\u54CD\u8BCA\u65AD\u8FC7\u7A0B\u3002</p>`,24),u=e("---------------"),f=a("h2",{id:"\u53C2\u8003\u94FE\u63A5",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u53C2\u8003\u94FE\u63A5","aria-hidden":"true"},"#"),e(" \u53C2\u8003\u94FE\u63A5 \uFF1A")],-1),m=e("\u4E13\u5BB6\u7ECF\u9A8C\uFF1AArthas \u6392\u67E5\u5185\u5B58\u6CC4\u9732\u7684\u65B9\u6CD5"),b=e("\u4E13\u5BB6\u7ECF\u9A8C\uFF1Aarthas\u542F\u52A8\u65F6\u5185\u5B58\u6EA2\u51FA"),g=e("profiler"),v=e("---------------"),x={id:"\u7B54\u7591\u670D\u52A1\u8BF4\u660E",tabindex:"-1"},k=a("a",{class:"header-anchor",href:"#\u7B54\u7591\u670D\u52A1\u8BF4\u660E","aria-hidden":"true"},"#",-1),A=e(),y=e("\u7B54\u7591\u670D\u52A1\u8BF4\u660E\uFF1A"),V=e("\u672C\u5185\u5BB9\u7ECF\u7531\u6280\u672F\u4E13\u5BB6\u5BA1\u9605\u7684\u7528\u6237\u95EE\u7B54\u7684\u955C\u50CF\u751F\u6210\uFF0C\u6211\u4EEC\u63D0\u4F9B\u4E86"),F=e("\u4E13\u5BB6\u667A\u80FD\u7B54\u7591\u670D\u52A1"),J=e("\uFF0C\u5728"),M=e("\u9875\u9762\u7684\u53F3\u4E0B\u7684\u6D6E\u7A97\u201D\u4E13\u5BB6\u7B54\u7591\u201C"),E=e("\u3002\u60A8\u4E5F\u53EF\u4EE5\u8BBF\u95EE : "),B={href:"https://answer.opensource.alibaba.com/docs/intro",target:"_blank",rel:"noopener noreferrer"},I=e("\u5168\u5C40\u4E13\u5BB6\u7B54\u7591"),L=e(" \u3002 \u54A8\u8BE2\u5176\u4ED6\u4EA7\u54C1\u7684\u7684\u95EE\u9898"),N=a("h3",{id:"\u53CD\u9988",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u53CD\u9988","aria-hidden":"true"},"#"),e(" \u53CD\u9988")],-1),O=e("\u5982\u95EE\u7B54\u6709\u9519\u6F0F\uFF0C\u6B22\u8FCE\u70B9\uFF1A"),P={href:"https://ai.nacos.io/user/feedbackByEnhancerGradePOJOID?enhancerGradePOJOId=16097",target:"_blank",rel:"noopener noreferrer"},q=e("\u5DEE\u8BC4"),w=e("\u7ED9\u6211\u4EEC\u53CD\u9988\u3002");function T($,C){const r=n("font"),t=n("RouterLink"),d=n("ExternalLinkIcon");return h(),c("div",null,[p,o(r,{color:"#949494"},{default:s(()=>[u]),_:1}),f,a("p",null,[o(t,{to:"/doc/expert/user-question-history12455.html"},{default:s(()=>[m]),_:1})]),a("p",null,[o(t,{to:"/doc/expert/user-question-history14832.html"},{default:s(()=>[b]),_:1})]),a("p",null,[o(t,{to:"/doc/profiler.html"},{default:s(()=>[g]),_:1})]),o(r,{color:"#949494"},{default:s(()=>[v]),_:1}),a("h2",x,[k,A,o(r,{color:"#FF0000"},{default:s(()=>[y]),_:1})]),a("p",null,[V,o(r,{color:"#FF0000"},{default:s(()=>[F]),_:1}),J,o(r,{color:"#FF0000"},{default:s(()=>[M]),_:1}),E,a("a",B,[I,o(d)]),L]),N,a("p",null,[O,a("a",P,[q,o(d)]),w])])}const R=i(_,[["render",T],["__file","user-question-history15740.html.vue"]]);export{R as default};