tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

slow multiuser boot



Hi,

some weeks ago I noticed that the rc-controlled multiuser boot in netbsd-7
and current has become very slow, which especially affects smaller single-
CPU platforms.

I think that much of the problem comes from the workaround for PR 48714,
which introduces a background process in rc, which sends a "nop" every
three seconds. Removing this passage from rc:

--- rc.orig     2015-01-16 22:17:31.000000000 +0100
+++ rc  2015-05-31 14:47:06.000000000 +0200
@@ -120,24 +120,6 @@
        kill -0 $RC_PID >/dev/null 2>&1 || RC_PID=$$
 
        #
-       # As long as process $RC_PID is still running, send a "nop"
-       # metadata message to the postprocessor every few seconds.
-       # This should help flush partial lines that may appear when
-       # rc.d scripts that are NOT marked with "KEYWORD: interactive"
-       # nevertheless attempt to print prompts and wait for input.
-       #
-       (
-           # First detach from tty, to avoid intercepting SIGINFO.
-           eval "exec ${_rc_original_stdout_fd}<&-"
-           eval "exec ${_rc_original_stderr_fd}<&-"
-           exec </dev/null >/dev/null 2>&1
-           while kill -0 $RC_PID ; do
-               print_rc_metadata "nop"
-               sleep 3
-           done
-       ) &

... makes booting noticable faster. In this case from 5 minutes to 4 minutes.
From /var/run/rc.log:

Original:
[/etc/rc starting at Sun May 31 13:27:54 CEST 2015]
...
[/etc/rc finished at Sun May 31 13:32:55 CEST 2015]

Without "nop":
[/etc/rc starting at Sun May 31 14:48:48 CEST 2015]
...
[/etc/rc finished at Sun May 31 14:52:59 CEST 2015]


There are probably other factors involved to make booting much slower
than under netbsd-6, but this one is unnecessary.

I never experienced the problem which it tries to fix, but could we at
least have an option to disable it?

-- 
Frank Wille


Home | Main Index | Thread Index | Old Index