Add MODULES=dep initramfs configuration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-images |
Invalid
|
Undecided
|
Unassigned | ||
cloud-init (Ubuntu) |
Won't Fix
|
Wishlist
|
Unassigned |
Bug Description
During investigation of low-hanging fruit for improving boot speed, we noticed that we can shave off a large portion of kernel boot time with:
echo 'MODULES=dep' | sudo tee /etc/initramfs-
Before:
$ systemd-analyze
Startup finished in 1.435s (kernel) + 1.601s (userspace) = 2.936s
-rw-r--r-- 1 root root 7.4M Jun 15 09:32 /boot/initrd.
After:
$ systemd-analyze
Startup finished in 762ms (kernel) + 1.706s (userspace) = 2.469s
-rw-r--r-- 1 root root 4.2M Jun 15 09:34 initrd.
We don't want to use MODULES=dep by default on real iron (server, desktop) to keep portability of root file systems (plugging them into different machines, changing hardware, etc.). But this is not relevant for virtual environments like QEMU or Hyper-V, so we can remove all these unused drivers from the initrd there. This saves time on unpacking the initrd and also avoids some useless hw probing.
So we propose that the cloud image build system should add this file.
tags: | added: rls-kk-incoming |
Adding an Ubuntu task so that this appears on https:/ /bugs.launchpad .net/ubuntu/ +bugs?field. tag=bootspeed .