{"id":1314,"date":"2026-10-06T23:07:07","date_gmt":"2026-10-06T23:07:07","guid":{"rendered":"https:\/\/virtualserversvps.com\/blog\/?p=1314"},"modified":"2026-10-09T22:02:27","modified_gmt":"2026-10-09T22:02:27","slug":"reducing-vps-boot-time-systemd-analyze","status":"publish","type":"post","link":"https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/","title":{"rendered":"Cut VPS Boot Time to Under 10 Seconds: A systemd-analyze Workflow"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A reboot that takes 90 seconds is 90 seconds of downtime and 90 seconds of a customer watching a spinner. On a typical 2 vCPU cloud instance, a stock Debian or Ubuntu image frequently needs 45-70 seconds to reach a usable login prompt, and most of that time is spent in services nobody asked for. This walkthrough uses <code>systemd-analyze<\/code> to find the slow units, then removes or reorders them for measurable gains.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Establish a Baseline Before Touching Anything<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Never optimize blind. Capture three reboots so you can discount network-dependent variance, then record the numbers.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for i in 1 2 3; do\n  reboot\ndone\n# after each boot:\nsystemd-analyze\nsystemd-analyze blame | head -25\nsystemd-analyze critical-chain\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On a representative test box (2 vCPU, 2 GB RAM, NVMe backing store, Ubuntu 22.04) the baseline looked like this: firmware 0.9s, loader 0.3s, kernel 2.1s, userspace 41.2s, for a total of <strong>44.5s<\/strong>. Userspace is almost always where the win lives.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Unit<\/th><th>Baseline time<\/th><th>After tuning<\/th><\/tr><\/thead><tbody><tr><td>cloud-init.service<\/td><td>11.8s<\/td><td>2.0s (network-wait)<\/td><\/tr><tr><td>systemd-networkd-wait-online<\/td><td>9.4s<\/td><td>0s (masked)<\/td><\/tr><tr><td>apt-daily.service<\/td><td>4.6s<\/td><td>0s (masked)<\/td><\/tr><tr><td>snapd.seeded.service<\/td><td>3.5s<\/td><td>3.4s (kept)<\/td><\/tr><tr><td>user@1000.service<\/td><td>2.9s<\/td><td>1.2s<\/td><\/tr><tr><td><strong>Total userspace<\/strong><\/td><td><strong>41.2s<\/strong><\/td><td><strong>7.9s<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">The Usual Suspects on Cloud Images<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>systemd-networkd-wait-online<\/strong> blocks the boot path until every interface is configured. It returns success after 120s by default even if a NIC never comes up, which silently eats two minutes on misconfigured hosts. Mask it unless something genuinely depends on being online during boot.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl mask systemd-networkd-wait-online.service<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>cloud-init<\/strong> is the other big cost. If you bake your image or use provisioning scripts you trust, disable the network stage and keep only the local datasource. Edit <code>\/etc\/cloud\/cloud.cfg.d\/99-fastboot.cfg<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>datasource_list: [ NoCloud ]\nnetwork: {config: disabled}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>apt-daily<\/strong> and <strong>apt-daily-upgrade<\/strong> already run on timers, but their <code>.service<\/code> units still land in the boot transaction. Mask them so updates happen from the timer, not the boot path. If you manage patching through a scheduled maintenance window (a common pattern on a <a href=\"https:\/\/virtualserversvps.com\/managed-vs-unmanaged\">managed versus unmanaged<\/a> server), this is safe.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Pruning vs. Masking: Know the Difference<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>systemctl disable<\/code> removes the symlink but leaves the unit available. <code>systemctl mask<\/code> points the unit at <code>\/dev\/null<\/code>, so nothing can start it, including another unit&#8217;s dependency graph. Use <code>mask<\/code> for things you are certain you never want, and <code>disable<\/code> when a socket or timer may still activate it later. Always check what depends on a unit first:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl list-dependencies --reverse apt-daily.service<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Shave the Kernel Phase Too<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Kernel time rarely drops below ~2s, but you can trim it. Removing unused modules and firmware via <code>initramfs-tools<\/code> blacklists, and switching the console to <code>quiet<\/code>, saves a few hundred milliseconds. On bare-metal or KVM with many NICs, the network driver probe is often the largest kernel-phase cost; narrowing <code>\/etc\/modules<\/code> helps.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verifying the Result<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Reboot three more times and compare <code>systemd-analyze<\/code> output. A realistic target for a small web or API instance is <strong>sub-10s userspace and sub-13s total<\/strong>. If your boot is dominated by a single vendor agent you cannot remove, check whether it supports an async or socket-activated mode before accepting the cost. Boards that stay high due to disk contention may instead need I\/O tuning, which pairs naturally with the choices covered in <a href=\"https:\/\/virtualserversvps.com\/cloud-vps-benefits\">the cloud VPS benefits overview<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># final check: produce a per-phase SVG and diff two boots\nsystemd-analyze plot &gt; \/tmp\/boot.svg\nsystemd-analyze --no-pager time<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Treat boot time as a tracked metric, not a one-time cleanup. Re-run <code>blame<\/code> after every major package upgrade, because a new agent dropped in by a provider is the most common cause of a boot regression.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>A practical walkthrough of systemd-analyze blame and critical-chain: how to find the units that actually gate boot time and the fixes that cut it down.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":1,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1314","post","type-post","status-publish","format-standard","hentry","category-vps-guides-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Cut VPS Boot Time to Under 10 Seconds: A systemd-analyze Workflow - Virtual Servers VPS Blog<\/title>\n<meta name=\"description\" content=\"A practical walkthrough of systemd-analyze blame and critical-chain: how to find the units that actually gate boot time and the fixes that cut it down.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cut VPS Boot Time to Under 10 Seconds: A systemd-analyze Workflow\" \/>\n<meta property=\"og:description\" content=\"Cut VPS Boot Time to Under 10 Seconds: A systemd-analyze Workflow\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual Servers VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-06T23:07:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-09T22:02:27+00:00\" \/>\n<meta name=\"author\" content=\"Virtual-Servers-Vps-Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Virtual-Servers-Vps-Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/\",\"name\":\"Cut VPS Boot Time to Under 10 Seconds: A systemd-analyze Workflow - Virtual Servers VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\"},\"datePublished\":\"2026-10-06T23:07:07+00:00\",\"dateModified\":\"2026-10-09T22:02:27+00:00\",\"author\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\"},\"description\":\"A practical walkthrough of systemd-analyze blame and critical-chain: how to find the units that actually gate boot time and the fixes that cut it down.\",\"breadcrumb\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/virtualserversvps.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cut VPS Boot Time to Under 10 Seconds: A systemd-analyze Workflow\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/\",\"name\":\"Virtual Servers VPS Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\",\"name\":\"Virtual-Servers-Vps-Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"caption\":\"Virtual-Servers-Vps-Editor\"},\"sameAs\":[\"https:\/\/virtualserversvps.com\/blog\"],\"url\":\"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Cut VPS Boot Time to Under 10 Seconds: A systemd-analyze Workflow - Virtual Servers VPS Blog","description":"A practical walkthrough of systemd-analyze blame and critical-chain: how to find the units that actually gate boot time and the fixes that cut it down.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/","og_locale":"en_US","og_type":"article","og_title":"Cut VPS Boot Time to Under 10 Seconds: A systemd-analyze Workflow","og_description":"Cut VPS Boot Time to Under 10 Seconds: A systemd-analyze Workflow","og_url":"https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/","og_site_name":"Virtual Servers VPS Blog","article_published_time":"2026-10-06T23:07:07+00:00","article_modified_time":"2026-10-09T22:02:27+00:00","author":"Virtual-Servers-Vps-Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Virtual-Servers-Vps-Editor","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/","url":"https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/","name":"Cut VPS Boot Time to Under 10 Seconds: A systemd-analyze Workflow - Virtual Servers VPS Blog","isPartOf":{"@id":"https:\/\/virtualserversvps.com\/blog\/#website"},"datePublished":"2026-10-06T23:07:07+00:00","dateModified":"2026-10-09T22:02:27+00:00","author":{"@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0"},"description":"A practical walkthrough of systemd-analyze blame and critical-chain: how to find the units that actually gate boot time and the fixes that cut it down.","breadcrumb":{"@id":"https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/virtualserversvps.com\/blog\/reducing-vps-boot-time-systemd-analyze\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/virtualserversvps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Cut VPS Boot Time to Under 10 Seconds: A systemd-analyze Workflow"}]},{"@type":"WebSite","@id":"https:\/\/virtualserversvps.com\/blog\/#website","url":"https:\/\/virtualserversvps.com\/blog\/","name":"Virtual Servers VPS Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0","name":"Virtual-Servers-Vps-Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","caption":"Virtual-Servers-Vps-Editor"},"sameAs":["https:\/\/virtualserversvps.com\/blog"],"url":"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/"}]}},"_links":{"self":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/1314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/comments?post=1314"}],"version-history":[{"count":5,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/1314\/revisions"}],"predecessor-version":[{"id":1344,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/1314\/revisions\/1344"}],"wp:attachment":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/media?parent=1314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/categories?post=1314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/tags?post=1314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}