{"id":2216,"date":"2015-09-24T10:53:02","date_gmt":"2015-09-24T01:53:02","guid":{"rendered":"http:\/\/blog.rutake.com\/techmemo\/?p=2216"},"modified":"2015-09-24T11:27:55","modified_gmt":"2015-09-24T02:27:55","slug":"aws-%e3%81%a8%e3%82%8a%e3%81%82%e3%81%88%e3%81%9aswap%e9%a0%98%e5%9f%9f%e3%82%92%e4%bd%9c%e6%88%90","status":"publish","type":"post","link":"https:\/\/blog.rutake.com\/techmemo\/2015\/09\/24\/aws-%e3%81%a8%e3%82%8a%e3%81%82%e3%81%88%e3%81%9aswap%e9%a0%98%e5%9f%9f%e3%82%92%e4%bd%9c%e6%88%90\/","title":{"rendered":"AWS \u3068\u308a\u3042\u3048\u305aSWAP\u9818\u57df\u3092\u4f5c\u6210"},"content":{"rendered":"<p>AWS\u306b\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067SWAP\u304c\u306a\u3044\u305f\u3081\u3001\u30e1\u30e2\u30ea\u4e0d\u8db3\u306e\u4e8b\u614b\u304c\u767a\u751f\u3059\u308b\u3068OOMKiller\u304c\u8a98\u767a\u3055\u308c\u3066\u30d7\u30ed\u30bb\u30b9\u304c\u6b7b\u3093\u3067\u3057\u307e\u3046\u4e8b\u614b\u304c\u8d77\u3053\u308a\u5f97\u308b\u3002<\/p>\n<p>SWAP\u304c\u3042\u308c\u3070\u8010\u3048\u3089\u308c\u308b\u5c40\u9762\u3082\u591a\u3044\u306e\u3067\u3001\u5834\u5f53\u305f\u308a\u7684\u5bfe\u5fdc\u3060\u304c\u3001SWAP\u3092\u30eb\u30fc\u30c8\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306b\u4f5c\u6210\u3057\u3066\u3057\u306e\u3050\u6280\u3002\u518d\u8d77\u52d5\u3059\u308b\u3068\u306a\u304f\u306a\u308b\u306e\u3067\u6ce8\u610f\u3002<\/p>\n<p>[shell]<br \/>\ndd if=\/dev\/zero of=\/swap bs=1M count=512<br \/>\nchmod 600 \/swap<br \/>\nmkswap \/swap<br \/>\nswapon \/swap<br \/>\n# \u78ba\u8a8d<br \/>\nswapon -s<br \/>\n[\/shell]<\/p>\n<p>\u518d\u8d77\u52d5\u5f8c\u3082\u6709\u52b9\u306b\u3059\u308b\u306b\u306f\/etc\/fstab\u306b\u4ee5\u4e0b\u306e\u4e00\u884c\u3092\u8ffd\u8a18\u3059\u308b\u3002<br \/>\n[shell]<br \/>\n\/swap  swap        swap    defaults        0   0<br \/>\n[\/shell]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>AWS\u306b\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067SWAP\u304c\u306a\u3044\u305f\u3081\u3001\u30e1\u30e2\u30ea\u4e0d\u8db3\u306e\u4e8b\u614b\u304c\u767a\u751f\u3059\u308b\u3068OOMKi &hellip; <a href=\"https:\/\/blog.rutake.com\/techmemo\/2015\/09\/24\/aws-%e3%81%a8%e3%82%8a%e3%81%82%e3%81%88%e3%81%9aswap%e9%a0%98%e5%9f%9f%e3%82%92%e4%bd%9c%e6%88%90\/\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[333],"tags":[430,445],"_links":{"self":[{"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/posts\/2216"}],"collection":[{"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/comments?post=2216"}],"version-history":[{"count":2,"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/posts\/2216\/revisions"}],"predecessor-version":[{"id":2218,"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/posts\/2216\/revisions\/2218"}],"wp:attachment":[{"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/media?parent=2216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/categories?post=2216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/tags?post=2216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}