0

I'm trying to diagnose what is causing my desktop load time to hang on my virtual machine. The boot itself is relatively fast, it's just that after I login, there's a noticeable delay until the icons and desktop are fully loaded and ready for use.

What prompted my concern is that it didn't always take so long, I recall startup times after initial install to be much faster. That, and I run a nearly identical setup on my much older and slower laptop and it loads much faster. Granted, my laptop is not booting linux through a VM, but straight from an external HD.

Any ideas for how I might improve things? This is a work system, so I'm 100% okay with gutting any superfluous bells and whistles.

Just taking a stab in the dark, but things that stick out to me from the below plots and logs are

  • plymouth-quit-wait.service
  • postgresql.service
  • in dmesg output, I included two of the largest time jumps (21-34 and 34-57)

Thank you!

plot.svg

https://www.mediafire.com/view/jsz77p35xa7prs2/20190711013332.plot.svg/file

blame

     32.673s vboxadd.service
     28.059s plymouth-quit-wait.service
     14.606s postgresql@10-main.service
     13.997s dev-sda1.device
     12.637s apparmor.service
      7.451s dev-loop12.device
      6.987s dev-loop7.device
      6.724s systemd-journal-flush.service
      6.635s dev-loop9.device
      6.611s dev-loop8.device
      6.530s dev-loop6.device
      6.486s dev-loop11.device
      6.166s dev-loop5.device
      6.153s ModemManager.service
      5.959s dev-loop10.device
      5.428s dev-loop4.device
      5.225s dev-loop2.device
      4.968s dev-loop1.device
      4.861s networkd-dispatcher.service
      4.836s dev-loop3.device
      4.783s grub-common.service
      4.159s dev-loop0.device
      4.078s snapd.seeded.service
      3.809s snapd.service
      3.243s systemd-udevd.service
      3.031s wpa_supplicant.service
      2.904s accounts-daemon.service
      2.679s binfmt-support.service
      2.383s apport.service
      2.258s polkit.service
      2.202s pppd-dns.service
      2.003s lm-sensors.service
      1.851s glances.service
      1.772s systemd-resolved.service
      1.685s NetworkManager.service
      1.541s gpu-manager.service
      1.533s rsyslog.service
      1.533s systemd-sysctl.service
      1.445s systemd-tmpfiles-setup.service
      1.296s keyboard-setup.service
      1.286s console-setup.service
      1.268s snapd.failure.service
      1.266s snap-core-7270.mount
      1.239s snap-slack-14.mount
      1.219s snap-gravit\x2ddesigner-31.mount
      1.178s snap-gravit\x2ddesigner-32.mount
      1.115s motd-news.service
      1.084s snap-core-7169.mount
      1.014s systemd-tmpfiles-setup-dev.service
       988ms proc-sys-fs-binfmt_misc.mount
       974ms snap-vectr-2.mount
       935ms systemd-update-utmp.service
       891ms plymouth-read-write.service
       871ms systemd-logind.service
       849ms snap-rg-23.mount
       846ms avahi-daemon.service
       792ms kerneloops.service
       785ms hddtemp.service
       729ms systemd-modules-load.service
       726ms sysstat.service
       712ms snap-inkscape-4690.mount
       709ms snap-termdown-8.mount
       613ms snap-slack-13.mount
       613ms upower.service
       567ms plymouth-start.service
       550ms systemd-user-sessions.service
       365ms systemd-journald.service
       357ms alsa-restore.service
       351ms snap-rg-15.mount
       348ms postgresql.service
       338ms snap-inkscape-4435.mount
       334ms snap-inkscape-4693.mount
       324ms swapfile.swap
       324ms lightdm.service
       321ms speech-dispatcher.service
       279ms systemd-random-seed.service
       279ms kmod-static-nodes.service
       266ms udisks2.service
       261ms ufw.service
       218ms packagekit.service
       203ms vboxadd-service.service
       161ms user@1000.service
       155ms systemd-remount-fs.service
       126ms dev-mqueue.mount
        98ms sys-kernel-debug.mount
        93ms systemd-udev-trigger.service
        90ms dev-hugepages.mount
        86ms spice-vdagent.service
        68ms snapd.socket
        25ms setvtrgb.service
        24ms systemd-tmpfiles-clean.service
        16ms sys-kernel-config.mount
        10ms systemd-update-utmp-runlevel.service
         3ms sys-fs-fuse-connections.mount

