Skip to content

Commit

Permalink
Update 1st Debian comparison
Browse files Browse the repository at this point in the history
While investigating the boot time difference in this particular x86_64 PC case, I couldn't replicate the  15s anymore in 3 individual attempts. The remaining difference is due to:
- "guiet" kernel command-line argument adds ~0.5 seconds. Surprising that printing to screen/console is so heavy, respectively it seems to not be done asynchroniously.
- Another ~0.5 seconds, more depending on Ethernet vs WiFi and DHCP vs static IP + local network setup, is added by our ifup@+ifupdown-pre service overrides, and that dietpi-postboot pulls in network-online.target into the boot sequence by default (dietpi-config option "Boot wait for network"). ifup@ services are oneshot on DietPi instead of "Type=simple", to give the network-online.target more meaning, waiting for interfaces to be up, instead of only for the startup procedure to just have started. But even that dietpi-postboot is "Type=idle", not actually making network-online.target dalying boot, network.target is delayed as well, which does have an effect on the boot sequence. ifupdown-pre.service is altered to imply "udevadm settle" as well when only "hotplug" interfaces are configured. On stock Debian, "hotplug" is also used by default, but in this case, ifupdown-pre.service does not wait for udev events to settle. Hence on Debian, network targets can be reached before network adapters even have been detected, again breaking the meaning of those targets. Overall, if a service depends on network, stock Debian has no native method to make them start reliably after network is online. Since this was an ongoing problem for many common server systems, we applied and polished these changes, and they are totally worth a little longer boot time. And of course, this is mostly visual only, and for these kind of comparisons/benchmarks, while in practice, SSH logins are simply not possible before network is there, and the local console login prompt on DietPi can appear before network is there: This larger number hence does not have any practical downside, but the reasons for it have many practical benefits.
- Removing those two differences, DietPi boots faster, despite our additional ramdisk and preboot services. Those have no measurable impact, but the additional services stock Debian is shipped with (dbus, logind, apparmor, anacron, ...) and probably our mount options (noatime,lazytime) do in sum have some positive effect on boot time.
  • Loading branch information
MichaIng committed May 31, 2024
1 parent 7e57df4 commit 587a49e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,16 @@ <h5>Bookworm on NanoPi R4S at 2024-05-25</h5>
<div class="row">
<div class="col-md-12 project-description">
<div class="project-info">
<h5>Bookworm on x86_64 UEFI PC at 2024-05-26</h5>
<h5>Bookworm on x86_64 UEFI PC at 2024-05-31</h5>
<p>These images are hard to compare. Debian does not offer a server live image. Closest to compare is the Debian network installer CD ISO image, with the DietPi UEFI installer image. The Debian installer debootstraps a fresh Debian onto the target drive, which requires a lot of pre-configuration, manual formatting, and makes use of network access for additional and/or updated packages. The DietPi installer comes with a complete embedded DietPi live image, which does not need any pre-configuration. However, opposed to Debian, DietPi does updates and initial configuration on first boot and login.</p>
<p>In the Debian installer, everything was de-selected, but the SSH server and common system utilities, which is closest to what DietPi images ship with.
<table>
<tr><th>Stat</th><th>DietPi</th><th>DietPi/Debian [%]</th><th>Debian</th></tr>
<tr><td>RAM usage</td><td class="win">304 MiB</td><td>85%</td><td class="los">357 MiB</td></tr>
<tr><td>RAM usage</td><td class="win">296 MiB</td><td>83%</td><td class="los">357 MiB</td></tr>
<tr><td>Running processes</td><td class="win">9</td><td>53%</td><td class="los">17</td></tr>
<tr><td>Disk usage</td><td class="win">1056 MiB</td><td>59%</td><td class="los">1787 MiB</td></tr>
<tr><td>Disk usage</td><td class="win">1055 MiB</td><td>59%</td><td class="los">1787 MiB</td></tr>
<tr><td>Pre-installed packages</td><td class="win">237</td><td>66%</td><td class="los">357</td></tr>
<tr><td>Boot duration</td><td class="los">15.216s</td><td>218%</td><td class="win">6.967s</td></tr>
<tr><td>Boot duration</td><td class="los">7.425s</td><td>107%</td><td class="win">6.967s</td></tr>
<tr><td>Temporary files</td><td class="win">RAM disk (tmpfs)</td><td></td><td class="los">rootfs</td></tr>
<tr><td>Log files</td><td class="win">RAM disk (tmpfs)</td><td></td><td class="los">rootfs</td></tr>
<tr><td>SSH pre-installed</td><td class="win">Yes</td><td></td><td class="los">selection required</td></tr>
Expand Down

0 comments on commit 587a49e

Please sign in to comment.