
Booting Linux in One Second [pdf] - tomkwok
http://elinux.org/images/9/97/Boot_one_second_altenberg.pdf
======
nileshtrivedi
Linux can be so amazing when configured especially for some tasks. For
example, Jack on linux can deliver audio latencies under 2ms! The problem is
that configuring Linux like this almost requires a CS degree.

~~~
i336_
I once had a brief conversation (via Reddit) with a guy using JACK for a
commercial (embedded Linux) networked audio system. I wasn't aware of the
exact specifics but I understand it was Sonos-style, embedded boards inside
speakers. He wasn't particularly interested in talking about the work his team
had done :P

I think that proves your point.

~~~
cpach
This is a quite paradoxal phenomen that happens to some open source projects.
The code is open and free, but some of the experts hold their knowledge very
close to their chest. It's totally understandable since they of course need to
make a living somehow, but it kind of defeats some of the benefits with open
source.

~~~
eitland
Roughly speaking it levels the playing field. With Open Source smart people
and companies that attract smart people get an edge.

~~~
cpach
Good point! But the hazard is that the we risk getting FOSS software that is
unnecessarily complex to configure because of this.

~~~
eitland
In my experience proprietary software is often far more complex, in fact in
another league than most FOSS SW for now (source: have installed and
reinstalled so many Oracle databases, Enterprise Manager and APEX
installations I have lost count.)

~~~
creshal
Depends on the software and author. Case in point: sendmail; virtually
everything ever made by RedHat (the software is free, but there's no useful
documentation if you're not a paying customer… cf. NetworkManager, PulseAudio,
GlusterFS … only systemd seems an exception, for now).

~~~
cpach
Good point! However, I would agree that server/system software that is "best-
in-breed" tend to be FOSS. But I'm afraid I have no studies or other hard
facts to support my case.

------
i336_
Here's another example of the same sort of idea:

