Hello Timo.

Sure, I just tested it and I get relatively good Results.

See my Conclusion below. Maybe some extra discussions needed about the
`--noarp` NOT being included in the patch, which causes the Boot time to
go from approx. 22s (with `--noarp`) to approx. 28s (without `-noarp`,
i.e. the `noble-proposed` Version of the Package).

# Test Procedure & Log

# Pin noble-proposed Packages with Lower Priority by Default
create /etc/apt/preferences.d/proposed-updates if it doesn't exist yet
###########################################################################
# Configure apt to allow selective installs of packages from proposed
Package: *
Pin: release a=noble-proposed
Pin-Priority: 400
###########################################################################

# Pin Initramfs Packages with Maximum Priority
create /etc/apt/preferences.d/initramfs-proposed

###########################################################################
Package: initramfs-tools initramfs-tools-bin initramfs-tools-core 
initramfs-tools-bin-dbgsym
Pin: release a=noble-proposed
Pin-Priority: 1000
###########################################################################

# Update Sources
apt update

# View Pinning Policy
apt policy initramfs-tools

# Priority is higher on noble-proposed, so that's good
# This means that a Package Upgrade will be performed
```
initramfs-tools:
  Installed: 0.142ubuntu25
  Candidate: 0.142ubuntu25.1
  Version table:
     0.142ubuntu25.1 1000
        400 http://archive.ubuntu.com/ubuntu noble-proposed/main amd64 Packages
 *** 0.142ubuntu25 500
        500 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages
        100 /var/lib/dpkg/status
     0.142ubuntu15.1 1
          1 http://archive.ubuntu.com/ubuntu mantic-updates/main amd64 Packages
     0.142ubuntu15 1
          1 http://archive.ubuntu.com/ubuntu mantic/main amd64 Packages
     0.142 1
          1 http://ftp.dk.debian.org/debian bookworm/main amd64 Packages
          1 http://ftp.dk.debian.org/debian testing/main amd64 Packages
          1 http://ftp.dk.debian.org/debian testing/main i386 Packages
```

# Update Repositories
apt update

# Print Current Date
date
2024-05-10T21:59:53 CEST

# Before Upgrade
ls -l /usr/share/initramfs-tools/scripts/functions 
-rw-r--r-- 1 root root 23227 May  9 09:43 
/usr/share/initramfs-tools/scripts/functions

# Upgrade Package
apt dist-upgrade

# After Upgrade
ls -l /usr/share/initramfs-tools/scripts/functions 
-rw-r--r-- 1 root root 22383 May 10 15:03 
/usr/share/initramfs-tools/scripts/functions


# After Upgrade - Excerpt of the File Contents
```
                case ${IP} in
                none|done|off)
                        # Do nothing
                        IP="done"
                        ;;
                ""|on|any|dhcp|bootp|both)
                        dhcpcd -1KL -t $ROUNDTTT -4 ${DEVICE:+"${DEVICE}"}
                        ;;
                *)
                        ipconfig -t ${ROUNDTTT} -d "$IP"
                        ;;
                esac

                case ${IP6} in
                ""|none|done|off)
                        # Do nothing
                        IP6="done"
                        ;;
                *)
                        # check the content of IP6 and if it is not on/dhcp/any 
use it as
                        # a device name. Otherwise all devices will be tried 
(unless
                        # BOOTIF was set, see above).
                        case "${IP6}" in
                        on|dhcp|any)
                                ;;
                        *)
                                DEVICE6="$IP6" ;;
                        esac

                        dhcpcd -1KL -t $ROUNDTTT -6 ${DEVICE6:+"${DEVICE6}"}
                        ;;
                esac


```

This matches what I had during my initial testing:
```
dhcpcd -1K --noipv4ll -t $ROUNDTTT -4 ${DEVICE:+"${DEVICE}
```

However it does NOT include the `--noarp` I had during the latest tests (the 
advantage gained by `--noarp` is probably not huge, that's probably why it 
wasn't included, using it probably also has some drawbacks).
I could see a "good" result using `--noarp` though. See comments by bdrung: 
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2065037/comments/49.

# Final Remarks
The impact of the lack of `--noarp` will be evaluated during the test.
The comparison will be done against 
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2065037/comments/54
 on the Main Workstation with Intel Xeon E3-1231 v3 CPU, with the same 
"Benchmark" to compare "Apples against Apples" (minus the `--noarp` part).

# Reboot
update-initramfs -k all -u; update-grub; update-initramfs -k all; update-grub; 
reboot

# Save dmesg
dmesg

# Save initramfs debug log
cat /run/initramfs/initramfs.debug

# Save systemd-analze
systemd-analyze
Startup finished in 28.632s (kernel) + 54.452s (userspace) = 1min 23.084s 
graphical.target reached after 54.437s in userspace.

# Conclusion
The boot time is higher than the test 
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2065037/comments/54
 using `--noarp`.

systemd-analyze states 22.5 s (see comment #54 with `--noarp`) versus
the 28.6 s obtained during testing of the patch currently in `noble-
proposed` (`initramfs-tools 0.142ubuntu25.1`).

Whether that difference is significant or not can be debated.

Personally, I'm already happy that we went from 300s (previous DHCPCD
BUG Report: https://bugs.launchpad.net/ubuntu/+source/initramfs-
tools/+bug/2064926) to 45s (beginning of this BUG Report) to now approx.
28 s.

This matches what was observed on the Secondary Laptop WITHOUT `--noarp`
at https://bugs.launchpad.net/ubuntu/+source/initramfs-
tools/+bug/2065037/comments/46 (and based on my testing there is NOT a
huge difference in terms of initramfs waiting for Networking between the
2 Systems, i.e. NOT much CPU dependent).

# Further Testing required ?
In case you need further testing, I can also try to compare on the Secondary 
Laptop, where we have more recorded data in this BUG Report (v1, ..., v9, 
extras, etc).

But it would probably be better that also somebody else testes this.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2065037

Title:
  dhcpcd is called before interfaces have carrier causing a 29 seconds
  boot delay

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2065037/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to