0

computer specs

  • cpu: intel i7-7700k kaby lake
  • graphics: nvidia gfx 1070
  • ram: 16 gb
  • hard drive: 500gb solid state drive x1 and 250 gb solid state drive
  • wifi card: don't use

xubuntu version: 17.04 (latest ubuntu version)

how can i make my os startup faster. it currently takes 3 minutes and 21 seconds to startup. all other distros ive used normally don't take that long.

i ran the following command

systemd-analyze blame

prints

          9.434s NetworkManager-wait-online.service
          1.009s mysql.service
           607ms systemd-resolved.service
           363ms lightdm.service
           362ms dev-sda5.device
           362ms plymouth-quit-wait.service
           300ms apt-daily.service
           115ms systemd-timesyncd.service
            87ms bluetooth.service
            66ms systemd-rfkill.service
            55ms keyboard-setup.service
            55ms networking.service
            51ms snapd.service
            51ms upower.service
            50ms NetworkManager.service
            47ms ModemManager.service
            45ms grub-common.service
            40ms teamviewerd.service
            35ms accounts-daemon.service
            35ms systemd-udevd.service
            34ms systemd-udev-trigger.service
            28ms thermald.service
            26ms systemd-fsck@dev-disk-by\x2duuid-781C\x2dCC89.service
lines 1-23

i looked at this too

dmesg

prints

https://pastebin.com/UrVjtMUm

looks like

[   92.583751] kauditd_printk_skb: 12 callbacks suppressed

is causing the slow startup

more information

user@user-desktop:~$ systemd-analyze
Startup finished in 13.343s (firmware) + 5.114s (loader) + 2.405s (kernel) + 3min 473ms (userspace) = 3min 21.337s

1 Answers1

0

line 820 seems to be a red herring. Where as lines 821-823 of your dmesg indicates that issue may be apparmor denning "/usr/sbin/mysqld".

To check this look in /var/log/syslog via grep apparmor /var/log/syslog. Temporarily downgrade apparmor's enforcement by running sudo aa-complain /usr/sbin/mysqld followed by a reboot and evaluate the output of dmesg. If the boot time improves restore enforcement by running sudo aa-enforce /usr/sbin/mysqld.

To properly configure apparmor for your use of mysqul see the Oracle blog post AppArmor and MySQL. For a deeper look at debugging apparmor see Ubuntu wiki - DebuggingApparmor

Adding an appropriate exception to /etc/apparmor.d/local/usr.sbin.mysqld may solve this portion of the slow boot.

J. Starnes
  • 1,979