• We did not send an email asking for donations - please read this post.

Today's article is about finding the processes that slow down your boot time...

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
7,349
Reaction score
6,334
Credits
59,574
This is only valid for those of you who are using systemd. If you're not using systemd, this article will not help you.

What it will do is show you how to examine your boot processes, looking for things that slow you down or that are causing problems. It's not really written with the idea of people speeding up their boot process, though it can certainly be used that way, it's for those who are having legitimate boot problems.

As I said in the article, at least with modern computers, I don't really understand spending three hours to shave three seconds off your boot time. You'd actually save more time by not doing that, unless you're rebooting dozens of times every day. Ah well... Tweakers gonna tweak! (And not in the meth way.) Or, as they say, "If it ain't broke, tweak it!" Or not... There's all sorts of things worth tweaking, but shaving a few seconds off your boot time probably isn't gonna help you save all that much time in the long run.


Enjoy and don't forget feedback!
 


BigBadBeef

Active Member
Joined
Sep 23, 2021
Messages
147
Reaction score
44
Credits
1,390
I'm in the login screen usually by the time my monitor powers on, and this is on a 7 year old pci-e 3.0 prototype rev3 m.2 storage system.

Unless I go poking around in the kernel, whatever I add to boot seems to activate after I'm already in my desktop environment.

What could possible slow down systemd from booting?
 
OP
K

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
7,349
Reaction score
6,334
Credits
59,574
What could possible slow down systemd from booting?

It's often dependency issues or some program that has added a service that starts at boot that takes quite a while. If you meander around the forum, you'll find the occasional question where people have boot times (on modern devices) that are a couple of minutes long. The solution is often different for each person, but the first step is checking to see what's loading, how long it takes to load, and when it is loading.
 

BigBadBeef

Active Member
Joined
Sep 23, 2021
Messages
147
Reaction score
44
Credits
1,390
It's often dependency issues or some program that has added a service that starts at boot that takes quite a while. If you meander around the forum, you'll find the occasional question where people have boot times (on modern devices) that are a couple of minutes long. The solution is often different for each person, but the first step is checking to see what's loading, how long it takes to load, and when it is loading.
I see. I would think the kernel could identify that there is an issue with said service and at the very least assert that it isn't loading as it should.

After all, debian is prized for its stability...
 
OP
K

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
7,349
Reaction score
6,334
Credits
59,574
I would think the kernel could identify that there is an issue with said service and at the very least assert that it isn't loading as it should.

One might think so, but search for 'slow boot time +Linux' at your favorite search engine. You'll find people complaining about it taking two or four minutes to boot. The first step is to then examine the boot process - unless there are other clues, like they recently cloned the drive to a new drive - where fstab may then have the wrong information. But, generally speaking, you first want to examine the boot process for clues.
 

bob466

Well-Known Member
Joined
Oct 22, 2020
Messages
636
Reaction score
444
Credits
4,647
When I had Mint Cinnamon 19.1 on a HDD...my boot times were 38 seconds to the Login Screen and 16 seconds to the Desktop but now it's on an SSD and now 16 seconds and 5 seconds and that was 3 years ago and is still the same...an SSD makes all the difference.
m1203.gif
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
5,115
Reaction score
4,302
Credits
30,089
The:: systemd-analyze plot > boot.svg ......command produces no output
 

osprey

Active Member
Joined
Apr 15, 2022
Messages
242
Reaction score
140
Credits
2,216
The:: systemd-analyze plot > boot.svg ......command produces no output
I can't say why that command failed for you. That's a drag and it shouldn't fail. In my case there was an output, but imagemagick didn't appear to read the bootup.svg file. It output a dark grey screen which was static and didn't respond to any mouse move. I was able to close imagemagick with the q command.
Code:
[[email protected] ~]$ systemd-analyze plot >bootup.svg
[[email protected] ~]$ display bootup.svg
[[email protected] ~]$ ll bootup.svg
-rw-r--r-- 1 flop flop 99K Nov 25 13:18 bootup.svg
[[email protected] ~]$ file bootup.svg
bootup.svg: SVG Scalable Vector Graphics image

