{"id":418,"date":"2011-05-31T21:25:24","date_gmt":"2011-05-31T20:25:24","guid":{"rendered":"http:\/\/cdblog.cdstealer.com\/?p=418"},"modified":"2020-11-13T09:20:39","modified_gmt":"2020-11-13T09:20:39","slug":"swap-space","status":"publish","type":"post","link":"https:\/\/cdblog.cdstealer.com\/?p=418","title":{"rendered":"Swap space."},"content":{"rendered":"<p>To quickly add some extra swap do the following (as root):<\/p>\n<pre>dd if=\/dev\/zero of=\/extraswap bs=1M count=12288<\/pre>\n<p>This will create a 12Gb swapfile in \/<\/p>\n<pre>chmod 600 \/extraswap<\/pre>\n<p>This will set the correct permissions on the file.<\/p>\n<pre>mkswap \/extraswap<\/pre>\n<p>This will format the space for use as swap.<\/p>\n<pre>swapon -s<\/pre>\n<p>This will show what is currently mounted as swap.<\/p>\n<p>If you want this to be a temporary setting just run:<\/p>\n<pre>swapon \/extraswap<\/pre>\n<p>If you want this to be persistent, add this to your \/etc\/fstab:<\/p>\n<pre>\/extraswap\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 none\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 swap\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 sw\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 0 0<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To quickly add some extra swap do the following (as root): dd if=\/dev\/zero of=\/extraswap bs=1M count=12288 This will create a 12Gb swapfile in \/ chmod 600 \/extraswap This will set the correct permissions on the file. mkswap \/extraswap This will format the space for use as swap. swapon -s This will show what is currently &hellip; <a href=\"https:\/\/cdblog.cdstealer.com\/?p=418\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Swap space.<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[18,75,76],"class_list":["post-418","post","type-post","status-publish","format-standard","hentry","category-gentoo","tag-linux","tag-swap","tag-virtual-memory"],"_links":{"self":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=418"}],"version-history":[{"count":3,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/418\/revisions"}],"predecessor-version":[{"id":2055,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/418\/revisions\/2055"}],"wp:attachment":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}