[http://elinux.org/images/f/f7/RightApproachMinimalBootTimes....](http://elinux.org/images/f/f7/RightApproachMinimalBootTimes.pdf)

Also under 1 second, and the approaches this guy took are seriously
impressive. Lots of educational tidbits and "good-to-know"s in here even for
non-embedded types. Reads very quickly too.

------
legulere
1 seconds seems a rather arbitrary measure. In HCI 100ms seems to be the value
that's generally taken under which an action seems to be happening
instantaneously [1]

It's quite sad to see how we hardly use the computing power offered by our
modern computers to actually speed up common tasks, but instead bloat it up
with all kinds of stuff.

[1] [http://cogsci.stackexchange.com/questions/1664/what-is-
the-t...](http://cogsci.stackexchange.com/questions/1664/what-is-the-
threshold-where-actions-are-perceived-as-instant)

~~~
sharpneli
I completely agree with the general idea. Bloat is too high and has far
reaching consequences.

And it's actually even worse than that. 100ms is nowhere near enough to be
sufficient for all applications.

For audio applications you need 10ms
[[http://superpowered.com/androidaudiopathlatency](http://superpowered.com/androidaudiopathlatency)]
which incidentally is the reason why Android is unusable for any interactive
audio applications.

Same applies to Virtual Reality. You need sub 20ms latency for head tracking
to eyes latency or you will feel sick (effectively less than 10ms from the cpu
side. Display scanning is summed on top).

The 100ms figure applies mostly to traditional UI workflow. Whenever you need
a realtime interaction that's 10x too high.

~~~
jahnu
> which incidentally is the reason why Android is unusable for any interactive
> audio applications.

Everybody says this and yet programs like Caustic seem to do a fine job in my
experience.

~~~
hrnnnnnn
Have you tried performing using an android app? I used a drum-pad app the
other week and the latency makes it unplayable.

There's a great explanation here as to why it's so bad:
[http://superpowered.com/androidaudiopathlatency](http://superpowered.com/androidaudiopathlatency)

~~~
MarkyC4
This is fixed in newer Android phones:
[https://source.android.com/devices/audio/latency_measurement...](https://source.android.com/devices/audio/latency_measurements.html)

~~~
sharpneli
That's a relief. They are finally taking the issue seriously then.

There are also indications that they are going to lower the display path
latency, which also stands several times higher than what is in iDevices. It
just takes some time to get a certain class of software architects to realize
that buffering a frame several times each step might not be the smartest way
after all.

------
estomagordo
Has anyone booted the pdf in a minute?

~~~
weland
If you use an actual pdf reader instead of the JS-based in-browser crap, it's
quite instantaneous.

~~~
johansch
But javascript is so cool!

[https://bugzilla.mozilla.org/show_bug.cgi?id=1049218](https://bugzilla.mozilla.org/show_bug.cgi?id=1049218)

~~~
robin_reala
JS is also sandboxed, which seems to be a particular problem for traditional
readers. I’d trust PDF.JS to get faster more than I trust PDFium to not have
security issues.

------
dharma1
Was looking to boot to Qt under a couple of seconds for a camera use case a
few months back, and came across similar demos. Can work well for very
specific applications/products.

Here's a video of a talk by the author of this particular pdf

[https://www.youtube.com/watch?v=KTRA1PRJWH8](https://www.youtube.com/watch?v=KTRA1PRJWH8)

Will be interesting to see what impact Intel's 3D Xpoint will have on boot
times too.

------
smcl
Here's a video the same talk by the author -
[https://www.youtube.com/watch?v=KTRA1PRJWH8](https://www.youtube.com/watch?v=KTRA1PRJWH8)

------
asah
What about shutdown time?

(the steady state is that computers are running, so if it takes 30sec to
cleanly shutdown then your cycle time is 31secs... obviously, this doesn't
apply to stateless servers or that use write-through caching...)

~~~
cnvogel
The kind of device this kind of optimization applies to typically runs with
readonly flash, maybe only writing some config rarely... So, just pull the
plug.

------
listic
Why isn't any phone doing it? (either smart or feature variety)

~~~
dharma1
phones need to load a lot of stuff a boot time - this fast boot times are
achieved by stripping a hell of a lot of stuff out

~~~
listic
I would love to have a phone with a hell of a lot of stuff stripped out. I
guess manufacturers don't.

~~~
icebraining
Sure they do, they're called "feature phones". Wiko sells some decent dual-sim
models for $20.

~~~
listic
I have included "feature phones" in my original comment. None boot close to 1
second, and these, too, include a lot of functionality that I would like
stripped out.

~~~
icebraining
My $20 Wiko Lubi does boot in a second, or barely more (not counting PIN
input, I don't know if it's booting the background), and I can't complain
about having too much functionality.

------
amelius
An OS is recomputing the same functions over and over again when booting, so
why not cache all of this, and make it instant?

~~~
psi-squared
How much do you cache? Hardware is difficult because you could add/remove/swap
it at any time, and software information is already partly cached depending on
your OS.

IIRC, Windows a) builds a list of files to pre-load from disk based on your
usage, and b) doesn't actually fully shut down by default (it goes to
hibernate mode:
[http://blogs.msdn.com/b/olivnie/archive/2012/12/14/windows-8...](http://blogs.msdn.com/b/olivnie/archive/2012/12/14/windows-8-fast-
boot.aspx)). I don't know if any Linux distros do either of those by default,
but it is certainly possible.

Also, some BIOSes already have a "quick boot" setting which caches some
hardware information, particularly about memory. It usually comes with a
warning that you need to disable the setting for at least one boot when
installing RAM.

~~~
cm2187
But an embedded system wouldn't change between two reboots.

------
ww520
That's very impressive. Great for embedded devices, where the hardware profile
doesn't change from boot to boot.

------
titomc
Our team was working on a vehicle telmatics platform ( connected cars ). We
had a requirement in which the remote engine start time should be within 15
seconds from the time the customer clicked the start button on his phone. For
this the QNX running in the vehicle had a fastboot mode , which came up within
that timeframe , brought up the interfaces & established network connection to
our server and started the car. Once the car is started , the system will go
down and come back up in normal boot.

Now I know !

------
PinguTS
Presented by Montavista already in 2009:
[https://youtu.be/-l_DSZe8_F8](https://youtu.be/-l_DSZe8_F8)

There is also some documentation from Montavista from that time.

EDIT: The presentation by Montavista from 2008:
[http://www.freescale.com/files/training_pdf/VFTF09_MONTAVIST...](http://www.freescale.com/files/training_pdf/VFTF09_MONTAVISTA_LINUXBOOT.pdf?lang_cd=en)

~~~
nickpsecurity
And QNX before that. But, that's a well-engineered, UNIX-like microkernel
rather than Linux. Oh well...

~~~
dman
QNX was open source for a while, what is surprising is that there doesnt
appear to be an easily searcable version of the code available on google.

~~~
nickpsecurity
That was a bait and switch by management that I could tell. They got a bunch
of contributions from the community then pulled it. Or just felt that it
wasn't worthwhile after little contributions. I can't be sure.

Nonetheless, underlying technology is solid with that showing in Blackberry
Playbook.

~~~
dman
I regret not downloading the source code while it was available.

~~~
nickpsecurity
I lost my copy. Regrets here, too. Minix 3 is fortunately coming along nicely
and already resilient against driver faults.

------
csn
People are OK with frequently booting their mobile devices to temporarily "fix
bugs", which can take up to tens of seconds, but waiting a moment to boot a
desktop device? Nuh uh.

Of course there might be some market advantage to be had with faster booting
and it's a plus for the whole UX. And optimisation is definitely cool, though
I think many more problems would be solved if people were forced to think once
in a while, whether it's while waiting for the bootup sequence to complete or
a train to arrive.

~~~
Gys
The problem with a desktop is that most people have at least one and mostly
several applications running. Those need maybe saving as well, before
quitting. The mobile phones are better in that way: all apps are required to
save their state at any time. So rebooting can be a mindless procedure.

~~~
csn
You made me suddenly aware of the fact that I do not actually know how other
people use their phones.

~~~
Gys
'Mindless' ?!

------
digi_owl
Had to once more flog systemd as it that is the only fast alternative to
systemv...

------
vessenes
[deleted]

~~~
__float
I think you've replied in the wrong tab.

~~~
vessenes
Thank you!