On checking about online, apparently it takes some time for imagemagick and other viewing programs to display large .svg files, sometimes many minutes, so perhaps I didn't wait long enough for imagemagick to do it's work. Normally I sort of expect it to display almost immediately. Notwithstanding that, the .svg file was entirely visible when I pointed my browser, firefox, at the file. There was no time delay with the browser and I was able to move about the image of the graph which was actually larger than my monitor screen. It's basically a graph representing the output from the the command: systemd-analyze blame, as far as I could see so if one is satisfied with the terminal output from that command, that's just as informative.
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
5,115
Reaction score
4,302
Credits
30,089
It has me stumped. I obliterated Gnome Terminal... sudo apt purge gnome-terminal.... and started using Tilix in that process.


Still no result.
 

BigBadBeef

Active Member
Joined
Sep 23, 2021
Messages
147
Reaction score
44
Credits
1,390
One might think so, but search for 'slow boot time +Linux' at your favorite search engine. You'll find people complaining about it taking two or four minutes to boot. The first step is to then examine the boot process - unless there are other clues, like they recently cloned the drive to a new drive - where fstab may then have the wrong information. But, generally speaking, you first want to examine the boot process for clues.
Never mind, I was just back from "happy hours" when I wrote that so just ignore it...
 

osprey

Active Member
Joined
Apr 15, 2022
Messages
242
Reaction score
140
Credits
2,216
It has me stumped. I obliterated Gnome Terminal... sudo apt purge gnome-terminal.... and started using Tilix in that process.


Still no result.
This is curious. I expect your system will certainly have the binary executable: systemd-analyze, since it's part of the systemd package. It shouldn't be the terminal emulator that gets in the way. In my own case I use xterm for most operations, sometimes termit, lxterminal or st, which all work with systemd-analyze. They are all light weight compared to gnome-terminal in terms of install size plus dependencies.
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
5,115
Reaction score
4,302
Credits
30,089
1669365654484.png
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
5,115
Reaction score
4,302
Credits
30,089
each time i open a terminal (regardless of which one) i get...

1669365735566.png

No idea if it interferes in any way...??

That 'blurb' transfers from one terminal 'brand' to the next...
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,947
Reaction score
3,592
Credits
36,045
each time i open a terminal (regardless of which one) i get...

View attachment 14053
No idea if it interferes in any way...??

That 'blurb' transfers from one terminal 'brand' to the next...
The errors you are getting there are most likely referring to the lines in one of these files:
~/.bashrc
~/.bash_profile
I would check them first.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,947
Reaction score
3,592
Credits
36,045
The:: systemd-analyze plot > boot.svg ......command produces no output
It's correct that it produces no output because the output is redirected to a file or does the file boot.svg also not get created or it does but you see nothing when you open it?
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
5,115
Reaction score
4,302
Credits
30,089
Maarten....you have hit the nail on the head !

The output has been redirected to a file....boot.svg....in /home/brian

2022-11-25_19-50.png
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
5,115
Reaction score
4,302
Credits
30,089
That will give @KGIII something to edit into his blurb up above.......
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
5,115
Reaction score
4,302
Credits
30,089
and in your post @f33dm3bits #14....I found the culprit...error messages gone!....Thank you.!
 

osprey

Active Member
Joined
Apr 15, 2022
Messages
242
Reaction score
140
Credits
2,216
Condobloke wrote:
The output has been redirected to a file....boot.svg....in /home/brian
I'm sorry if the code and explanation in post #8 was confusing.
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
5,115
Reaction score
4,302
Credits
30,089
I can easily admit that my own haste is to blame there......that and the fact that I assumed that the result would show itself in the terminal.
There are times that a person's inexperience (mine) shows.....and this is one of them

Thanks for your help, @osprey, and you too @f33dm3bits
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top