From 6fdd32834f5fe98e4e4c3b745eff177735c5f990 Mon Sep 17 00:00:00 2001 From: Job79 Date: Tue, 17 Nov 2026 20:30:10 +0100 Subject: [PATCH] perf: raise systemd's mount rate limit at boot systemd handles mount changes at most 5 times per second and holds back mount jobs once it hits that. At boot this delayed mounting / in the initrd and /var by up to a second each. Boot goes from ~4.7s to ~2.4s. Co-Authored-By: Claude Opus 5.5 --- mkosi.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mkosi.conf b/mkosi.conf index 8fe57e0..2e385cd 100644 --- a/mkosi.conf +++ b/mkosi.conf @@ -81,6 +81,10 @@ UnifiedKernelImageFormat=%i_%v # so the host can take it back through virtio-balloon # free page reporting. The watermarks make it run # however much memory is free. +# - SYSTEMD_DEFAULT_MOUNT_ systemd handles mount changes at most 5 times per +# RATE_LIMIT_BURST= second and holds back mounts once it hits that. At +# boot that delays / and /var by up to a second each. +# The kernel passes this to systemd as environment. KernelCommandLine= console=tty0 console=ttyS0,115200n8 @@ -92,6 +96,7 @@ KernelCommandLine= damon_reclaim.wmarks_high=1000 damon_reclaim.wmarks_mid=999 damon_reclaim.wmarks_low=0 + SYSTEMD_DEFAULT_MOUNT_RATE_LIMIT_BURST=50 # The initrd only needs to find and mount the disks of a VM. KernelInitrdModules= virtio_blk