performance regression in dracut-install 060
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Dracut |
New
|
Unknown
|
|||
cryptsetup (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Noble |
New
|
Undecided
|
Unassigned | ||
dracut (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Noble |
Fix Committed
|
Undecided
|
Unassigned | ||
initramfs-tools (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Noble |
New
|
Undecided
|
Unassigned | ||
lvm2 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Noble |
New
|
Undecided
|
Unassigned | ||
miniramfs (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Noble |
New
|
Undecided
|
Unassigned | ||
thin-provisioning-tools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Noble |
New
|
Undecided
|
Unassigned |
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:/
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-
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_
I checked all instances of calls to `manual_
[ 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://
100 /var/lib/
description: | updated |
summary: |
- performance regression in dracut-install + performance regression in dracut-install 060 |
Changed in dracut: | |
status: | Unknown → New |
description: | updated |
Changed in dracut (Ubuntu): | |
importance: | Undecided → High |
status: | New → Fix Committed |
Changed in miniramfs (Ubuntu): | |
importance: | Undecided → High |
status: | New → Fix Committed |
Changed in initramfs-tools (Ubuntu): | |
importance: | Undecided → High |
status: | New → Fix Committed |
dracut-install is used in initramfs-tools to speed up the build time.
I tested `time update-initramfs -u` in chroots on my amd64 laptop. Results there:
* jammy: 15.585s
* mantic: 5.925s
* noble: 6.466s
So noble is a bit slower than mantic on my hardware. Is this slowdown hardware related or are all ARM devices affected? Can you provide some benchmark results and tested hardware results?