critical chain

The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @54.170s
└─multi-user.target @54.170s
  └─getty.target @54.170s
    └─getty@tty1.service @54.170s
      └─system-getty.slice @54.169s
        └─setvtrgb.service @54.143s +25ms
          └─systemd-user-sessions.service @25.529s +550ms
            └─network.target @25.527s
              └─NetworkManager.service @25.752s +1.685s
                └─dbus.service @18.981s
                  └─basic.target @18.952s
                    └─sockets.target @18.952s
                      └─snapd.socket @18.883s +68ms
                        └─sysinit.target @18.849s
                          └─apparmor.service @6.211s +12.637s
                            └─local-fs.target @6.198s
                              └─media-sf_Google_Drive.mount @54.071s
                                └─local-fs-pre.target @5.485s
                                  └─systemd-tmpfiles-setup-dev.service @4.469s +1.014s
                                    └─kmod-static-nodes.service @4.188s +279ms
                                      └─systemd-journald.socket @4.163s
                                        └─system.slice @4.162s
                                          └─-.slice @4.121s

dmesg

link to full dmesg file: https://www.mediafire.com/file/9eko4ehprddldui/20190711013332.dmesg.txt/file

...

[   20.751631] audit: type=1400 audit(1562824330.660:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/sbin/dhclient" pid=436 comm="apparmor_parser"
[   20.751641] audit: type=1400 audit(1562824330.660:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=436 comm="apparmor_parser"
[   20.751650] audit: type=1400 audit(1562824330.660:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-helper" pid=436 comm="apparmor_parser"
[   20.751658] audit: type=1400 audit(1562824330.660:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script" pid=436 comm="apparmor_parser"
[   20.855165] audit: type=1400 audit(1562824330.764:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/lightdm/lightdm-guest-session" pid=435 comm="apparmor_parser"
[   20.855171] audit: type=1400 audit(1562824330.764:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/lightdm/lightdm-guest-session//chromium" pid=435 comm="apparmor_parser"
[   21.576969] audit: type=1400 audit(1562824331.488:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/snap/core/4917/usr/lib/snapd/snap-confine" pid=490 comm="apparmor_parser"
[   21.576975] audit: type=1400 audit(1562824331.488:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/snap/core/4917/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=490 comm="apparmor_parser"
[   21.947608] audit: type=1400 audit(1562824331.856:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince" pid=491 comm="apparmor_parser"
[   21.947613] audit: type=1400 audit(1562824331.856:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince//sanitized_helper" pid=491 comm="apparmor_parser"
[   34.573669] IPv6: ADDRCONF(NETDEV_UP): enp0s3: link is not ready
[   34.577588] IPv6: ADDRCONF(NETDEV_UP): enp0s3: link is not ready
[   34.580291] e1000: enp0s3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[   34.580814] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s3: link becomes ready
[   57.631641] vboxsf: Successfully loaded version 5.2.30 (interface 0x00010004)
[   59.356384] VBoxService 5.2.30 r130521 (verbosity: 0) linux.amd64 (May 13 2019 15:16:17) release log
               00:00:00.000143 main     Log opened 2019-07-11T05:52:49.269873000Z
[   59.356436] 00:00:00.000234 main     OS Product: Linux
[   59.356467] 00:00:00.000271 main     OS Release: 4.15.0-54-generic
[   59.356496] 00:00:00.000301 main     OS Version: #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019
[   59.356553] 00:00:00.000329 main     Executable: /opt/VBoxGuestAdditions-5.2.30/sbin/VBoxService
               00:00:00.000331 main     Process ID: 938
               00:00:00.000332 main     Package type: LINUX_64BITS_GENERIC
[   59.357383] 00:00:00.001182 main     5.2.30 r130521 started. Verbose level = 0
[   59.388437] 00:00:00.031799 automount vbsvcAutoMountWorker: Shared folder 'Book_Notes' was mounted to '/media/sf_Book_Notes'
[   59.392974] 00:00:00.036694 automount vbsvcAutoMountWorker: Shared folder 'Books' was mounted to '/media/sf_Books'
[   59.400801] 00:00:00.044578 automount vbsvcAutoMountWorker: Shared folder 'Google_Drive' was mounted to '/media/sf_Google_Drive'

unit files enabled

UNIT FILE                                  STATE  
snap-core-7169.mount                       enabled
snap-core-7270.mount                       enabled
snap-gravit\x2ddesigner-31.mount           enabled
snap-gravit\x2ddesigner-32.mount           enabled
snap-inkscape-4435.mount                   enabled
snap-inkscape-4690.mount                   enabled
snap-inkscape-4693.mount                   enabled
snap-rg-15.mount                           enabled
snap-rg-23.mount                           enabled
snap-slack-13.mount                        enabled
snap-slack-14.mount                        enabled
snap-termdown-8.mount                      enabled
snap-vectr-2.mount                         enabled
acpid.path                                 enabled
apport-autoreport.path                     enabled
cups.path                                  enabled
accounts-daemon.service                    enabled
anacron.service                            enabled
apparmor.service                           enabled
autovt@.service                            enabled
avahi-daemon.service                       enabled
binfmt-support.service                     enabled
bluetooth.service                          enabled
console-setup.service                      enabled
cron.service                               enabled
cups.service                               enabled
dbus-fi.w1.wpa_supplicant1.service         enabled
dbus-org.bluez.service                     enabled
dbus-org.freedesktop.Avahi.service         enabled
dbus-org.freedesktop.ModemManager1.service enabled
dbus-org.freedesktop.nm-dispatcher.service enabled
dbus-org.freedesktop.resolve1.service      enabled
getty@.service                             enabled
gpu-manager.service                        enabled
irqbalance.service                         enabled
kerneloops.service                         enabled
keyboard-setup.service                     enabled
lm-sensors.service                         enabled
ModemManager.service                       enabled
network-manager.service                    enabled
networkd-dispatcher.service                enabled
NetworkManager-dispatcher.service          enabled
NetworkManager-wait-online.service         enabled
NetworkManager.service                     enabled
ondemand.service                           enabled
postgresql.service                         enabled
pppd-dns.service                           enabled
rsync.service                              enabled
rsyslog.service                            enabled
setvtrgb.service                           enabled
snapd.autoimport.service                   enabled
snapd.core-fixup.service                   enabled
snapd.seeded.service                       enabled
snapd.service                              enabled
snapd.system-shutdown.service              enabled
syslog.service                             enabled
sysstat.service                            enabled
systemd-resolved.service                   enabled
systemd-timesyncd.service                  enabled
udisks2.service                            enabled
ufw.service                                enabled
ureadahead.service                         enabled
vboxadd-service.service                    enabled
vboxadd.service                            enabled
whoopsie.service                           enabled
wpa_supplicant.service                     enabled
acpid.socket                               enabled
apport-forward.socket                      enabled
avahi-daemon.socket                        enabled
cups.socket                                enabled
snapd.socket                               enabled
uuidd.socket                               enabled
remote-fs.target                           enabled
anacron.timer                              enabled
apt-daily-upgrade.timer                    enabled
apt-daily.timer                            enabled
fstrim.timer                               enabled
motd-news.timer                            enabled
snapd.snap-repair.timer                    enabled

79 unit files listed.

fstab

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=a43a7e20-c112-4416-a137-b11874a8a299 /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0

blkid

/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/sda1: UUID="a43a7e20-c112-4416-a137-b11874a8a299" TYPE="ext4" PARTUUID="fa6564f8-01"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
/dev/loop11: TYPE="squashfs"
/dev/loop12: TYPE="squashfs"
  • if you are running an upgraded version, the fastest will be to go for a fresh and from scratch install of the recent Ubuntu version you want – cmak.fr Jul 11 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.