{"id":84741,"date":"2026-07-26T16:48:49","date_gmt":"2026-07-26T08:48:49","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/84741.html"},"modified":"2026-07-26T16:48:49","modified_gmt":"2026-07-26T08:48:49","slug":"linux%e5%86%85%e5%ad%98%e7%ae%a1%e7%90%86%e5%85%a8%e8%a7%a3%e6%9e%90%ef%bc%9a%e4%bb%8e%e5%8e%9f%e7%90%86%e5%88%b0%e5%ae%9e%e8%b7%b5%ef%bc%8c%e8%ae%a9%e4%bd%a0%e7%9a%84%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/84741.html","title":{"rendered":"Linux\u5185\u5b58\u7ba1\u7406\u5168\u89e3\u6790\uff1a\u4ece\u539f\u7406\u5230\u5b9e\u8df5\uff0c\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u4e0d\u518d\u201c\u5185\u5b58\u4e0d\u8db3\u201d"},"content":{"rendered":"<h2>Linux\u5185\u5b58\u7ba1\u7406\u5168\u89e3\u6790&#xff1a;\u4ece\u539f\u7406\u5230\u5b9e\u8df5&#xff0c;\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u4e0d\u518d\u201c\u5185\u5b58\u4e0d\u8db3\u201d<\/h2>\n<p>\u5728\u65e5\u5e38\u8fd0\u7ef4\u4e2d&#xff0c;\u4f60\u662f\u5426\u4e5f\u7ecf\u5e38\u770b\u5230\u670d\u52a1\u5668\u5185\u5b58\u4f7f\u7528\u7387\u8fbe\u523090%\u4ee5\u4e0a&#xff0c;\u7136\u540e\u7d27\u6025\u6269\u5bb9&#xff1f;\u5b9e\u9645\u4e0a&#xff0c;Linux\u7684\u5185\u5b58\u7ba1\u7406\u673a\u5236\u8fdc\u6bd4\u6211\u4eec\u60f3\u8c61\u7684\u8981\u590d\u6742\u548c\u667a\u80fd\u3002\u4eca\u5929&#xff0c;\u6211\u4eec\u5c31\u6765\u6df1\u5165\u63a2\u8ba8Linux\u5185\u5b58\u7ba1\u7406\u7684\u6838\u5fc3\u673a\u5236&#xff0c;\u4ee5\u53ca\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u8be5\u5982\u4f55\u6b63\u786e\u7406\u89e3\u548c\u4f18\u5316\u5185\u5b58\u4f7f\u7528\u3002<\/p>\n<h4>\u4e3e\u4f8b<\/h4>\n<p>\u4f01\u4e1a\u7684\u76d1\u63a7\u7cfb\u7edf\u9891\u7e41\u53d1\u51fa\u5185\u5b58\u544a\u8b66&#xff0c;\u663e\u793a\u591a\u53f0\u670d\u52a1\u5668\u5185\u5b58\u4f7f\u7528\u7387\u8d85\u8fc795%\u3002\u8fd0\u7ef4\u56e2\u961f\u7d27\u6025\u6392\u67e5&#xff0c;\u5374\u53d1\u73b0\u5e94\u7528\u54cd\u5e94\u901f\u5ea6\u6b63\u5e38&#xff0c;\u7cfb\u7edf\u5e76\u672a\u53d1\u751fOOM&#xff08;Out Of Memory&#xff09;\u3002<\/p>\n<p>\u539f\u56e0&#xff1a;Linux\u5185\u6838\u7684Page Cache\u673a\u5236\u5728\u201c\u4f5c\u795f\u201d\u3002\u5f53\u5185\u5b58\u7a7a\u95f2\u65f6&#xff0c;\u5185\u6838\u4f1a\u5c06\u90e8\u5206\u5185\u5b58\u7528\u4e8e\u7f13\u5b58\u78c1\u76d8\u6570\u636e&#xff08;Page Cache&#xff09;&#xff0c;\u4ee5\u52a0\u901f\u540e\u7eed\u7684\u78c1\u76d8\u8bfb\u53d6\u64cd\u4f5c\u3002\u8fd9\u90e8\u5206\u5185\u5b58\u5728\u5e94\u7528\u7a0b\u5e8f\u9700\u8981\u65f6\u4f1a\u7acb\u5373\u91ca\u653e&#xff0c;\u56e0\u6b64\u76d1\u63a7\u4e2d\u7684\u201c\u9ad8\u5185\u5b58\u4f7f\u7528\u7387\u201d\u5f80\u5f80\u662f\u4e00\u79cd\u5047\u8c61\u3002<\/p>\n<p><span class=\"token comment\"># \u67e5\u770bPage Cache\u5927\u5c0f<\/span><br \/>\n$ <span class=\"token function\">free<\/span> <span class=\"token parameter variable\">-h<\/span><br \/>\n              total        used        <span class=\"token function\">free<\/span>      shared  buff\/cache   available<br \/>\nMem:            62G        <span class=\"token number\">8<\/span>.1G        <span class=\"token number\">1<\/span>.2G        <span class=\"token number\">1<\/span>.5G         53G         52G<br \/>\nSwap:            0B          0B          0B<\/p>\n<p>\u8fd9\u91cc\u7684buff\/cache\u5c31\u662fPage Cache&#xff0c;\u5b83\u5360\u7528\u4e8653G\u5185\u5b58&#xff0c;\u8fd9\u90e8\u5206\u5185\u5b58\u662f\u201c\u53ef\u56de\u6536\u201d\u7684\u3002<\/p>\n<hr \/>\n<h3>Linux\u5185\u5b58\u7ba1\u7406\u6838\u5fc3\u67b6\u6784<\/h3>\n<h4>\u5185\u6838\u5185\u5b58\u5206\u914d\u673a\u5236<\/h4>\n<p>Linux \u91c7\u7528\u9875\u5f0f\u5185\u5b58\u7ba1\u7406&#xff0c;\u9ed8\u8ba4\u9875\u5927\u5c0f\u4e3a 4KB\u3002\u5185\u6838\u901a\u8fc7 Buddy System \u7ba1\u7406\u7269\u7406\u9875&#xff0c;\u4f7f\u7528 Slab Allocator \u5904\u7406\u5c0f\u5bf9\u8c61\u5206\u914d&#xff08;\u5982 kmalloc \u8bf7\u6c42&#xff09;\u3002<\/p>\n<p>\u751f\u4ea7\u73af\u5883\u5173\u952e\u8ba4\u77e5&#xff1a;<\/p>\n<ul>\n<li>\u533f\u540d\u9875&#xff08;Anonymous Pages&#xff09;&#xff1a;\u8fdb\u7a0b\u5806\u6808\u3001\u6570\u636e\u6bb5&#xff0c;\u65e0\u6587\u4ef6 backing&#xff0c;swap \u7684\u4e3b\u8981\u5bf9\u8c61<\/li>\n<li>\u6587\u4ef6\u9875&#xff08;File Pages&#xff09;&#xff1a;Page Cache&#xff0c;\u7528\u4e8e\u7f13\u51b2\u78c1\u76d8\u6570\u636e&#xff0c;\u53ef\u88ab\u5185\u6838\u968f\u65f6\u56de\u6536<\/li>\n<li>\u5185\u6838\u5185\u5b58&#xff08;Kernel Memory&#xff09;&#xff1a;Slab\u3001\u9875\u8868\u3001per-cpu \u53d8\u91cf&#xff0c;\u5bf9\u5bb9\u5668\u73af\u5883\u5c24\u4e3a\u5173\u952e<\/li>\n<\/ul>\n<p>\u67e5\u770b\u5b9e\u65f6\u6784\u6210&#xff1a;<\/p>\n<p><span class=\"token function\">cat<\/span> \/sys\/fs\/cgroup\/memory.stat<br \/>\n<span class=\"token comment\"># \u8f93\u51fa\u793a\u4f8b&#xff1a;<\/span><br \/>\n<span class=\"token comment\"># anon 104857600      # 100MB \u533f\u540d\u5185\u5b58<\/span><br \/>\n<span class=\"token comment\"># file 52428800       # 50MB \u6587\u4ef6\u7f13\u5b58<\/span><br \/>\n<span class=\"token comment\"># kernel_stack 8192   # \u5185\u6838\u6808\u5360\u7528<\/span><\/p>\n<h4>\u5185\u5b58\u56de\u6536\u4e0e OOM \u673a\u5236<\/h4>\n<p>\u5f53\u53ef\u7528\u5185\u5b58\u4f4e\u4e8e\u6c34\u4f4d\u7ebf&#xff08;watermark&#xff09;\u65f6&#xff0c;kswapd \u540e\u53f0\u7ebf\u7a0b\u542f\u52a8\u56de\u6536&#xff1b;\u82e5\u538b\u529b\u6301\u7eed&#xff0c;\u89e6\u53d1\u76f4\u63a5\u56de\u6536&#xff08;Direct Reclaim&#xff09;&#xff0c;\u5bfc\u81f4\u8fdb\u7a0b\u963b\u585e\u2014\u2014\u8fd9\u662f\u751f\u4ea7\u73af\u5883\u5ef6\u8fdf\u5c16\u5cf0&#xff08;latency spike&#xff09;\u7684\u4e3b\u8981\u5143\u51f6\u3002<\/p>\n<p>OOM Killer \u7b56\u7565&#xff08;\/proc\/sys\/vm\/oom_kill_allocating_task&#xff09;&#xff1a;<\/p>\n<ul>\n<li>0&#xff1a;\u626b\u63cf\u6240\u6709\u8fdb\u7a0b&#xff0c;\u9009\u62e9 oom_score \u6700\u9ad8\u8005&#xff08;\u9ed8\u8ba4&#xff09;<\/li>\n<li>1&#xff1a;\u76f4\u63a5\u6740\u6b7b\u89e6\u53d1 OOM \u7684\u8fdb\u7a0b&#xff0c;\u51cf\u5c11\u626b\u63cf\u5f00\u9500<\/li>\n<\/ul>\n<p>\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574\u6743\u91cd\u6765\u4fdd\u62a4\u5173\u952e\u8fdb\u7a0b&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u4fdd\u62a4MySQL\u8fdb\u7a0b<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-1000<\/span> <span class=\"token operator\">&gt;<\/span> \/proc\/<span class=\"token variable\"><span class=\"token variable\">$(<\/span>pgrep mysqld<span class=\"token variable\">)<\/span><\/span>\/oom_score_adj<\/p>\n<h4>\u56db\u5927\u6838\u5fc3\u673a\u5236\u8be6\u89e3<\/h4>\n<h5>Page Cache<\/h5>\n<p>Page Cache\u662fLinux\u5185\u5b58\u7ba1\u7406\u4e2d\u6700\u667a\u80fd\u7684\u90e8\u5206\u4e4b\u4e00&#xff0c;\u5b83\u901a\u8fc7\u7f13\u5b58\u78c1\u76d8\u6570\u636e\u6765\u63d0\u5347\u7cfb\u7edf\u6027\u80fd\u3002\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u6211\u4eec\u7ecf\u5e38\u770b\u5230\u670d\u52a1\u5668\u5185\u5b58\u4f7f\u7528\u7387\u5f88\u9ad8&#xff0c;\u4f46\u7cfb\u7edf\u4f9d\u7136\u6b63\u5e38\u8fd0\u884c\u7684\u539f\u56e0\u3002<\/p>\n<h5>Swap<\/h5>\n<p>Swap\u7a7a\u95f4\u662f\u78c1\u76d8\u4e0a\u7684\u4e00\u5757\u533a\u57df&#xff0c;\u5f53\u7269\u7406\u5185\u5b58\u4e0d\u8db3\u65f6&#xff0c;\u5185\u6838\u4f1a\u5c06\u4e0d\u5e38\u7528\u7684\u5185\u5b58\u9875\u6362\u51fa\u5230Swap\u3002\u7136\u800c&#xff0c;\u5728\u73b0\u4ee3\u751f\u4ea7\u73af\u5883\u4e2d&#xff1a;<\/p>\n<ul>\n<li>\u5bf9\u4e8e\u6570\u636e\u5e93\u670d\u52a1\u5668&#xff1a;\u7981\u7528Swap\u662f\u5e38\u89c1\u505a\u6cd5&#xff0c;\u56e0\u4e3a\u78c1\u76d8I\/O\u901f\u5ea6\u8fdc\u6162\u4e8e\u5185\u5b58<\/li>\n<li>\u5bf9\u4e8e\u5e94\u7528\u670d\u52a1\u5668&#xff1a;\u4fdd\u7559\u5c11\u91cfSwap&#xff08;\u59824GB&#xff09;\u4f5c\u4e3a\u7f13\u51b2&#xff0c;\u907f\u514d\u76f4\u63a5\u88abOOM Killer\u6740\u6b7b\u8fdb\u7a0b<\/li>\n<\/ul>\n<h5>\u900f\u660e\u5927\u9875&#xff08;THP&#xff09;<\/h5>\n<p><span class=\"token comment\"># \u67e5\u770bTHP\u72b6\u6001<\/span><br \/>\n<span class=\"token function\">cat<\/span> \/sys\/kernel\/mm\/transparent_hugepage\/enabled<br \/>\n<span class=\"token punctuation\">[<\/span>always<span class=\"token punctuation\">]<\/span> madvise never <span class=\"token comment\"># \u8f93\u51fa [always] \u8868\u793a\u5168\u5c40\u5f00\u542f<\/span><\/p>\n<p>THP\u53ef\u4ee5\u51cf\u5c11TLB\u7f3a\u5931&#xff0c;\u63d0\u5347\u5927\u5185\u5b58\u5e94\u7528\u7684\u6027\u80fd&#xff0c;\u4f46\u53ef\u80fd\u5bfc\u81f4\u5185\u5b58\u788e\u7247\u548c\u5ef6\u8fdf\u6ce2\u52a8\u3002\u751f\u4ea7\u73af\u5883\u5efa\u8bae&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u8c03\u6574\u4e3amadvise&#xff0c;\u8ba9\u5e94\u7528\u81ea\u5df1\u51b3\u5b9a<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> madvise <span class=\"token operator\">&gt;<\/span> \/sys\/kernel\/mm\/transparent_hugepage\/enabled<\/p>\n<h5>\u63a8\u8350\u5173\u95ed THP \u7684\u573a\u666f<\/h5>\n<p>\u5ef6\u8fdf\u654f\u611f\u578b\u6570\u636e\u5e93\/\u5927\u6570\u636e\u670d\u52a1<\/p>\n<p>\u5178\u578b\u5e94\u7528&#xff1a;Oracle\u3001MySQL\u3001PostgreSQL\u3001Redis\u3001Doris\u3001Elasticsearch \u7b49\u3002<br \/>\n\u539f\u56e0&#xff1a;<\/p>\n<ul>\n<li>THP \u7684\u540e\u53f0\u5b88\u62a4\u8fdb\u7a0b khugepaged \u4f1a\u9891\u7e41\u626b\u63cf\u5e76\u5408\u5e76\u5c0f\u9875&#xff0c;\u5bfc\u81f4\u4e0d\u53ef\u9884\u6d4b\u7684 CPU \u5cf0\u503c\u548c\u5185\u5b58\u9501\u7ade\u4e89&#xff0c;\u5f15\u53d1\u67e5\u8be2\u5ef6\u8fdf\u6296\u52a8&#xff08;\u5fae\u79d2\u81f3\u6beb\u79d2\u7ea7&#xff09;\u3002<\/li>\n<li>\u5185\u5b58\u788e\u7247\u5316\u4e25\u91cd\u65f6&#xff0c;THP \u53ef\u80fd\u89e6\u53d1\u6fc0\u8fdb\u7684\u76f4\u63a5\u5185\u5b58\u56de\u6536&#xff08;Direct Compaction&#xff09;&#xff0c;\u9020\u6210\u6027\u80fd\u9aa4\u964d\u751a\u81f3\u670d\u52a1\u8d85\u65f6\u3002<\/li>\n<\/ul>\n<h5>\u53ef\u5f00\u542f THP \u7684\u573a\u666f<\/h5>\n<p>\u901a\u7528\u8ba1\u7b97\u8d1f\u8f7d<\/p>\n<p>\u5178\u578b\u573a\u666f&#xff1a;Web \u670d\u52a1\u5668\u3001\u6587\u4ef6\u670d\u52a1\u3001\u5f00\u53d1\u73af\u5883\u7b49\u5185\u5b58\u8bbf\u95ee\u6a21\u5f0f\u8f83\u5747\u5300\u7684\u5e94\u7528\u3002<br \/>\n\u4f18\u52bf&#xff1a;<\/p>\n<ul>\n<li>\u81ea\u52a8\u63d0\u5347 TLB \u547d\u4e2d\u7387&#xff0c;\u51cf\u5c11\u9875\u8868\u9879\u5f00\u9500&#xff0c;\u65e0\u9700\u5e94\u7528\u4fee\u6539\u5373\u53ef\u83b7\u5f97\u6027\u80fd\u6536\u76ca\u3002<\/li>\n<\/ul>\n<h5>\u6c38\u4e45\u5173\u95ed&#xff08;\u63a8\u8350&#xff09;<\/h5>\n<p>\u5728 \/etc\/default\/grub \u7684 GRUB_CMDLINE_LINUX \u8ffd\u52a0 transparent_hugepage&#061;never&#xff0c;\u6267\u884c update-grub &amp;&amp; reboot\u3002<\/p>\n<p>\u9a8c\u8bc1\u6548\u679c&#xff1a;<\/p>\n<p><span class=\"token function\">grep<\/span> AnonHugePages \/proc\/<span class=\"token operator\">&lt;<\/span>pid<span class=\"token operator\">&gt;<\/span>\/smaps  <span class=\"token comment\"># \u82e5\u8f93\u51fa\u5168 0 \u8868\u793a THP \u5df2\u7981\u7528<\/span><\/p>\n<h5>OOM Killer&#xff1a;\u6b8b\u9177\u7684\u751f\u5b58\u6e38\u620f<\/h5>\n<p>\u5f53\u7cfb\u7edf\u771f\u6b63\u5185\u5b58\u4e0d\u8db3\u65f6&#xff0c;OOM Killer\u4f1a\u6839\u636e\u6bcf\u4e2a\u8fdb\u7a0b\u7684oom_score\u9009\u62e9\u201c\u727a\u7272\u8005\u201d\u3002\u5408\u7406\u914d\u7f6e\u8fdb\u7a0b\u7684oom_score_adj\u53ef\u4ee5\u4fdd\u62a4\u5173\u952e\u670d\u52a1\u3002<\/p>\n<p><span class=\"token comment\"># \u4fdd\u62a4MySQL\u8fdb\u7a0b<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-1000<\/span> <span class=\"token operator\">&gt;<\/span> \/proc\/<span class=\"token variable\"><span class=\"token variable\">$(<\/span>pgrep mysqld<span class=\"token variable\">)<\/span><\/span>\/oom_score_adj<\/p>\n<hr \/>\n<h3>Cgroups v2&#xff1a;\u4e91\u539f\u751f\u65f6\u4ee3\u7684\u8d44\u6e90\u7ba1\u63a7\u6807\u51c6<\/h3>\n<h4>\u4ece v1 \u5230 v2 \u7684\u8303\u5f0f\u8f6c\u79fb<\/h4>\n<p>Cgroups v2 \u91c7\u7528\u7edf\u4e00\u5c42\u7ea7\u7ed3\u6784&#xff08;Unified Hierarchy&#xff09;&#xff0c;\u89e3\u51b3\u4e86 v1 \u4e2d\u591a\u4e2a\u5b50\u7cfb\u7edf\u72ec\u7acb\u6302\u8f7d\u7684\u590d\u6742\u6027\u3002\u76ee\u524d Ubuntu 22.04&#043;\u3001RHEL 9\u3001Fedora 31&#043; \u5df2\u9ed8\u8ba4\u542f\u7528\u3002<\/p>\n<table>\n<tr>\u7279\u6027Cgroups v1Cgroups v2<\/tr>\n<tbody>\n<tr>\n<td>\u5c42\u7ea7\u7ed3\u6784<\/td>\n<td>\u591a\u5c42\u7ea7&#xff0c;\u5404\u63a7\u5236\u5668\u72ec\u7acb<\/td>\n<td>\u5355\u4e00\u5c42\u7ea7&#xff0c;\u7edf\u4e00\u7ba1\u63a7<\/td>\n<\/tr>\n<tr>\n<td>\u8fdb\u7a0b\u5f52\u5c5e<\/td>\n<td>\u53ef\u5c5e\u4e8e\u4e0d\u540c\u5c42\u7ea7\u7684\u4e0d\u540c\u7ec4<\/td>\n<td>\u53ea\u80fd\u5c5e\u4e8e\u4e00\u4e2a cgroup<\/td>\n<\/tr>\n<tr>\n<td>\u5185\u5b58\u63a7\u5236<\/td>\n<td>memory.limit_in_bytes<\/td>\n<td>memory.max&#xff08;\u786c\u9650\u5236&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u8bbe\u5907\u63a7\u5236<\/td>\n<td>\u76f4\u63a5\u914d\u7f6e<\/td>\n<td>\u57fa\u4e8e eBPF \u5b9e\u73b0<\/td>\n<\/tr>\n<tr>\n<td>PSI \u652f\u6301<\/td>\n<td>\u65e0<\/td>\n<td>\u539f\u751f\u652f\u6301<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u5185\u5b58\u63a7\u5236\u6a21\u578b<\/h4>\n<p>Cgroups v2 \u5f15\u5165\u7cbe\u7ec6\u5316\u7684\u5185\u5b58\u63a7\u5236\u7b56\u7565&#xff0c;\u7c7b\u4f3c\u6c34\u5e93\u7684\u4e09\u7ea7\u95f8\u95e8&#xff1a;<\/p>\n<p>memory.low&#xff08;\u8f6f\u4fdd\u62a4&#xff09;<\/p>\n<ul>\n<li>\u6700\u4f73\u52aa\u529b\u4fdd\u62a4&#xff0c;\u5185\u6838\u4f18\u5148\u56de\u6536\u5176\u4ed6 cgroup \u5185\u5b58<\/li>\n<li>Kubernetes Guaranteed QoS Pod \u7684\u5e95\u5c42\u5b9e\u73b0<\/li>\n<\/ul>\n<p>memory.high&#xff08;\u8282\u6d41\u9600&#xff09;<\/p>\n<ul>\n<li>\u8d85\u8fc7\u6b64\u503c\u5185\u6838\u542f\u52a8\u6fc0\u8fdb\u56de\u6536&#xff0c;\u8fdb\u7a0b\u8fdb\u5165\u8282\u6d41\u72b6\u6001<\/li>\n<li>\u751f\u4ea7\u9677\u9631&#xff1a;\u5e94\u7528\u5728 OOM \u524d\u53ef\u80fd\u5df2\u56e0 memory.high \u8282\u6d41\u800c\u6027\u80fd\u66b4\u8dcc&#xff0c;\u4f46\u76d1\u63a7\u5f80\u5f80\u53ea\u5173\u6ce8 OOM<\/li>\n<\/ul>\n<p>memory.max&#xff08;\u786c\u9650\u5236&#xff09;<\/p>\n<ul>\n<li>\u7edd\u5bf9\u4e0a\u9650&#xff0c;\u89e6\u53d1 OOM Killer<\/li>\n<\/ul>\n<h4>\u751f\u4ea7\u914d\u7f6e\u793a\u4f8b<\/h4>\n<p>\u914d\u7f6e\u4ec5\u4f9b\u53c2\u8003&#xff0c;\u5b9e\u9645\u60c5\u51b5\u662f\u9700\u8981\u6839\u636e\u81ea\u5df1\u670d\u52a1\u5668\u914d\u7f6e\u60c5\u51b5\u8fdb\u884c\u4fee\u6539\u3002<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u751f\u4ea7\u7ea7 cgroup<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> <span class=\"token parameter variable\">-p<\/span> \/sys\/fs\/cgroup\/prod-api<\/p>\n<p><span class=\"token comment\"># \u542f\u7528\u5185\u5b58\u63a7\u5236\u5668<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#043;memory&#034;<\/span> <span class=\"token operator\">&gt;<\/span> \/sys\/fs\/cgroup\/cgroup.subtree_control<\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6e\u4e09\u7ea7\u95f8\u95e8&#xff08;\u5355\u4f4d&#xff1a;\u5b57\u8282&#xff09;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token number\">8589934592<\/span> <span class=\"token operator\">&gt;<\/span> \/sys\/fs\/cgroup\/prod-api\/memory.low   <span class=\"token comment\"># 8GB \u4fdd\u62a4<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token number\">12884901888<\/span> <span class=\"token operator\">&gt;<\/span> \/sys\/fs\/cgroup\/prod-api\/memory.high <span class=\"token comment\"># 12GB \u5f00\u59cb\u8282\u6d41<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token number\">17179869184<\/span> <span class=\"token operator\">&gt;<\/span> \/sys\/fs\/cgroup\/prod-api\/memory.max  <span class=\"token comment\"># 16GB \u786c\u9650\u5236<\/span><\/p>\n<p><span class=\"token comment\"># \u8fc1\u79fb\u8fdb\u7a0b<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token operator\">&lt;<\/span>PID<span class=\"token operator\">&gt;<\/span> <span class=\"token operator\">&gt;<\/span> \/sys\/fs\/cgroup\/prod-api\/cgroup.procs<\/p>\n<p><span class=\"token comment\"># \u76d1\u63a7\u5b9e\u65f6\u538b\u529b<\/span><br \/>\n<span class=\"token function\">cat<\/span> \/sys\/fs\/cgroup\/prod-api\/memory.pressure<\/p>\n<hr \/>\n<h3>PSI \u91cf\u5316\u8d44\u6e90\u538b\u529b\u7684\u5229\u5668<\/h3>\n<p>Pressure Stall Information&#xff08;PSI&#xff09;\u662f Linux \u5185\u6838\u7248\u672c 4.20&#043; \u5f15\u5165\u7684\u7cbe\u786e\u538b\u529b\u5ea6\u91cf\u673a\u5236&#xff0c;\u63d0\u4f9b\u5899\u949f\u65f6\u95f4\u5360\u6bd4\u800c\u975e\u7b80\u5355\u7684\u8ba1\u6570\u5668\u3002<\/p>\n<h4>PSI \u6838\u5fc3\u6307\u6807\u89e3\u8bfb<\/h4>\n<p><span class=\"token function\">cat<\/span> \/sys\/fs\/cgroup\/prod-api\/memory.pressure <span class=\"token comment\"># \u5982\u679c\u63d0\u793a\u6ca1\u6709\u8fd9\u4e2a\u6587\u4ef6&#xff0c;\u8bf7\u770b\u4e0b\u9762\u7684\u5f00\u542f\u65b9\u6cd5<\/span><br \/>\n<span class=\"token comment\"># some avg10&#061;0.12 avg60&#061;0.34 avg300&#061;1.23 total&#061;12345678<\/span><br \/>\n<span class=\"token comment\"># full avg10&#061;0.00 avg60&#061;0.01 avg300&#061;0.05 total&#061;987654<\/span><\/p>\n<ul>\n<li>some&#xff1a;\u81f3\u5c11\u4e00\u4e2a\u4efb\u52a1\u56e0\u5185\u5b58\u7b49\u5f85\u505c\u6ede\u7684\u65f6\u95f4\u5360\u6bd4&#xff08;&gt;0 \u5373\u8868\u793a\u5b58\u5728\u8282\u6d41&#xff09;<\/li>\n<li>full&#xff1a;\u6240\u6709\u4efb\u52a1\u540c\u65f6\u505c\u6ede\u7684\u65f6\u95f4\u5360\u6bd4&#xff08;\u9884\u793a OOM \u98ce\u9669&#xff09;<\/li>\n<\/ul>\n<p>\u751f\u4ea7\u544a\u8b66\u9608\u503c\u5efa\u8bae&#xff1a;<\/p>\n<ul>\n<li>some avg60 &gt; 5%&#xff1a;\u9ec4\u8272\u9884\u8b66&#xff0c;\u5b58\u5728\u5185\u5b58\u538b\u529b<\/li>\n<li>some avg60 &gt; 20%&#xff1a;\u7ea2\u8272\u544a\u8b66&#xff0c;\u4e25\u91cd\u8282\u6d41<\/li>\n<li>full avg10 &gt; 1%&#xff1a;\u7d27\u6025\u72b6\u6001&#xff0c; imminent OOM<\/li>\n<\/ul>\n<p>\u542f\u7528 PSI<\/p>\n<p>grubby &#8211;update-kernel<span class=\"token operator\">&#061;<\/span>ALL <span class=\"token parameter variable\">&#8211;args<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;psi&#061;1&#034;<\/span><br \/>\n<span class=\"token function\">reboot<\/span><\/p>\n<p>\u6fc0\u6d3bcgroup\u63a7\u5236\u5668\u200c<\/p>\n<p><span class=\"token comment\"># \u5728\u6839cgroup\u542f\u7528\u63a7\u5236\u5668<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#043;memory &#043;io &#043;cpu&#034;<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">sudo<\/span> <span class=\"token function\">tee<\/span> \/sys\/fs\/cgroup\/cgroup.subtree_control<\/p>\n<p><span class=\"token comment\"># \u5728\u76ee\u6807cgroup\u542f\u7528\u63a7\u5236\u5668&#xff08;\u5982prod-api&#xff09;<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> <span class=\"token parameter variable\">-p<\/span> \/sys\/fs\/cgroup\/prod-api<br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#043;memory &#043;io &#043;cpu&#034;<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">sudo<\/span> <span class=\"token function\">tee<\/span> \/sys\/fs\/cgroup\/prod-api\/cgroup.subtree_control<\/p>\n<p><span class=\"token comment\"># \u9a8c\u8bc1\u63a7\u5236\u5668\u72b6\u6001<\/span><br \/>\n<span class=\"token function\">cat<\/span> \/sys\/fs\/cgroup\/prod-api\/cgroup.controllers  <span class=\"token comment\"># \u5e94\u5305\u542bmemory\/io\/cpu<\/span><\/p>\n<p>\u518d\u6b21\u67e5\u770b\u5373\u53ef<\/p>\n<p><span class=\"token comment\"># \u5e94\u6b63\u5e38\u8f93\u51fa\u538b\u529b\u6570\u636e<\/span><br \/>\n<span class=\"token function\">cat<\/span> \/sys\/fs\/cgroup\/prod-api\/memory.pressure<br \/>\n<span class=\"token comment\"># \u793a\u4f8b\u8f93\u51fa&#xff1a;avg10&#061;0.00 avg60&#061;0.00 avg300&#061;0.00 total&#061;0<\/span><\/p>\n<h4>\u4e0e Kubernetes \u7684\u96c6\u6210<\/h4>\n<p>Kubernetes \u4f9d\u8d56 kubelet \u76d1\u63a7 PSI \u5b9e\u73b0\u4e3b\u52a8\u9a71\u9010&#xff08;Eviction&#xff09;&#xff1a;<\/p>\n<ul>\n<li>\u5728\u8282\u70b9\u7ea7\u5185\u5b58\u538b\u529b\u65f6&#xff0c;\u4f18\u5148\u9a71\u9010 BestEffort\/Burstable Pod<\/li>\n<li>\u907f\u514d\u89e6\u53d1\u7cfb\u7edf\u7ea7 OOM Killer \u5bfc\u81f4\u5173\u952e\u670d\u52a1\u968f\u673a\u6b7b\u4ea1<\/li>\n<\/ul>\n<hr \/>\n<h3>eBPF \u5185\u5b58\u76d1\u63a7\u7684\u7ec8\u6781\u6b66\u5668<\/h3>\n<h4>\u5185\u6838\u7ea7\u5185\u5b58\u8ffd\u8e2a<\/h4>\n<p>eBPF \u5141\u8bb8\u5728\u5185\u6838\u6001\u5b89\u5168\u6267\u884c\u81ea\u5b9a\u4e49\u4ee3\u7801&#xff0c;\u5b9e\u73b0\u4e9a\u5fae\u79d2\u7ea7\u7684\u5185\u5b58\u4e8b\u4ef6\u8ffd\u8e2a&#xff0c;\u4e14\u51e0\u4e4e\u65e0\u6027\u80fd\u635f\u8017\u3002<\/p>\n<p>\u5178\u578b\u5e94\u7528\u573a\u666f&#xff1a;<\/p>\n<ul>\n<li>\u8ffd\u8e2a malloc\/free \u8c03\u7528\u6808&#xff0c;\u5b9a\u4f4d\u5185\u5b58\u6cc4\u6f0f<\/li>\n<li>\u76d1\u63a7 Slab \u5206\u914d\u5668\u788e\u7247\u5316<\/li>\n<li>\u7edf\u8ba1 Page Cache \u547d\u4e2d\u7387<\/li>\n<\/ul>\n<h4>BPF Map \u5185\u5b58\u7ba1\u63a7\u8981\u70b9<\/h4>\n<p>\u4ece Cgroups v2 \u5f00\u59cb&#xff0c;BPF Map \u5360\u7528\u7684\u5185\u6838\u5185\u5b58\u88ab\u6b63\u786e\u8ba1\u5165 cgroup \u8d26\u6237\u3002\u8fd9\u5bf9\u4f7f\u7528 eBPF \u7684\u76d1\u63a7\/\u5b89\u5168\u5de5\u5177&#xff08;\u5982 Cilium\u3001Falco&#xff09;\u81f3\u5173\u91cd\u8981&#xff1a;<\/p>\n<p>\u547d\u4ee4\u5b89\u88c5<br \/>\nUbuntu\/Debian<\/p>\n<p><span class=\"token function\">apt<\/span> <span class=\"token function\">install<\/span> linux-tools-<span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">uname<\/span> <span class=\"token parameter variable\">-r<\/span><span class=\"token variable\">)<\/span><\/span><\/p>\n<p>CentOS\/RHEL\/Alibaba Cloud Linux\u200c<\/p>\n<p>yum <span class=\"token parameter variable\">-y<\/span> <span class=\"token function\">install<\/span> bpftool <\/p>\n<p><span class=\"token comment\"># \u67e5\u770b BPF Map \u5185\u5b58\u5360\u7528&#xff08;\u9700 root&#xff09;<\/span><br \/>\nbpftool map <span class=\"token parameter variable\">-j<\/span> <span class=\"token operator\">|<\/span> jq <span class=\"token string\">&#039;[ .[] | .bytes_memlock ] | add \/ 1024 \/ 1024&#039;<\/span><br \/>\n<span class=\"token comment\"># \u8f93\u51fa&#xff1a;\u603b\u5360\u7528 MB \u6570<\/span><\/p>\n<p><span class=\"token comment\"># \u6309\u8fdb\u7a0b\u805a\u5408<\/span><br \/>\nbpftool map <span class=\"token parameter variable\">-j<\/span> <span class=\"token operator\">|<\/span> jq <span class=\"token string\">&#039;group_by(.pids[0].comm) | map({comm: .[0].pids[0].comm, total_mb: (map(.bytes_memlock) | add \/ 1024 \/ 1024)}) | sort_by(.total_mb)&#039;<\/span><\/p>\n<p>\u751f\u4ea7\u5efa\u8bae&#xff1a;\u672a\u4f7f\u7528\u7684 Map \u5e94\u8bbe\u7f6e max_entries&#061;1 \u5e76\u5728\u52a0\u8f7d\u65f6\u52a8\u6001\u8c03\u6574&#xff0c;\u907f\u514d\u7a7a Map \u5360\u7528\u5927\u91cf\u9501\u5b9a\u5185\u5b58&#xff08;locked memory&#xff09;\u3002<\/p>\n<hr \/>\n<h3>\u751f\u4ea7\u73af\u5883\u6700\u4f73\u5b9e\u8df5<\/h3>\n<h4>\u76d1\u63a7&#xff1a;\u770b\u5bf9\u6307\u6807\u624d\u662f\u5173\u952e<\/h4>\n<p>\u4e0d\u8981\u53ea\u770bused\u5185\u5b58&#xff0c;\u66f4\u5e94\u8be5\u5173\u6ce8&#xff1a;<\/p>\n<ul>\n<li>\u53ef\u7528\u5185\u5b58&#xff1a;available\u5b57\u6bb5&#xff08;\u5305\u542b\u53ef\u56de\u6536\u7684Cache&#xff09;<\/li>\n<li>Swap\u4f7f\u7528\u7387&#xff1a;\u5373\u4f7f\u6709Swap&#xff0c;\u4f7f\u7528\u7387\u4e5f\u4e0d\u5e94\u6301\u7eed\u9ad8\u4e8e10%<\/li>\n<li>\u9875\u9762\u4ea4\u6362&#xff1a;si&#xff08;swap in&#xff09;\u548cso&#xff08;swap out&#xff09;\u6b21\u6570<\/li>\n<li>PSI\u6307\u6807&#xff1a;\u76d1\u63a7\u5185\u5b58\u538b\u529b\u7684\u771f\u5b9e\u60c5\u51b5<\/li>\n<\/ul>\n<p>$ <span class=\"token function\">vmstat<\/span> <span class=\"token number\">1<\/span><br \/>\nprocs &#8212;&#8212;&#8212;&#8211;memory&#8212;&#8212;&#8212;- &#8212;swap&#8211; &#8212;&#8211;io&#8212;- -system&#8211; &#8212;&#8212;cpu&#8212;&#8211;<br \/>\n r  b   swpd   <span class=\"token function\">free<\/span>   buff  cache   si   so    bi    bo   <span class=\"token keyword\">in<\/span>   cs us sy <span class=\"token function\">id<\/span> wa st<br \/>\n <span class=\"token number\">2<\/span>  <span class=\"token number\">0<\/span>      <span class=\"token number\">0<\/span> <span class=\"token number\">1234567<\/span> <span class=\"token number\">891011<\/span> <span class=\"token number\">13141516<\/span>  <span class=\"token number\">0<\/span>    <span class=\"token number\">0<\/span>     <span class=\"token number\">0<\/span>     <span class=\"token number\">0<\/span>    <span class=\"token number\">0<\/span>    <span class=\"token number\">0<\/span> <span class=\"token number\">10<\/span>  <span class=\"token number\">5<\/span> <span class=\"token number\">85<\/span>  <span class=\"token number\">0<\/span>  <span class=\"token number\">0<\/span><\/p>\n<h4>\u53c2\u6570\u8c03\u4f18&#xff1a;\u56e0\u201c\u5e94\u7528\u201d\u5236\u5b9c<\/h4>\n<p>\u5728\/etc\/sysctl.conf\u4e2d\u6839\u636e\u5e94\u7528\u7c7b\u578b\u8c03\u6574&#xff1a;<\/p>\n<p>\u5185\u5b58\u654f\u611f\u578b\u5e94\u7528&#xff08;\u5982Redis&#xff09;&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u964d\u4f4eswap\u4f7f\u7528\u503e\u5411<\/span><br \/>\nvm.swappiness <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1<\/span><br \/>\n<span class=\"token comment\"># \u5c3d\u65e9\u89e6\u53d1\u5185\u5b58\u56de\u6536<\/span><br \/>\nvm.vfs_cache_pressure <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">200<\/span><\/p>\n<p>\u6587\u4ef6\u670d\u52a1\u5668&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u4fdd\u7559\u66f4\u591aCache<\/span><br \/>\nvm.vfs_cache_pressure <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">50<\/span><br \/>\n<span class=\"token comment\"># \u5141\u8bb8\u66f4\u591a\u810f\u9875<\/span><br \/>\nvm.dirty_ratio <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">40<\/span><br \/>\nvm.dirty_background_ratio <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">10<\/span><\/p>\n<h4>\u5bb9\u5668\u5316\u90e8\u7f72 checklist<\/h4>\n<p>\u5f3a\u5236\u4f7f\u7528 Cgroups v2&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u5f53\u524d\u7248\u672c<\/span><br \/>\n<span class=\"token function\">stat<\/span> <span class=\"token parameter variable\">-fc<\/span> %T \/sys\/fs\/cgroup\/<br \/>\n<span class=\"token comment\"># \u5e94\u8f93\u51fa&#xff1a;cgroup2fs<\/span><\/p>\n<p>\u5408\u7406\u8bbe\u7f6e memory.high&#xff1a;<\/p>\n<ul>\n<li>\u8bbe\u7f6e\u4e3a memory.limit \u7684 90%&#xff0c;\u63d0\u524d\u89e6\u53d1\u8282\u6d41\u800c\u975e OOM<\/li>\n<li>Java\/Go \u5e94\u7528\u9700\u7ed3\u5408 GC \u8c03\u4f18&#xff0c;\u907f\u514d\u4e0e\u5185\u6838\u56de\u6536\u51b2\u7a81<\/li>\n<\/ul>\n<p>\u542f\u7528 PSI \u76d1\u63a7&#xff1a;<\/p>\n<ul>\n<li>\u90e8\u7f72 node-exporter 1.3.0&#043; \u91c7\u96c6 PSI \u6307\u6807<\/li>\n<li>Grafana \u914d\u7f6e rate(node_pressure_memory_waiting_seconds_total[1m]) \u544a\u8b66<\/li>\n<\/ul>\n<p>Kubernetes \u73af\u5883\u914d\u7f6e&#xff1a;<\/p>\n<p><span class=\"token key atrule\">apiVersion<\/span><span class=\"token punctuation\">:<\/span> v1<br \/>\n<span class=\"token key atrule\">kind<\/span><span class=\"token punctuation\">:<\/span> Pod<br \/>\n<span class=\"token key atrule\">spec<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">containers<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> app<br \/>\n    <span class=\"token key atrule\">resources<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">requests<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">memory<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;512Mi&#034;<\/span>  <span class=\"token comment\"># \u8c03\u5ea6\u4f9d\u636e<\/span><br \/>\n      <span class=\"token key atrule\">limits<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">memory<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;1Gi&#034;<\/span>    <span class=\"token comment\"># \u8d85\u8fc7\u6b64\u503c\u4f1a\u88abOOM Kill<\/span><\/p>\n<ul>\n<li>\u8bbe\u7f6e\u5408\u7406\u7684requests\u548climits<\/li>\n<li>\u542f\u7528kubelet\u7684&#8211;kernel-memcg-notification\u7279\u6027&#xff0c;\u53ca\u65f6\u56de\u6536\u5185\u5b58<\/li>\n<\/ul>\n<h4>\u5927\u9875\u5185\u5b58&#xff08;HugePages&#xff09;\u4f18\u5316<\/h4>\n<p>\u5bf9\u4e8e\u6570\u636e\u5e93&#xff08;MySQL\/PostgreSQL&#xff09;\u548c\u5185\u5b58\u578b\u7f13\u5b58&#xff08;Redis&#xff09;&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5f53\u524d\u5927\u9875\u914d\u7f6e<\/span><br \/>\n<span class=\"token function\">cat<\/span> \/proc\/sys\/vm\/nr_hugepages<\/p>\n<p><span class=\"token comment\"># \u52a8\u6001\u5206\u914d 1024 \u4e2a 2MB \u5927\u9875<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token number\">1024<\/span> <span class=\"token operator\">&gt;<\/span> \/proc\/sys\/vm\/nr_hugepages<\/p>\n<p><span class=\"token comment\"># \u5728 cgroup v2 \u4e2d\u9650\u5236 HugeTLB \u4f7f\u7528<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token number\">1073741824<\/span> <span class=\"token operator\">&gt;<\/span> \/sys\/fs\/cgroup\/prod-api\/hugetlb.2MB.max<\/p>\n<h4>\u6545\u969c\u6392\u67e5\u4e09\u677f\u65a7<\/h4>\n<p>\u573a\u666f&#xff1a;\u5e94\u7528\u54cd\u5e94\u53d8\u6162&#xff0c;\u6000\u7591\u5185\u5b58\u95ee\u9898<\/p>\n<p>\u5feb\u901f\u67e5\u770b\u5185\u5b58\u6982\u51b5&#xff1a;<\/p>\n<p><span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-i<\/span> <span class=\"token string\">&#034;out of memory&#034;<\/span> \/var\/log\/messages<br \/>\n<span class=\"token function\">dmesg<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-i<\/span> <span class=\"token string\">&#034;killed process&#034;<\/span><\/p>\n<p>\u5206\u6790\u5177\u4f53\u8fdb\u7a0b&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5185\u5b58\u4f7f\u7528\u524d10\u7684\u8fdb\u7a0b<\/span><br \/>\n<span class=\"token function\">ps<\/span> aux <span class=\"token parameter variable\">&#8211;sort<\/span><span class=\"token operator\">&#061;<\/span>-%mem <span class=\"token operator\">|<\/span> <span class=\"token function\">head<\/span> <span class=\"token parameter variable\">-11<\/span><br \/>\n<span class=\"token comment\"># \u67e5\u770b\/proc\u4e2d\u8fdb\u7a0b\u7684\u8be6\u7ec6\u5185\u5b58\u4fe1\u606f<\/span><br \/>\n<span class=\"token function\">cat<\/span> \/proc\/PID\/smaps <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-i<\/span> pss<\/p>\n<p>\u6df1\u5165\u5185\u6838\u72b6\u6001&#xff1a;<\/p>\n<p>slabtop<br \/>\n<span class=\"token function\">cat<\/span> \/proc\/meminfo<br \/>\n<span class=\"token function\">cat<\/span> \/proc\/buddyinfo  <span class=\"token comment\"># \u67e5\u770b\u5185\u5b58\u788e\u7247\u60c5\u51b5<\/span><\/p>\n<h4>\u5371\u9669\u64cd\u4f5c\u8b66\u793a<\/h4>\n<p>\u907f\u514d\u5728\u751f\u4ea7\u73af\u5883\u76f4\u63a5\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token number\">3<\/span> <span class=\"token operator\">&gt;<\/span> \/proc\/sys\/vm\/drop_caches  <span class=\"token comment\"># \u5f3a\u5236\u6e05\u7406\u7f13\u5b58<\/span><\/p>\n<p>\u8fd9\u4f1a\u5bfc\u81f4\u77ac\u95f4 I\/O \u98ce\u66b4&#xff0c;\u5e94\u901a\u8fc7\u8c03\u6574 memory.high \u8ba9\u5185\u6838\u6e10\u8fdb\u5f0f\u56de\u6536\u3002<\/p>\n<hr \/>\n<h3>\u4eceLRU\u5230Memory Tiering<\/h3>\n<h4>Memory Tiering&#xff1a;\u5185\u5b58\u5206\u5c42\u7ba1\u7406<\/h4>\n<p>\u968f\u7740Intel Optane\u7b49\u975e\u6613\u5931\u6027\u5185\u5b58\u7684\u51fa\u73b0&#xff0c;Linux\u5185\u6838\u6b63\u5728\u53d1\u5c55Memory Tiering\u673a\u5236\u3002\u8fd9\u79cd\u673a\u5236\u53ef\u4ee5\u81ea\u52a8\u5c06\u201c\u70ed\u201d\u6570\u636e\u653e\u5728\u5feb\u901f\u5185\u5b58&#xff08;\u5982DRAM&#xff09;&#xff0c;\u5c06\u201c\u51b7\u201d\u6570\u636e\u79fb\u5230\u6162\u901f\u5185\u5b58&#xff08;\u5982CXL\u5185\u5b58&#xff09;&#xff0c;\u5b9e\u73b0\u6027\u4ef7\u6bd4\u7684\u6700\u4f18\u5316\u3002<\/p>\n<hr \/>\n<h3>\u603b\u7ed3<\/h3>\n<p>\u73b0\u4ee3 Linux \u5185\u5b58\u7ba1\u7406\u5df2\u4ece\u7b80\u5355\u7684&#034;\u5206\u914d-\u56de\u6536&#034;\u6f14\u8fdb\u4e3a\u591a\u5c42\u6b21\u8d44\u6e90\u7ba1\u63a7\u4f53\u7cfb&#xff1a;<\/p>\n<table>\n<tr>\u5c42\u7ea7\u6280\u672f\u9002\u7528\u573a\u666f<\/tr>\n<tbody>\n<tr>\n<td>\u5185\u6838\u673a\u5236<\/td>\n<td>Buddy\/Slab\/\u56de\u6536\u7b97\u6cd5<\/td>\n<td>\u7269\u7406\u8d44\u6e90\u7ba1\u7406<\/td>\n<\/tr>\n<tr>\n<td>\u8d44\u6e90\u9694\u79bb<\/td>\n<td>Cgroups v2<\/td>\n<td>\u591a\u79df\u6237\/\u5bb9\u5668\u5316<\/td>\n<\/tr>\n<tr>\n<td>\u538b\u529b\u611f\u77e5<\/td>\n<td>PSI<\/td>\n<td>\u9884\u6d4b\u6027\u6269\u7f29\u5bb9<\/td>\n<\/tr>\n<tr>\n<td>\u53ef\u89c2\u6d4b\u6027<\/td>\n<td>eBPF<\/td>\n<td>\u7cbe\u7ec6\u5316\u6545\u969c\u8bca\u65ad<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Linux\u5185\u5b58\u7ba1\u7406\u662f\u4e00\u4e2a\u52a8\u6001\u3001\u667a\u80fd\u7684\u7cfb\u7edf\u3002\u5728\u751f\u4ea7\u73af\u5883\u4e2d&#xff0c;\u6211\u4eec\u5e94\u5f53&#xff1a;<\/p>\n<li>\u7406\u89e3\u673a\u5236&#xff1a;\u533a\u5206\u771f\u6b63\u7684\u5185\u5b58\u4e0d\u8db3\u4e0ePage Cache\u5360\u7528<\/li>\n<li>\u76d1\u63a7\u6b63\u786e\u6307\u6807&#xff1a;\u91cd\u70b9\u5173\u6ce8available\u5185\u5b58\u3001Swap\u6d3b\u52a8\u548cPSI\u538b\u529b<\/li>\n<li>\u56e0\u5e94\u7528\u914d\u7f6e&#xff1a;\u4e0d\u540c\u5de5\u4f5c\u8d1f\u8f7d\u9700\u8981\u4e0d\u540c\u7684\u5185\u6838\u53c2\u6570\u548ccgroup\u8bbe\u7f6e<\/li>\n<li>\u9884\u9632\u4f18\u4e8e\u6551\u6cbb&#xff1a;\u8bbe\u7f6e\u5408\u7406\u7684\u76d1\u63a7\u9608\u503c\u548c\u544a\u8b66\u89c4\u5219<\/li>\n<li>\u62e5\u62b1\u65b0\u6280\u672f&#xff1a;\u79ef\u6781\u91c7\u7528Cgroups v2\u3001PSI\u548ceBPF\u7b49\u73b0\u4ee3\u5de5\u5177<\/li>\n<p>\u672c\u6587\u6280\u672f\u7ec6\u8282\u57fa\u4e8e Linux 6.x \u5185\u6838&#xff0c;\u9002\u7528\u4e8e RHEL 9\u3001Ubuntu 22.04\/24.04\u3001Containerd 1.7&#043; \u7b49\u4e3b\u6d41\u751f\u4ea7\u73af\u5883\u3002<\/p>\n<p>\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u7406\u89e3\u548c\u7ba1\u7406\u670d\u52a1\u5668\u5185\u5b58\u3002\u5982\u679c\u4f60\u6709\u7279\u6b8a\u7684\u5185\u5b58\u7ba1\u7406\u6848\u4f8b\u6216\u7ecf\u9a8c&#xff0c;\u6b22\u8fce\u5728\u8bc4\u8bba\u533a\u5206\u4eab\u8ba8\u8bba&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u5185\u5b58\u7ba1\u7406\u5168\u89e3\u6790&#xff1a;\u4ece\u539f\u7406\u5230\u5b9e\u8df5&#xff0c;\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u4e0d\u518d\u201c\u5185\u5b58\u4e0d\u8db3\u201d<br \/>\n\u5728\u65e5\u5e38\u8fd0\u7ef4\u4e2d&#xff0c;\u4f60\u662f\u5426\u4e5f\u7ecf\u5e38\u770b\u5230\u670d\u52a1\u5668\u5185\u5b58\u4f7f\u7528\u7387\u8fbe\u523090%\u4ee5\u4e0a&#xff0c;\u7136\u540e\u7d27\u6025\u6269\u5bb9&#xff1f;\u5b9e\u9645\u4e0a&#xff0c;Linux\u7684\u5185\u5b58\u7ba1\u7406\u673a\u5236\u8fdc\u6bd4\u6211\u4eec\u60f3\u8c61\u7684\u8981\u590d\u6742\u548c\u667a\u80fd\u3002\u4eca\u5929&#xff0c;\u6211\u4eec\u5c31\u6765\u6df1\u5165\u63a2\u8ba8Linux\u5185\u5b58\u7ba1\u7406\u7684\u6838\u5fc3\u673a\u5236&#xff0c;\u4ee5\u53ca\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u8be5\u5982\u4f55\u6b63\u786e\u7406\u89e3\u548c\u4f18\u5316\u5185\u5b58\u4f7f\u7528\u3002<br \/>\n\u4e3e\u4f8b<br \/>\n\u4f01\u4e1a\u7684\u76d1\u63a7\u7cfb\u7edf\u9891\u7e41\u53d1\u51fa\u5185\u5b58\u544a\u8b66&#xff0c;\u663e\u793a\u591a\u53f0\u670d<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,43,44],"topic":[],"class_list":["post-84741","post","type-post","status-publish","format-standard","hentry","category-server","tag-linux","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux\u5185\u5b58\u7ba1\u7406\u5168\u89e3\u6790\uff1a\u4ece\u539f\u7406\u5230\u5b9e\u8df5\uff0c\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u4e0d\u518d\u201c\u5185\u5b58\u4e0d\u8db3\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/84741.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux\u5185\u5b58\u7ba1\u7406\u5168\u89e3\u6790\uff1a\u4ece\u539f\u7406\u5230\u5b9e\u8df5\uff0c\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u4e0d\u518d\u201c\u5185\u5b58\u4e0d\u8db3\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Linux\u5185\u5b58\u7ba1\u7406\u5168\u89e3\u6790&#xff1a;\u4ece\u539f\u7406\u5230\u5b9e\u8df5&#xff0c;\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u4e0d\u518d\u201c\u5185\u5b58\u4e0d\u8db3\u201d \u5728\u65e5\u5e38\u8fd0\u7ef4\u4e2d&#xff0c;\u4f60\u662f\u5426\u4e5f\u7ecf\u5e38\u770b\u5230\u670d\u52a1\u5668\u5185\u5b58\u4f7f\u7528\u7387\u8fbe\u523090%\u4ee5\u4e0a&#xff0c;\u7136\u540e\u7d27\u6025\u6269\u5bb9&#xff1f;\u5b9e\u9645\u4e0a&#xff0c;Linux\u7684\u5185\u5b58\u7ba1\u7406\u673a\u5236\u8fdc\u6bd4\u6211\u4eec\u60f3\u8c61\u7684\u8981\u590d\u6742\u548c\u667a\u80fd\u3002\u4eca\u5929&#xff0c;\u6211\u4eec\u5c31\u6765\u6df1\u5165\u63a2\u8ba8Linux\u5185\u5b58\u7ba1\u7406\u7684\u6838\u5fc3\u673a\u5236&#xff0c;\u4ee5\u53ca\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u8be5\u5982\u4f55\u6b63\u786e\u7406\u89e3\u548c\u4f18\u5316\u5185\u5b58\u4f7f\u7528\u3002 \u4e3e\u4f8b \u4f01\u4e1a\u7684\u76d1\u63a7\u7cfb\u7edf\u9891\u7e41\u53d1\u51fa\u5185\u5b58\u544a\u8b66&#xff0c;\u663e\u793a\u591a\u53f0\u670d\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/84741.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-26T08:48:49+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/84741.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/84741.html\",\"name\":\"Linux\u5185\u5b58\u7ba1\u7406\u5168\u89e3\u6790\uff1a\u4ece\u539f\u7406\u5230\u5b9e\u8df5\uff0c\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u4e0d\u518d\u201c\u5185\u5b58\u4e0d\u8db3\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-26T08:48:49+00:00\",\"dateModified\":\"2026-07-26T08:48:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/84741.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/84741.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/84741.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u5185\u5b58\u7ba1\u7406\u5168\u89e3\u6790\uff1a\u4ece\u539f\u7406\u5230\u5b9e\u8df5\uff0c\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u4e0d\u518d\u201c\u5185\u5b58\u4e0d\u8db3\u201d\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux\u5185\u5b58\u7ba1\u7406\u5168\u89e3\u6790\uff1a\u4ece\u539f\u7406\u5230\u5b9e\u8df5\uff0c\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u4e0d\u518d\u201c\u5185\u5b58\u4e0d\u8db3\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/84741.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux\u5185\u5b58\u7ba1\u7406\u5168\u89e3\u6790\uff1a\u4ece\u539f\u7406\u5230\u5b9e\u8df5\uff0c\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u4e0d\u518d\u201c\u5185\u5b58\u4e0d\u8db3\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Linux\u5185\u5b58\u7ba1\u7406\u5168\u89e3\u6790&#xff1a;\u4ece\u539f\u7406\u5230\u5b9e\u8df5&#xff0c;\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u4e0d\u518d\u201c\u5185\u5b58\u4e0d\u8db3\u201d \u5728\u65e5\u5e38\u8fd0\u7ef4\u4e2d&#xff0c;\u4f60\u662f\u5426\u4e5f\u7ecf\u5e38\u770b\u5230\u670d\u52a1\u5668\u5185\u5b58\u4f7f\u7528\u7387\u8fbe\u523090%\u4ee5\u4e0a&#xff0c;\u7136\u540e\u7d27\u6025\u6269\u5bb9&#xff1f;\u5b9e\u9645\u4e0a&#xff0c;Linux\u7684\u5185\u5b58\u7ba1\u7406\u673a\u5236\u8fdc\u6bd4\u6211\u4eec\u60f3\u8c61\u7684\u8981\u590d\u6742\u548c\u667a\u80fd\u3002\u4eca\u5929&#xff0c;\u6211\u4eec\u5c31\u6765\u6df1\u5165\u63a2\u8ba8Linux\u5185\u5b58\u7ba1\u7406\u7684\u6838\u5fc3\u673a\u5236&#xff0c;\u4ee5\u53ca\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u8be5\u5982\u4f55\u6b63\u786e\u7406\u89e3\u548c\u4f18\u5316\u5185\u5b58\u4f7f\u7528\u3002 \u4e3e\u4f8b \u4f01\u4e1a\u7684\u76d1\u63a7\u7cfb\u7edf\u9891\u7e41\u53d1\u51fa\u5185\u5b58\u544a\u8b66&#xff0c;\u663e\u793a\u591a\u53f0\u670d","og_url":"https:\/\/www.wsisp.com\/helps\/84741.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-26T08:48:49+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/84741.html","url":"https:\/\/www.wsisp.com\/helps\/84741.html","name":"Linux\u5185\u5b58\u7ba1\u7406\u5168\u89e3\u6790\uff1a\u4ece\u539f\u7406\u5230\u5b9e\u8df5\uff0c\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u4e0d\u518d\u201c\u5185\u5b58\u4e0d\u8db3\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-26T08:48:49+00:00","dateModified":"2026-07-26T08:48:49+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/84741.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/84741.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/84741.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux\u5185\u5b58\u7ba1\u7406\u5168\u89e3\u6790\uff1a\u4ece\u539f\u7406\u5230\u5b9e\u8df5\uff0c\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u4e0d\u518d\u201c\u5185\u5b58\u4e0d\u8db3\u201d"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/84741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=84741"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/84741\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=84741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=84741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=84741"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=84741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}