{"id":47366,"date":"2020-03-06T16:48:04","date_gmt":"2020-03-06T08:48:04","guid":{"rendered":"http:\/\/4563.org\/?p=47366"},"modified":"2020-03-06T16:48:04","modified_gmt":"2020-03-06T08:48:04","slug":"%e9%97%ae%e4%b8%aaswap%e7%9a%84%e6%8a%80%e6%9c%af%e6%80%a7%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=47366","title":{"rendered":"\u95ee\u4e2aswap\u7684\u6280\u672f\u6027\u95ee\u9898"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>\u4f0a\u65af\u84dd<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>\u95ee\u4e2aswap\u7684\u6280\u672f\u6027\u95ee\u9898<\/h3>\n<p>  \t\tram=1g<br \/>  swap=1g<br \/>  swappiness=60<br \/>  ram\u7528\u4e86800\u591am<br \/>  swap\u624d\u75286m<br \/>  swappiness\u4e3a\u4ec0\u4e48\u6ca1\u4f5c\u7528\u5462\uff1f<br \/>  sudo sysctl -p\u5df2\u6267\u884c\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>why?<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 why? \u4e8e 2020-3-6 16:49 \u7f16\u8f91 <\/p>\n<p> swappiness\u4e0d\u662f\u5f53\u5185\u5b58\u7528\u7684<\/p>\n<p>  swappiness\uff0cLinux\u5185\u6838\u53c2\u6570\uff0c\u63a7\u5236\u6362\u51fa\u8fd0\u884c\u65f6\u5185\u5b58\u7684\u76f8\u5bf9\u6743\u91cd\u3002swappiness\u53c2\u6570\u503c\u53ef\u8bbe\u7f6e\u8303\u56f4\u57280\u5230100\u4e4b\u95f4\u3002 \u4f4e\u53c2\u6570\u503c\u4f1a\u8ba9\u5185\u6838\u5c3d\u91cf\u5c11\u7528\u4ea4\u6362\uff0c\u66f4\u9ad8\u53c2\u6570\u503c\u4f1a\u4f7f\u5185\u6838\u66f4\u591a\u7684\u53bb\u4f7f\u7528\u4ea4\u6362\u7a7a\u95f4\u3002\u9ed8\u8ba4\u503c\u4e3a60\uff08\u53c2\u8003\u7f51\u7edc\u8d44\u6599\uff1a\u5f53\u5269\u4f59\u7269\u7406\u5185\u5b58\u4f4e\u4e8e40%\uff0840=100-60\uff09\u65f6\uff0c\u5f00\u59cb\u4f7f\u7528\u4ea4\u6362\u7a7a\u95f4\uff09\u3002\u5bf9\u4e8e\u5927\u591a\u6570\u64cd\u4f5c\u7cfb\u7edf\uff0c\u8bbe\u7f6e\u4e3a100\u53ef\u80fd\u4f1a\u5f71\u54cd\u6574\u4f53\u6027\u80fd\uff0c\u800c\u8bbe\u7f6e\u4e3a\u66f4\u4f4e\u503c\uff08\u751a\u81f3\u4e3a0\uff09\u5219\u53ef\u80fd\u51cf\u5c11\u54cd\u5e94\u5ef6\u8fdf\u3002\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f0a\u65af\u84dd \u5927\u4f6c\u6709\u8bdd\u8bf4 : \u95ee\u4e2aswa&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/47366"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=47366"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/47366\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=47366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=47366"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=47366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}