{"id":1558,"date":"2009-06-01T20:40:01","date_gmt":"2009-06-02T03:40:01","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=1558"},"modified":"2010-05-17T21:57:05","modified_gmt":"2010-05-18T04:57:05","slug":"ram-disk-experiment","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/","title":{"rendered":"RAM Disk Experiment"},"content":{"rendered":"<p><strong>Science project:<\/strong> Can <a href=\"http:\/\/fate.multimedia.cx\/\">FATE<\/a> performance be improved &#8212; significantly or at all &#8212; by running as much of the operation as possible from RAM? My hypothesis is that it will speed up the overall build\/test process, but I don&#8217;t know by how much.<\/p>\n<blockquote><p>Conclusion and spoiler: The RAM disk makes no appreciable performance difference. Linux&#8217;s default caching is more than adequate.\n<\/p><\/blockquote>\n<p>There are 4 items I am looking at storing in RAM: The FFmpeg source code, the built objects, the ccache files, and the <a href=\"http:\/\/samples.mplayerhq.hu\/fate-suite\/\">suite of FATE samples<\/a>. This experiment will deal with placing the first 3 into RAM.<\/p>\n<p>Method:<\/p>\n<ul>\n<li>Clear ccache and compile <a href=\"http:\/\/ffmpeg.org\/\">FFmpeg<\/a> on the disk. Do this thrice and collect &#8220;wall clock&#8221; numbers using the &#8216;time&#8217; command line prefix,<br \/>\ne.g.:<\/p>\n<pre>\r\n  time `..\/ffmpeg\/configure --prefix=install-directory -cc=\"ccache gcc\" &&\r\n        make && make install`\r\n<\/pre>\n<p>The second and third runs should be faster due to Linux&#8217;s usual file caching in memory.\n<\/li>\n<li>Restart the machine.<\/li>\n<li>Perform 3 more runs using the existing cache.<\/li>\n<li>Restart the machine.<\/li>\n<li>Set up a 1GB RAM disk as outlined by <a href=\"http:\/\/www.vanemery.com\/Linux\/Ramdisk\/ramdisk.html\">this tutorial<\/a>.<\/li>\n<li>Copy the source tree into the RAM disk and configure ccache to use a directory on the RAM disk. Re-run the last step and collect numbers.<\/li>\n<li>Bonus: restart the machine again and compile the source without ccache in order to measure the performance hit incurred by ccache when there are no files cached.\n<\/li>\n<\/ul>\n<p>Hardware: MSI Wind Nettop with 1.6 GHz N330 Atom (dual-core, hyperthreaded); 2 GB of DDR2 533 RAM; 160 GB, 7200 RPM SATA HD with an ext3 filesystem. I don&#8217;t know a good way to graph this, so here are the raw numbers. The first number of each pair is wall clock time, the second is CPU time.<\/p>\n<pre>\r\nOn disk:\r\nrun 1: 15:41, 14:32\r\nrun 2:  1:43,  1:12\r\nrun 3:  1:43,  1:12\r\n\r\nOn disk, after restart:\r\nrun 1:  1:50,  1:13\r\nrun 2:  1:42,  1:13\r\nrun 3:  1:43,  1:12\r\n\r\nRAM disk (ext2):\r\nrun 1: 15:37, 14:35\r\nrun 2:  1:39,  1:12\r\nrun 3:  1:40,  1:13\r\n\r\nFrom startup, no ccache:\r\nrun 1: 15:12, 14:12\r\n<\/pre>\n<p>Building from disk after a restart demonstrates that there is a difference of 8 real seconds during which all of the relevant files are read into the OS&#8217;s file cache. The run without ccache demonstrates that using ccache with no prior cache incurs a nearly 30-second penalty as the cache must be initialized.<\/p>\n<p>And since I know you&#8217;re wondering, here&#8217;s what happens when I wipe the ccache and just let this thing rip with &#8216;make -j5&#8217; multithreaded build:<\/p>\n<pre>\r\nOn disk, with ccache, multithreaded:\r\nrun 1: 6:51, 24:12\r\nrun 2: 1:05, 2:18\r\nrun 3: 0:54, 1:41\r\nrun 4: 0:54, 1:40\r\n<\/pre>\n<p>I did 4 runs this time because I wanted to see if I saw a 4th set of numbers consistent with the 3rd.<\/p>\n<p>I know these results may elicit a big <strong>&#8220;duh!&#8221;<\/strong> from many readers, but I still wanted to prove it to myself.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Can I speed up FATE by using my own RAM disk?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101,218],"tags":[198],"class_list":["post-1558","post","type-post","status-publish","format-standard","hentry","category-fate-server","category-science-projects","tag-ram-disk"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Can I speed up FATE by using my own RAM disk?\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Multimedia Mike\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"RAM Disk Experiment | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta property=\"og:description\" content=\"Can I speed up FATE by using my own RAM disk?\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2009-06-02T03:40:01+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2010-05-18T04:57:05+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"RAM Disk Experiment | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Can I speed up FATE by using my own RAM disk?\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ram-disk-experiment\\\/#article\",\"name\":\"RAM Disk Experiment | Breaking Eggs And Making Omelettes\",\"headline\":\"RAM Disk Experiment\",\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"},\"datePublished\":\"2009-06-01T20:40:01-07:00\",\"dateModified\":\"2010-05-17T21:57:05-07:00\",\"inLanguage\":\"en-US\",\"commentCount\":5,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ram-disk-experiment\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ram-disk-experiment\\\/#webpage\"},\"articleSection\":\"FATE Server, Science Projects, ram disk\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ram-disk-experiment\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/fate-server\\\/#listItem\",\"name\":\"FATE Server\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/fate-server\\\/#listItem\",\"position\":2,\"name\":\"FATE Server\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/fate-server\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ram-disk-experiment\\\/#listItem\",\"name\":\"RAM Disk Experiment\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ram-disk-experiment\\\/#listItem\",\"position\":3,\"name\":\"RAM Disk Experiment\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/fate-server\\\/#listItem\",\"name\":\"FATE Server\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/\",\"name\":\"Multimedia Mike\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ram-disk-experiment\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Multimedia Mike\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ram-disk-experiment\\\/#webpage\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ram-disk-experiment\\\/\",\"name\":\"RAM Disk Experiment | Breaking Eggs And Making Omelettes\",\"description\":\"Can I speed up FATE by using my own RAM disk?\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ram-disk-experiment\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"datePublished\":\"2009-06-01T20:40:01-07:00\",\"dateModified\":\"2010-05-17T21:57:05-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"RAM Disk Experiment | Breaking Eggs And Making Omelettes","description":"Can I speed up FATE by using my own RAM disk?","canonical_url":"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/#article","name":"RAM Disk Experiment | Breaking Eggs And Making Omelettes","headline":"RAM Disk Experiment","author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"},"datePublished":"2009-06-01T20:40:01-07:00","dateModified":"2010-05-17T21:57:05-07:00","inLanguage":"en-US","commentCount":5,"mainEntityOfPage":{"@id":"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/#webpage"},"isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/#webpage"},"articleSection":"FATE Server, Science Projects, ram disk"},{"@type":"BreadcrumbList","@id":"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","position":1,"name":"Home","item":"https:\/\/multimedia.cx\/eggs","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/fate-server\/#listItem","name":"FATE Server"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/fate-server\/#listItem","position":2,"name":"FATE Server","item":"https:\/\/multimedia.cx\/eggs\/category\/fate-server\/","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/#listItem","name":"RAM Disk Experiment"},"previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/#listItem","position":3,"name":"RAM Disk Experiment","previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/fate-server\/#listItem","name":"FATE Server"}}]},{"@type":"Organization","@id":"https:\/\/multimedia.cx\/eggs\/#organization","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","url":"https:\/\/multimedia.cx\/eggs\/"},{"@type":"Person","@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author","url":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/","name":"Multimedia Mike","image":{"@type":"ImageObject","@id":"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Multimedia Mike"}},{"@type":"WebPage","@id":"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/#webpage","url":"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/","name":"RAM Disk Experiment | Breaking Eggs And Making Omelettes","description":"Can I speed up FATE by using my own RAM disk?","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/#website"},"breadcrumb":{"@id":"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/#breadcrumblist"},"author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"creator":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"datePublished":"2009-06-01T20:40:01-07:00","dateModified":"2010-05-17T21:57:05-07:00"},{"@type":"WebSite","@id":"https:\/\/multimedia.cx\/eggs\/#website","url":"https:\/\/multimedia.cx\/eggs\/","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","inLanguage":"en-US","publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"}}]},"og:locale":"en_US","og:site_name":"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering","og:type":"article","og:title":"RAM Disk Experiment | Breaking Eggs And Making Omelettes","og:description":"Can I speed up FATE by using my own RAM disk?","og:url":"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/","article:published_time":"2009-06-02T03:40:01+00:00","article:modified_time":"2010-05-18T04:57:05+00:00","twitter:card":"summary","twitter:title":"RAM Disk Experiment | Breaking Eggs And Making Omelettes","twitter:description":"Can I speed up FATE by using my own RAM disk?"},"aioseo_meta_data":{"post_id":"1558","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-31 22:02:33","updated":"2025-12-31 19:11:03","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\/category\/fate-server\/\" title=\"FATE Server\">FATE Server<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tRAM Disk Experiment\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/multimedia.cx\/eggs"},{"label":"FATE Server","link":"https:\/\/multimedia.cx\/eggs\/category\/fate-server\/"},{"label":"RAM Disk Experiment","link":"https:\/\/multimedia.cx\/eggs\/ram-disk-experiment\/"}],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=1558"}],"version-history":[{"count":11,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1558\/revisions"}],"predecessor-version":[{"id":2478,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1558\/revisions\/2478"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=1558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=1558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=1558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}