{"id":1966,"date":"2009-11-19T22:18:15","date_gmt":"2009-11-20T05:18:15","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=1966"},"modified":"2009-11-20T10:28:39","modified_gmt":"2009-11-20T17:28:39","slug":"ffmpeg-and-multiple-build-threads","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/ffmpeg-and-multiple-build-threads\/","title":{"rendered":"FFmpeg and Multiple Build Threads"},"content":{"rendered":"<p>I got bored today and decided to empirically determine how much <a href=\"http:\/\/ffmpeg.org\/\">FFmpeg<\/a> compilation time can be improved by using multiple build threads, i.e., &#8216;make -jN&#8217; where N &gt; 1. I also wanted to see if the old rule of &#8220;number of CPUs plus 1&#8221; makes any worthwhile difference. The thinking behind that latter rule is that there should always be one more build job queued up ready to be placed on the CPU if one of the current build jobs has to access the disk. I think I first learned this from reading the <a href=\"http:\/\/gentoo.org\/\">Gentoo<\/a> manuals. I didn&#8217;t find that it made a significant improvement. But then, <a href=\"http:\/\/funroll-loops.info\/\">Gentoo is for ricers<\/a>.<\/p>\n<p><center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/11\/ffmpeg-compile-graph-2xcore2duo.png\" alt=\"FFmpeg being built with multiple threads on a 2x Core 2 Duo\" title=\"FFmpeg being built with multiple threads on a 2x Core 2 Duo\" width=\"317\" height=\"259\" class=\"aligncenter size-full wp-image-1970\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/11\/ffmpeg-compile-graph-2xcore2duo.png 317w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/11\/ffmpeg-compile-graph-2xcore2duo-300x245.png 300w\" sizes=\"auto, (max-width: 317px) 100vw, 317px\" \/><br \/>\n<\/center><\/p>\n<p><center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/11\/ffmpeg-compile-graph-core2duo.png\" alt=\"FFmpeg being built with multiple threads on a Core 2 Duo\" title=\"FFmpeg being built with multiple threads on a Core 2 Duo\" width=\"288\" height=\"254\" class=\"aligncenter size-full wp-image-1979\" \/><br \/>\n<\/center><\/p>\n<p><center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/11\/ffmpeg-compile-graph-2xHTatom.png\" alt=\"FFmpeg being built with multiple threads on a dual-core hyperthreaded Atom\" title=\"FFmpeg being built with multiple threads on a dual-core hyperthreaded Atom\" width=\"285\" height=\"252\" class=\"aligncenter size-full wp-image-1975\" \/><br \/>\n<\/center><\/p>\n<p>I think the most interesting thing to observe about these graphs is the CPU time (the amount of time the build jobs are actually spending on the combined CPUs). The number is roughly steady for the Core 2 CPUs regardless of number of jobs while the Hyperthreaded Atom CPU sees a marked increase in total CPU time. Is that an artifact of Hyperthreading? Or maybe I just didn&#8217;t put together a stable testing methodology.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How do multiple build threads imrpove FFmpeg building?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"class_list":["post-1966","post","type-post","status-publish","format-standard","hentry","category-programming"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"How do multiple build threads imrpove FFmpeg building?\" \/>\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\/ffmpeg-and-multiple-build-threads\/\" \/>\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=\"FFmpeg and Multiple Build Threads | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta property=\"og:description\" content=\"How do multiple build threads imrpove FFmpeg building?\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/multimedia.cx\/eggs\/ffmpeg-and-multiple-build-threads\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2009-11-20T05:18:15+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2009-11-20T17:28:39+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"FFmpeg and Multiple Build Threads | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta name=\"twitter:description\" content=\"How do multiple build threads imrpove FFmpeg building?\" \/>\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\\\/ffmpeg-and-multiple-build-threads\\\/#article\",\"name\":\"FFmpeg and Multiple Build Threads | Breaking Eggs And Making Omelettes\",\"headline\":\"FFmpeg and Multiple Build Threads\",\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/wp-content\\\/uploads\\\/2009\\\/11\\\/ffmpeg-compile-graph-2xcore2duo.png\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ffmpeg-and-multiple-build-threads\\\/#articleImage\",\"width\":317,\"height\":259},\"datePublished\":\"2009-11-19T22:18:15-08:00\",\"dateModified\":\"2009-11-20T10:28:39-08:00\",\"inLanguage\":\"en-US\",\"commentCount\":10,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ffmpeg-and-multiple-build-threads\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ffmpeg-and-multiple-build-threads\\\/#webpage\"},\"articleSection\":\"Programming\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ffmpeg-and-multiple-build-threads\\\/#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\\\/programming\\\/#listItem\",\"name\":\"Programming\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/programming\\\/#listItem\",\"position\":2,\"name\":\"Programming\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/programming\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ffmpeg-and-multiple-build-threads\\\/#listItem\",\"name\":\"FFmpeg and Multiple Build Threads\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ffmpeg-and-multiple-build-threads\\\/#listItem\",\"position\":3,\"name\":\"FFmpeg and Multiple Build Threads\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/programming\\\/#listItem\",\"name\":\"Programming\"}}]},{\"@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\\\/ffmpeg-and-multiple-build-threads\\\/#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\\\/ffmpeg-and-multiple-build-threads\\\/#webpage\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ffmpeg-and-multiple-build-threads\\\/\",\"name\":\"FFmpeg and Multiple Build Threads | Breaking Eggs And Making Omelettes\",\"description\":\"How do multiple build threads imrpove FFmpeg building?\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/ffmpeg-and-multiple-build-threads\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"datePublished\":\"2009-11-19T22:18:15-08:00\",\"dateModified\":\"2009-11-20T10:28:39-08: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":"FFmpeg and Multiple Build Threads | Breaking Eggs And Making Omelettes","description":"How do multiple build threads imrpove FFmpeg building?","canonical_url":"https:\/\/multimedia.cx\/eggs\/ffmpeg-and-multiple-build-threads\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/multimedia.cx\/eggs\/ffmpeg-and-multiple-build-threads\/#article","name":"FFmpeg and Multiple Build Threads | Breaking Eggs And Making Omelettes","headline":"FFmpeg and Multiple Build Threads","author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/11\/ffmpeg-compile-graph-2xcore2duo.png","@id":"https:\/\/multimedia.cx\/eggs\/ffmpeg-and-multiple-build-threads\/#articleImage","width":317,"height":259},"datePublished":"2009-11-19T22:18:15-08:00","dateModified":"2009-11-20T10:28:39-08:00","inLanguage":"en-US","commentCount":10,"mainEntityOfPage":{"@id":"https:\/\/multimedia.cx\/eggs\/ffmpeg-and-multiple-build-threads\/#webpage"},"isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/ffmpeg-and-multiple-build-threads\/#webpage"},"articleSection":"Programming"},{"@type":"BreadcrumbList","@id":"https:\/\/multimedia.cx\/eggs\/ffmpeg-and-multiple-build-threads\/#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\/programming\/#listItem","name":"Programming"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/programming\/#listItem","position":2,"name":"Programming","item":"https:\/\/multimedia.cx\/eggs\/category\/programming\/","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/ffmpeg-and-multiple-build-threads\/#listItem","name":"FFmpeg and Multiple Build Threads"},"previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/ffmpeg-and-multiple-build-threads\/#listItem","position":3,"name":"FFmpeg and Multiple Build Threads","previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/programming\/#listItem","name":"Programming"}}]},{"@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\/ffmpeg-and-multiple-build-threads\/#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\/ffmpeg-and-multiple-build-threads\/#webpage","url":"https:\/\/multimedia.cx\/eggs\/ffmpeg-and-multiple-build-threads\/","name":"FFmpeg and Multiple Build Threads | Breaking Eggs And Making Omelettes","description":"How do multiple build threads imrpove FFmpeg building?","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/#website"},"breadcrumb":{"@id":"https:\/\/multimedia.cx\/eggs\/ffmpeg-and-multiple-build-threads\/#breadcrumblist"},"author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"creator":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"datePublished":"2009-11-19T22:18:15-08:00","dateModified":"2009-11-20T10:28:39-08: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":"FFmpeg and Multiple Build Threads | Breaking Eggs And Making Omelettes","og:description":"How do multiple build threads imrpove FFmpeg building?","og:url":"https:\/\/multimedia.cx\/eggs\/ffmpeg-and-multiple-build-threads\/","article:published_time":"2009-11-20T05:18:15+00:00","article:modified_time":"2009-11-20T17:28:39+00:00","twitter:card":"summary","twitter:title":"FFmpeg and Multiple Build Threads | Breaking Eggs And Making Omelettes","twitter:description":"How do multiple build threads imrpove FFmpeg building?"},"aioseo_meta_data":{"post_id":"1966","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:01:17","updated":"2025-12-31 19:16:40","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\/programming\/\" title=\"Programming\">Programming<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tFFmpeg and Multiple Build Threads\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/multimedia.cx\/eggs"},{"label":"Programming","link":"https:\/\/multimedia.cx\/eggs\/category\/programming\/"},{"label":"FFmpeg and Multiple Build Threads","link":"https:\/\/multimedia.cx\/eggs\/ffmpeg-and-multiple-build-threads\/"}],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1966","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=1966"}],"version-history":[{"count":12,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1966\/revisions"}],"predecessor-version":[{"id":1983,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1966\/revisions\/1983"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=1966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=1966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=1966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}