New to linux and ubuntu. I have shared my laptop info. Boot up time is sooooo slowwwww. Even lauch of firefox takes long time.
Can anyone help me figure out how to optimize my system?
Using Lubuntu (Ubuntu Version)
Command
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
Command
$ sudo lshw -short
H/W path Device Class Description
======================================================
system Aspire A515-51G (0000000000000000)
/0 bus Charmander_KL
/0/0 memory 128KiB BIOS
/0/4 processor Intel(R) Core(TM) i5-8250U CPU @ 1.60
/0/4/5 memory 256KiB L1 cache
/0/4/6 memory 1MiB L2 cache
/0/4/7 memory 6MiB L3 cache
/0/d memory 4GiB System Memory
/0/d/0 memory 4GiB SODIMM DDR4 Synchronous Unbuffer
/0/d/1 memory [empty]
/0/100 bridge Xeon E3-1200 v6/7th Gen Core Processo
/0/100/2 display UHD Graphics 620
/0/100/14 bus Sunrise Point-LP USB 3.0 xHCI Control
/0/100/14/0 usb1 bus xHCI Host Controller
/0/100/14/0/5 communication Bluetooth wireless interface
/0/100/14/0/7 multimedia HD WebCam
/0/100/14/1 usb2 bus xHCI Host Controller
/0/100/15 generic Sunrise Point-LP Serial IO I2C Contro
/0/100/15.1 generic Sunrise Point-LP Serial IO I2C Contro
/0/100/16 communication Sunrise Point-LP CSME HECI #1
/0/100/17 storage Sunrise Point-LP SATA Controller [AHC
/0/100/1c bridge Sunrise Point-LP PCI Express Root Por
/0/100/1c/0 display GP108M [GeForce MX150]
/0/100/1c.4 bridge Sunrise Point-LP PCI Express Root Por
/0/100/1c.4/0 generic RTL8411B PCI Express Card Reader
/0/100/1c.4/0.1 enp2s0f1 network RTL8111/8168/8411 PCI Express Gigabit
/0/100/1c.5 bridge Sunrise Point-LP PCI Express Root Por
/0/100/1c.5/0 wlp3s0 network Dual Band Wireless-AC 3168NGW [Stone
/0/100/1f bridge Intel(R) 100 Series Chipset Family LP
/0/100/1f.2 memory Memory controller
/0/100/1f.3 multimedia Sunrise Point-LP HD Audio
/0/100/1f.4 bus Sunrise Point-LP SMBus
/0/1 scsi0 storage
/0/1/0.0.0 /dev/sda disk 1TB WDC WD10SPZX-21Z
/0/1/0.0.0/1 /dev/sda1 volume 927GiB EXT4 volume
/0/1/0.0.0/2 /dev/sda2 volume 3970MiB Extended partition
/0/1/0.0.0/2/5 /dev/sda5 volume 3970MiB Linux swap volume
Used this command
$ systemd-analyze 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 @1min 6.870s
└─multi-user.target @1min 6.870s
└─kerneloops.service @1min 6.842s +26ms
└─network-online.target @1min 6.836s
└─NetworkManager-wait-online.service @58.305s +8.529s
└─NetworkManager.service @48.794s +9.507s
└─dbus.service @48.775s
└─basic.target @48.690s
└─sockets.target @48.690s
└─snapd.socket @48.620s +69ms
└─sysinit.target @48.618s
└─systemd-timesyncd.service @48.458s +159ms
└─systemd-tmpfiles-setup.service @47.215s +1.185s
└─systemd-journal-flush.service @5.764s +41.448s
└─systemd-remount-fs.service @4.325s +1.438s
└─systemd-journald.socket @4.229s
└─system.slice @4.229s
└─-.slice @4.170s
Saw this post Can we talk about the boot time on Ubuntu 18.04?
Ran
$ systemd-analyze time
Startup finished in 4.907s (kernel) + 7min 8.181s (userspace) = 7min 13.089s
graphical.target reached after 1min 6.870s in userspace
Ran
$ service --status-all | grep '+' | wc -l
27
1. Journal size limit
The time consuming
systemd-journal-flush.service
can be tweaked by a journal size limit.Edit the Journal config file
1.1 Journal clean up
For information, the journal size is given by this command:
2. Startup applications
Another step to speed up userspace load delay is to disable some startup applications
See how to show all of them : https://help.ubuntu.com/community/ShowHiddenStartupApplications
See how to open the Startup Applications applet : https://help.ubuntu.com/stable/ubuntu-help/startup-applications.html
If you dont mind, disabling
Backup Monitor
andUpdates Notifier
will save boot time.In addition to cmak.fr
I looked into What is the use of systemd-journal-flush.service?
In the journal section uncomment and alter:
Save & reboot.
keyboard-setup.service taking too long in startup (20+sec)
changed
Ubuntu 15.04 network manager causing slow boot
edit from 30 to 15
Long boot times on 18.04
Now
and
From
7min 13.089s
to1min 4.072s
a huge improvement, if anyone has any more improvements that I am not aware of please do share.Here's my contribution to this little Show & Tell:
Compare this 2.49 seconds to SDC's answer of 59.29 seconds which has extra time consuming features I've removed from my boot-up:
Key features:
Systemd Journal Control enhancements
The notable details are in bold.
Because
journalctl
files are not longer flushed at startup I have them setup to be vacuumed once a month:Often I want to know what happened when the system crashed and I had to reboot. By default
journalctl
files don't show you the previous boots though. So I turned on multi-boot history:That's all for today. I'll try to remember to update this answer going forward.