Debian 12 takes too long to boot and login

Greetings, all. I have been a contributor to an Open Source project over a number of years. A lot of the devs seems to use Debian testing which means I often find I have to deal with (often minor, fortunately) dependency hell to be able to recompile the program when I haven't done so in a while. I was trying out a Debian based version of Armbian and was impressed by how easy it was to get it up and running. I've been thinking of switching to Debian from Linux Mint. I decided to have another look at the Debian 12 install I have on one of the root partitions I have for other OSs. I was *not* impressed. It took about 7 minutes to from boot to login page. It takes so long that the system that provides the splash screen during boot gave up and it changed to a black screen during the last part of the boot process. After I enter my name and password it took about another 7 minutes to get to the desktop. Under Linux mint boot to desktop takes about 3 minutes. Any clues as to why Debian takes 4 to 5 times as long? I'm hoping there is some bad configuration out of the box causing Debian 12 to be acting so slow. Anyone have any ideas where I should start looking? If I can't get to the bottom of the problem I will be staying with Linux Mint. Perhaps LMDE might be worth a try instead of pure Debian. -- Cheers! Kevin. https://www.patreon.com/KevinCozens | "Nerds make the shiny things that | distract the mouth-breathers, and Owner of Elecraft K2 #2172 | that's why we're powerful" #include <disclaimer/favourite> | --Chris Hardwick

Kevin Cozens via talk wrote on 2023-12-17 14:43:
Any clues as to why Debian takes 4 to 5 times as long? I'm hoping there is some bad configuration out of the box causing Debian 12 to be acting so slow. Anyone have any ideas where I should start looking? If I can't get to the bottom of the problem I will be staying with Linux Mint.
Try `dmesg | less` and see if anything eye-catching is in there. Also, `journalctl` with some option like `--boot=-1` for *previous* boot logs, or for running in Mint with separate partitioning, `journalctl --directory=/path/to/debian/logs`. Note that `journalctl -k` or `journalctl --dmesg` will show only kernel messages, like `dmesg`... Hope this helps somehow. rb

On Sun, 17 Dec 2023 at 17:52, Ron / BCLUG via talk <talk@gtalug.org> wrote:
Kevin Cozens via talk wrote on 2023-12-17 14:43:
Any clues as to why Debian takes 4 to 5 times as long? I'm hoping there is some bad configuration out of the box causing Debian 12 to be acting so slow. Anyone have any ideas where I should start looking? If I can't get to the bottom of the problem I will be staying with Linux Mint.
Try `dmesg | less` and see if anything eye-catching is in there.
Also, `journalctl` with some option like `--boot=-1` for *previous* boot logs, or for running in Mint with separate partitioning, `journalctl --directory=/path/to/debian/logs`.
Note that `journalctl -k` or `journalctl --dmesg` will show only kernel messages, like `dmesg`...
Hope this helps somehow.
One of my favourite recent discoveries are the abilities of `systemd-analyze`. `systemd-analyze blame` shows how long every step in the boot process took. It's worth looking at, but doesn't account for the fact that many of these things run in parallel. So to better understand what's causing the _real_ delays, try `systemd-analyze critical-chain`. The output is fascinating and I hope helpful ... but please keep in mind that I never got further than that so I can't tell you how to speed up the problem areas ... But the last command may at least focus your search in the `dmesg` output. -- Giles https://www.gilesorr.com/ gilesorr@gmail.com

Giles Orr wrote on 2023-12-17 15:19:
One of my favourite recent discoveries are the abilities of `systemd-analyze`. `systemd-analyze blame` shows how long every step in the boot process took. It's worth looking at, but doesn't account for the fact that many of these things run in parallel. So to better understand what's causing the_real_ delays, try `systemd-analyze critical-chain`. The output is fascinating and I hope helpful ... but please keep in mind that I never got further than that so I can't tell you how to speed up the problem areas ... But the last command may at least focus your search in the `dmesg` output.
This is an excellent tool! Thanks for bringing it up; I'm embarrassed to have forgotten to mention it. I just looked at mine and it's quite revealing. I recall now someone having slow boot issues and looking at their `systemd-analyze` output, it took a couple seconds to see that postfix was the culprit. rb

On Sun, Dec 17, 2023 at 05:43:58PM -0500, Kevin Cozens via talk wrote:
I have been a contributor to an Open Source project over a number of years. A lot of the devs seems to use Debian testing which means I often find I have to deal with (often minor, fortunately) dependency hell to be able to recompile the program when I haven't done so in a while.
I was trying out a Debian based version of Armbian and was impressed by how easy it was to get it up and running. I've been thinking of switching to Debian from Linux Mint. I decided to have another look at the Debian 12 install I have on one of the root partitions I have for other OSs. I was *not* impressed.
It took about 7 minutes to from boot to login page. It takes so long that the system that provides the splash screen during boot gave up and it changed to a black screen during the last part of the boot process. After I enter my name and password it took about another 7 minutes to get to the desktop. Under Linux mint boot to desktop takes about 3 minutes.
Any clues as to why Debian takes 4 to 5 times as long? I'm hoping there is some bad configuration out of the box causing Debian 12 to be acting so slow. Anyone have any ideas where I should start looking? If I can't get to the bottom of the problem I will be staying with Linux Mint. Perhaps LMDE might be worth a try instead of pure Debian.
In my experience slow boot time is almost always a network configuration problem causing some network service to take minutes to time out. Of course I wouldn't expect that if it is a fresh install, more likely after upgrading. -- Len Sorensen
participants (4)
-
Giles Orr
-
Kevin Cozens
-
Lennart Sorensen
-
Ron / BCLUG