• Bug#1071429: dpkg: `dpkg-db-backup.timer` starts `dpkg-db-backup.servic

    From Guillem Jover@1:229/2 to Paul Menzel on Mon May 20 00:20:01 2024
    XPost: linux.debian.bugs.dist
    From: guillem@debian.org

    Hi!

    On Sun, 2024-05-19 at 07:09:24 +0200, Paul Menzel wrote:
    Package: dpkg
    Version: 1.22.6
    Severity: normal

    Trying to decrease the boot time of a desktop system (pressing the power button to GDM login screen), I noticed `dpkg-db-backup.service` in the hotpath:

    […]

    It’d be great if this could be moved out the hot path, for example, by running it at least ten(?) minutes after the system has been started.

    I'm not sure systemd provides something to implement the requested
    behavior though. The closest I see is RandomizedDelaySec, but that
    will not guarantee the delay. If you can suggest a specific change
    then we can discuss that, otherwise, I'm afraid this might need to
    be closed?

    Thanks,
    Guillem

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Paul Menzel@1:229/2 to All on Sun May 19 07:20:01 2024
    XPost: linux.debian.bugs.dist
    From: pmenzel@molgen.mpg.de

    Package: dpkg
    Version: 1.22.6
    Severity: normal


    Dear Debian folks,


    Trying to decrease the boot time of a desktop system (pressing the power
    button to GDM login screen), I noticed `dpkg-db-backup.service` in the
    hotpath:

    May 19 06:18:53.272044 abreu systemd[1]: Started
    dpkg-db-backup.timer - Daily dpkg database backup timer.
    […]
    May 19 06:18:53.280049 abreu kernel: i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
    […]
    May 19 06:18:53.313754 abreu systemd[1]: Starting dbus.service -
    D-Bus System Message Bus...
    […]
    May 19 06:18:53.479594 abreu systemd[1]: Starting
    dpkg-db-backup.service - Daily dpkg database backup service...
    […]
    May 19 06:18:53.974802 abreu systemd[1]: dpkg-db-backup.service: Deactivated successfully.
    […]
    May 19 06:18:53.975072 abreu systemd[1]: Finished
    dpkg-db-backup.service - Daily dpkg database backup service.
    […]
    May 19 06:18:53.985305 abreu systemd[1]: Reached target
    network.target - Network.
    […]
    May 19 06:18:54.166818 abreu systemd[1]: Started gdm.service -
    GNOME Display Manager.

    It’d be great if this could be moved out the hot path, for example, by running it at least ten(?) minutes after the system has been started.


    Kind regards,

    Paul


    PS:

    ```
    $ systemctl cat dpkg-db-backup.timer
    # /usr/lib/systemd/system/dpkg-db-backup.timer
    [Unit]
    Description=Daily dpkg database backup timer
    Documentation=man:dpkg(1)

    [Timer]
    OnCalendar=daily
    Persistent=true

    [Install]
    WantedBy=timers.target
    $ systemctl cat dpkg-db-backup.service
    # /usr/lib/systemd/system/dpkg-db-backup.service
    [Unit]
    Description=Daily dpkg database backup service
    Documentation=man:dpkg(1)

    [Service]
    Type=oneshot
    ExecStart=/usr/libexec/dpkg/dpkg-db-backup
    $ systemd-analyze blame
    4.396s systemd-suspend.service
    1.295s fwupd.service
    535ms cups.service
    517ms boot-efi.mount
    507ms NetworkManager.service
    495ms dpkg-db-backup.service
    489ms accounts-daemon.service
    478ms dev-mapper-nvme0n1p3_crypt.device
    456ms gnome-remote-desktop.service
    454ms udisks2.service
    446ms fwupd-refresh.service
    430ms strongswan.service
    418ms power-profiles-daemon.service
    399ms ssh.service
    390ms systemd-journal-flush.service
    377ms e2scrub_reap.service
    325ms avahi-daemon.service
    317ms upower.service
    304ms user@5272.service
    298ms xl2tpd.service
    295ms systemd-udev-trigger.service
    289ms systemd-tmpfiles-clean.service
    286ms systemd-logind.service
    250ms lm-sensors.service
    243ms switcheroo-control.service
    242ms etckeeper.service
    193ms smartmontools.service
    169ms systemd-journald.service
    161ms grub-common.service
    145ms apparmor.service
    140ms systemd-fsck@dev-disk-by\x2duuid-96BD\x2d5653.service
    128ms wpa_supplicant.service
    125ms systemd-cryptsetup@nvme0n1p3_crypt.service
    123ms systemd-udevd.service
    120ms polkit.service
    112ms gdm.service
    112ms systemd-backlight@backlight:intel_backlight.service
    108ms systemd-fsck@dev-disk-by\x2duuid-2d23fd4c\x2d5d03\x2d4e1a\x2d8a42\x2d0e859d1f00d8.service
    105ms dev-disk-by\x2ddiskseq-1\x2dpart4.swap
    104ms dbus.service
    91ms colord.service
    91ms nvmf-autoconnect.service
    90ms systemd-rfkill.service
    85ms systemd-hostnamed.service
    82ms dev-hugepages.mount
    79ms dev-mqueue.mount
    78ms systemd-tmpfiles-setup.service
    75ms sys-kernel-debug.mount
    68ms sys-kernel-tracing.mount
    67ms atop.service
    66ms systemd-modules-load.service
    64ms kmod-static-nodes.service
    60ms modprobe@configfs.service
    58ms systemd-timesyncd.service
    54ms systemd-remount-fs.service
    53ms systemd-backlight@leds:dell::kbd_backlight.service
    53ms modprobe@dm_mod.service
    52ms modprobe@drm.service
    51ms modprobe@efi_pstore.service
    45ms modprobe@fuse.service
    44ms systemd-tmpfiles-setup-dev-early.service
    42ms modprobe@loop.service
    42ms boot.mount
    39ms systemd-binfmt.service
    37ms modprobe@nvme_fabrics.service
    33ms systemd-udev-load-credentials.service
    32ms systemd-user-sessions.service
    25ms rtkit-daemon.service
    24ms systemd-random-seed.service
    24ms systemd-tmpfiles-setup-dev.service
    22ms user-runtime-dir@5272.service
    20ms systemd-sysctl.service
    20ms systemd-update-utmp-runlevel.service
    18ms systemd-update-utmp.service
    16ms proc-sys-fs-binfmt_misc.mount
    13ms sys-kernel-config.mount
    10ms alsa-restore.service
    10ms sys-fs-fuse-connections.mount
    ```

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)