Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] Resolved my slow bootup (systemd)  (Read 6214 times)

timc

  • Guest
[EN] Resolved my slow bootup (systemd)
« on: 2013/12/04, 16:49:46 »
I have been having a great deal of trouble with slow bootup time (30 seconds +), recently. This is not a support request, I am just describing some things I did this morning to resolve it.

Using "journalctl -b", I discovered that ntpdate was running before DNS was resolvable. Then, the bootup was waiting about 14-17 seconds before continuing. I added some workaround code into /etc/ntp.conf to allow it to sync to my local machine if it fails to connect to the ntp pool hosts. This eliminated the boot process delay that I saw in the journal, but my system still did not complete booting much faster.

Running systemd-analyze showed me that preload.service was taking almost 12 seconds. I ran a Google search on "Debian preload" and found a tip to delete file /var/lib/preload/preload.state. That did the trick! My next reboot was quite slow, but the second reboot (after preload.state had been reestablished) was the fastest I have ever seen on this system, 13.486 seconds!

Maybe this can help others or generate some conversation.

One question I still have is, why does ntpdate start before the network is accessible? Another question is, why does ntpdate start at all?

Tim

timc

  • Guest
Re: Resolved my slow bootup (systemd)
« Reply #1 on: 2013/12/04, 19:04:16 »
Ok, I found out why ntpdate is started. It comes from script /etc/network/if-up.d/ntpdate

I disabled it by renaming /usr/sbin/ntpdate-debian to ntpdate-debian.old. Now my system boots even a little faster.

According to an old Debian bug from early 2009, they were trying to deprecate ntpdate. They said it is full of bugs and is no longer maintained. Apparently, the deprecation never occurred.

Tim



Offline ragupo

  • User
  • Posts: 11
Re: Resolved my slow bootup (systemd)
« Reply #2 on: 2014/03/26, 22:06:43 »
Purging ntpdate cut off 41 seconds of boot time for me. Thx for the advice

timc

  • Guest
Re: Resolved my slow bootup (systemd)
« Reply #3 on: 2014/03/26, 22:22:51 »
You are welcome.  :)

Tim

Offline GoinEasy9

  • User
  • Posts: 560
Re: Resolved my slow bootup (systemd)
« Reply #4 on: 2014/03/27, 03:09:56 »
Thanks Tim.  I wish I would have remembered this thread before I went on my adventure with systemd services.

For those that would like to see more discussion on this topic, look here:  http://forum.siduction.org/index.php?topic=4404.new#new
Linux Counter number 348347