Debian 9 slow boot

If none of the more specific forums is the right place to ask

Debian 9 slow boot

Postby uthappam » 2018-08-06 14:50

Debian 9 XFCE 64-bit is my main operating system and Manjaro is on another partition on the same hard drive. The Manjaro GRUB controls booting. For some while now, Debian has been taking longer to boot than it did earlier. Could this be related to the settings in etc/systemd/system.conf?
uthappam
 
Posts: 208
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 slow boot

Postby Head_on_a_Stick » 2018-08-06 15:02

At a guess I would blame the systemd journal, do you have it set to persistent logging?

Try `systemd-analyze` to breakdown the boot process.
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8316
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian 9 slow boot

Postby uthappam » 2018-08-06 15:50

How is journal logging for systemd controlled? I found nothing about it in /etc/systemd/journald.conf or in /etc/systemd/system.conf.

In system.conf there is a line "DefaultTimeoutStartSec=90sec". Does it mean a delay of 90 seconds?

Report of "systemd-analyze":
Startup finished in 2.526s (kernel) + 36.456s (userspace) = 38.982s

... and that of "systemd-analyze blame" (the two longest times):
14.926s exim4.service
9.897s NetworkManager-wait-online.service
uthappam
 
Posts: 208
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 slow boot

Postby Head_on_a_Stick » 2018-08-06 20:24

uthappam wrote:How is journal logging for systemd controlled?

See journald.conf(5).

If you haven't changed anything then the logs should be non-persistent.

You can use the logs to analyze the problem, for example:
Code: Select all
journalctl -u exim4
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8316
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian 9 slow boot

Postby uthappam » 2018-08-07 02:47

Thank you. I looked at the link you gave. Logging is set to "auto" by default, it appears, and I have changed nothing.
uthappam
 
Posts: 208
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 slow boot

Postby debiman » 2018-08-07 08:41

boot into the "slow" system and execute
Code: Select all
systemd-analyze blame
and show us the output.
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18

Re: Debian 9 slow boot

Postby uthappam » 2018-08-07 09:28

I did it earlier, debiman, but I posted only the top two results. Here is everything that took 1 second or longer.
Code: Select all
9.677s NetworkManager-wait-online.service
          6.626s apt-daily.service
          4.238s ModemManager.service
          3.873s networking.service
          3.851s exim4.service
          3.595s dev-sda1.device
          3.013s systemd-logind.service
          2.987s clamav-daemon.service
          2.731s pppd-dns.service
          2.490s rsyslog.service
          2.118s avahi-daemon.service
          1.565s NetworkManager.service
          1.511s lightdm.service
          1.044s upower.service
          1.011s keyboard-setup.service
 
uthappam
 
Posts: 208
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 slow boot

Postby bedtime » 2018-08-09 19:52

Could you list your computer's specs? I ask as it looks like it might just be an issue of low 'horsepower' on your machine; everything seems in line with what I see so far, though I'm no expert. I remember my boot time to be about 30 seconds or so. On my new computer it's about >3 seconds. So, as you can see, it can make a huge difference.

That aside, there are perhaps a few small things that might gain you a second here or there at the cost of convenience.
OS: Debian GNU/Linux (Buster—testing); Kernel: 4.16.0-2-amd64; Shell: sh; WM: i3
Machine: HP ProDesk 600 G3—i7-7700, 8GB RAM, 256 SSD, Intel HD Graphics 630

bedtime
 
Posts: 93
Joined: 2012-12-16 19:34

Re: Debian 9 slow boot

Postby uthappam » 2018-08-10 01:35

This was in my first post: "For some while now, Debian has been taking longer to boot than it did earlier." My computer took less time to boot in the past. An unchanged machine has slowed down. I have not removed after-burner or turbo-charger.
uthappam
 
Posts: 208
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 slow boot

Postby sunrat » 2018-08-10 23:15

What's the output from:
Code: Select all
journalctl -b -p3


Also your "blame" result doesn't look too bad, only slightly slower than my Core2Duo. What's the output of
Code: Select all
systemd-analyze


Mine is
Code: Select all
$ systemd-analyze
Startup finished in 5.709s (kernel) + 13.236s (userspace) = 18.945s
graphical.target reached after 9.004s in userspace
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2495
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Debian 9 slow boot

Postby uthappam » 2018-08-11 00:55

Here is the result of "journalctl -b -p3"
Code: Select all
-- Logs begin at Sat 2018-08-11 06:46:07 IST, end at Sat 2018-08-11 07:01:47 IST
Aug 11 06:46:24 pappu avahi-daemon[437]: chroot.c: open() failed: No such file o
~


... and "systemd-analyze" gave
Code: Select all
Startup finished in 3.646s (kernel) + 46.182s (userspace) = 49.829s
uthappam
 
Posts: 208
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 slow boot

Postby uthappam » 2018-08-11 01:18

At
https://unix.stackexchange.com/question ... talling-it

I found
Code: Select all
sudo systemctl disable --now avahi-daemon.socket && sudo systemctl disable --now avahi-daemon.service

whose effect was
Code: Select all
systemd-analyze
Startup finished in 2.488s (kernel) + 24.000s (userspace) = 26.488s
uthappam
 
Posts: 208
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 slow boot

Postby sunrat » 2018-08-11 04:46

Nice! Gained 23 seconds. Does it seem to be booting in expected time now?
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2495
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Debian 9 slow boot

Postby uthappam » 2018-08-11 05:55

I did not time it, now or earlier: but it does seem to have speeded up. However, Manjaro on the same computer is faster. I hope I have done nothing dangerous by tinkering with Avahi. It's been a few hours and the computer has not exploded.
uthappam
 
Posts: 208
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 slow boot

Postby Head_on_a_Stick » 2018-08-11 10:05

Let's see what services are enabled, I trim mine considerably post-installation to get a sub-5-second boot time on a 2010 ThinkPad X201 :)
Code: Select all
systemctl list-unit-files --state=enabled --no-p

Enjoy the green prompt afterwards, I reported the bug and it is fixed upstream but not in the OS that I'm actually using, unfortunately.

Looking at your posted output, I would rip out exim4 (unless you actually use it) and also change from NetworkManager to either systemd-networkd or /etc/network/interfaces & ifupdown, both are signifanctly quicker than NM (and also lighter on resources & less buggy).
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8316
Joined: 2014-06-01 17:46
Location: /dev/chair

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable