Gentoo Archives: gentoo-user

From: Aidan Harris <me@×××××××××.is>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: ntp-client slows down the boot process
Date: Sat, 27 Jul 2019 06:42:30
In Reply to: [gentoo-user] Re: ntp-client slows down the boot process by Ian Zimmerman
1 On 27/07/2019 06:13, Ian Zimmerman wrote:
3 > Well, to play the anti-$DEITY advocate, you may also say that
4 > parallelizing helps you discover bugs in the dependencies that you
5 > otherwise never would.
6 >
7 > I have run fedora with systemd for a while, and I was able to make the
8 > boot wicked fast. But it wasn't automatic, not due to systemd itself
9 > but due to packages like NetworkManager doing incredibly wasteful
10 > things by default.
11 >
13 Speaking parallel of bugs...
15 I run openrc with rc_parallel enabled and I end up booting so fast that
16 by the time ntp-client starts DNS resolution is not properly available
17 yet (I use a local DNS resolver so even though networking is up my local
18 resolver takes a while - a small while, but enough of a while to be a
19 problem - to be "ready") so the service fails to start. To work around
20 this I added a few lines of shell to the start function:
23 # We boot so fast dns doesn't come up quickly enough
24 # By querying dns with nslookup we (hopefully) wait just long enough for
25 it to come up properly
26 egrep '^server' /etc/ntp.conf | while read -r server
27 do
28 set -- $server
29 server="$2"
30 nslookup "$server" > /dev/null 2>&1 && break
31 done
33 The second problem I had is even though I'm using rc_parallel ntp-client
34 likes to block the rest of the boot (this is a laptop, I really don't
35 need to block the whole boot just to make sure the time is set
36 correctly). To work around that I used another hack by starting it from
37 an @reboot cronjob.
39 I don't know what the proper idiomatic fix for these issues are, but
40 booting too fast is a real problem (a problem that disappears if I
41 disable rc_parallel but I want to boot fast!).
43 I've attached a bootchart showing ntp-client started from the default
44 runlevel versus started via the @reboot cronjob (the difference is plain
45 to see).


File name MIME type
bootchart.png image/png
bootchart_ntp-client-default-runlevel.png image/png


Subject Author
[gentoo-user] Re: ntp-client slows down the boot process Ian Zimmerman <itz@××××××××××××.org>