Comment 24 for bug 2065180

Revision history for this message
Viraniac (viraniac) wrote : Re: [Bug 2065180] Re: performance regression in dracut-install 060

Tried on VIM4. It took 30s to build the initrd which is definitely way
better than 1m30s it was taking before. It still doesn't beat the 20s time
that is achievable just by reverting 131822e and 3de4c73 commits.

On Fri, Jun 14, 2024 at 8:01 PM Timo Aaltonen <email address hidden>
wrote:

> Hello Viraniac, or anyone else affected,
>
> Accepted dracut into noble-proposed. The package will build now and be
> available at
> https://launchpad.net/ubuntu/+source/dracut/060+5-1ubuntu3.1 in a few
> hours, and then in the -proposed repository.
>
> Please help us by testing this new package. See
> https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
> to enable and use -proposed. Your feedback will aid us getting this
> update out to other Ubuntu users.
>
> If this package fixes the bug for you, please add a comment to this bug,
> mentioning the version of the package you tested, what testing has been
> performed on the package and change the tag from verification-needed-
> noble to verification-done-noble. If it does not fix the bug for you,
> please add a comment stating that, and change the tag to verification-
> failed-noble. In either case, without details of your testing we will
> not be able to proceed.
>
> Further information regarding the verification process can be found at
> https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
> advance for helping!
>
> N.B. The updated package will be released to -updates after the bug(s)
> fixed by this package have been verified and the package has been in
> -proposed for a minimum of 7 days.
>
> ** Changed in: dracut (Ubuntu Noble)
> Status: New => Fix Committed
>
> ** Tags added: verification-needed verification-needed-noble
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/2065180
>
> Title:
> performance regression in dracut-install 060
>
> Status in Dracut:
> New
> Status in cryptsetup package in Ubuntu:
> Fix Released
> Status in dracut package in Ubuntu:
> Fix Released
> Status in initramfs-tools package in Ubuntu:
> Fix Released
> Status in lvm2 package in Ubuntu:
> Fix Released
> Status in miniramfs package in Ubuntu:
> Fix Released
> Status in thin-provisioning-tools package in Ubuntu:
> Fix Released
> Status in cryptsetup source package in Noble:
> New
> Status in dracut source package in Noble:
> Fix Committed
> Status in initramfs-tools source package in Noble:
> New
> Status in lvm2 source package in Noble:
> New
> Status in miniramfs source package in Noble:
> New
> Status in thin-provisioning-tools source package in Noble:
> New
>
> Bug description:
> [ Impact ]
>
> When compared to Ubuntu 23.10, creating intramfs files with update-
> initramfs takes 2 to 5 times more time on ARM devices.
>
> IIUC, dracut-install usage was added to initramfs-tools to speed up
> the process. But now its way slower. Even running update-initramfs on
> jammy, which doesn't use dracut-install, is way faster then the time
> taken on Noble.
>
> first bad commit -
>
> https://github.com/dracutdevs/dracut/commit/3de4c7313260fb600507c9b87f780390b874c870
>
> Updating the initrd on a Raspberry Pi Zero 2W on Ubuntu 24.04 (noble)
> with initramfs-tools 0.142ubuntu25.1 takes over six minutes:
>
> ```
> bdrung@zero2w:~$ sudo hyperfine --warmup 1 -r 10 "update-initramfs -u"
> Benchmark 1: update-initramfs -u
> Time (mean ± σ): 402.751 s ± 5.592 s [User: 166.316 s, System:
> 228.909 s]
> Range (min … max): 394.380 s … 411.445 s 10 runs
> ```
>
> [ Test Plan ]
>
> 1. Measure `update-initramfs -u` before the update.
> 2. Log the content of the initrd before the update: `lsinitramfs
> /boot/initrd.img`
> 3. update dracut-install / initramfs-tools-core
> 4. Measure `update-initramfs -u`. It should be faster (the performance
> improvements on amd64 should be very small and might be within the
> measurement uncertainty).
> 5. Check with lsinitramfs that the content of the newly generated initrd
> hasn't changed.
>
> [ Where problems could occur ]
>
> The code that is responsible for including the kernel modules into the
> initrd is touched. Negative consequences could be that some needed
> kernel modules will not be included any more (should be covered by the
> test case) or that building new initrds will fail.
>
> The initramfs-tools fix changes how manual_add_modules behaves.
> `manual_add_modules` does not copy kernel modules, but queues them for
> being copied when the newly added function `apply_add_modules` is
> called.
>
> I checked all instances of calls to `manual_add_modules` for possible
> regressions (see comment #15). Only miniramfs needs to be adjusted to
> also call `apply_add_modules`. But this change could break consumers
> of the `manual_add_modules` function that are outside of the Ubuntu
> archive. I googled for `apply_add_modules` but found no public outside
> users.
>
> [ Other Info ]
>
> $ lsb_release -rd
> No LSB modules are available.
> Description: Ubuntu 24.04 LTS
> Release: 24.04
>
> $ apt-cache policy dracut-install
> dracut-install:
> Installed: 060+5-1ubuntu3
> Candidate: 060+5-1ubuntu3
> Version table:
> *** 060+5-1ubuntu3 500
> 500 http://ports.ubuntu.com/ubuntu-ports noble/main arm64
> Packages
> 100 /var/lib/dpkg/status
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dracut/+bug/2065180/+subscriptions
>
>