{"id":258,"date":"2016-10-24T07:11:59","date_gmt":"2016-10-24T07:11:59","guid":{"rendered":"http:\/\/alain.fi\/?p=258"},"modified":"2019-07-30T03:59:37","modified_gmt":"2019-07-30T03:59:37","slug":"ramfs-temporarily-mount-filesystem-in-ram-to-speed-things-up","status":"publish","type":"post","link":"https:\/\/alain.fi\/?p=258","title":{"rendered":"ramfs &#8211; temporarily mount filesystem in ram to speed things up"},"content":{"rendered":"<p>ram is faster than disk, this is less and less true with ssd, but in many situations it is still true, and can be useful to use the ram to serve files at high speed access.<\/p>\n<p>Example script that\u00a0first unmount a directory, then copy the content of another and mount it in ram:<\/p>\n<pre># unmount\r\numount \/var\/www\/servemequick\r\n# mount\r\n# copy source to temporary backup\r\ncp -Rv \/var\/www\/servemequick .\/servemequick\r\n# mount new ram directory with same path as source\r\nmount -t tmpfs -o size=1g tmpfs \/var\/www\/servemequick\/\r\n# copy backup to mounted new ram directory\r\ncp -Rv .\/servemequick\/* \/var\/www\/servemequick\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ram is faster than disk, this is less and less true with ssd, but in many situations it is still true, and can be useful to use the ram to serve files at high speed access. Example script that\u00a0first unmount &hellip; <a href=\"https:\/\/alain.fi\/?p=258\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-258","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/posts\/258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alain.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=258"}],"version-history":[{"count":2,"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/posts\/258\/revisions"}],"predecessor-version":[{"id":260,"href":"https:\/\/alain.fi\/index.php?rest_route=\/wp\/v2\/posts\/258\/revisions\/260"}],"wp:attachment":[{"href":"https:\/\/alain.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alain.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alain.fi\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}