[haiku-bugs] Re: [Haiku] #12258: [launch_daemon] increased boot time

  • From: "mmlr" <trac@xxxxxxxxxxxx>
  • Date: Sat, 29 Aug 2015 10:12:46 -0000

#12258: [launch_daemon] increased boot time
-------------------------------------+----------------------------
Reporter: diver | Owner: axeld
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: Servers/launch_daemon | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
-------------------------------------+----------------------------

Comment (by mmlr):

Replying to [comment:17 vidrep]:

I did a series of boots for Alpha 4.1, 32 bit and 64 bit. To be
consistent, I decided the system to be booted as soon as the blue screen
appears.

Unfortunately this isn't a good criteria at all. The introduction of the
launch_daemon made the (userland) boot process more parallel. This means
more servers are started at the same time. While this may make the
individual server start up more slowly (simply due to more happening in
the system at the same time), the overall boot time, i.e. the time it
takes until __all__ servers are ready, may still be reduced.

The blue screen may therefore appear later because the app_server init
takes longer. However at the point it does appear, all the other servers
have started as well and may even be ready completing the boot process.
Before the launch_daemon the app_server would be started early and the
blue screen appeared early due to that, all the other servers had to wait
for this to happen though and would only be started then, extending the
boot process away from the blue screen appearing.

There currently is no reliable way to determine when the system is fully
booted. Making the criteria "once all servers are launched" will for
example strongly favor the launch_daemon against the previous boot method
because it launches them all at the same time. This doesn't mean that the
launched servers are actually usable at that point though (the blue screen
isn't necessarily shown yet at that point for example), making this
criteria bogus.

One of the last things to happen in either boot method is the
UserBootScript. It's still far from ideal as in the previous method it is
launched in parallel with non-essential servers but after initial volumes
are mounted, while with the launch_daemon it is launched in parallel to
the initial volume mounting. Still it'd probably be the easiest way to get
a more or less useful number out of this by putting a symlink to
AboutSystem into "/boot/home/config/settings/boot/launch" (which will
cause it to be launched when the UserBootScript runs) and take a look at
the uptime when it appears.

Another measure could be to wait for the system to become idle after boot
(monitoring the CPU use in ProcessController for example). This still has
the problem for cases where the startup of a server isn't CPU but IO
bound, but in the normal case it should be reasonably accurate.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12258#comment:23>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: