World record in Linux boot time! 1 Second :)

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

World record in Linux boot time! 1 Second :)

#1 Post by nooby »

But it is a special built one for the Car Industry needs.

software in cars needs to be fast or the rumor of a slow acting car software get spread real fast.

http://www.electronicsweekly.com/Articl ... second.htm
MontaVista Software has always been a leader in embedded-Linux commercialization. The company has developed Linux-development platforms since 1999, when founder Jim Ready pledged to bring "100% pure Linux" to the world under the GNU (GNU's not Unix) GPL (general public license). Since then, MontaVista has specialized in embedded and real-time Linux.
Distrowatch have them and many others under Embedded Linux distributions. so most likely it means one have to be a developer to get access to their linux distribution.

But it could inspire others to try out things from the description they make.

Here is one of their linux OS programs.
http://www.mvista.com/product_detail_mvl6.php

Here about a "mobile" system.

http://www.mvista.com/product_detail_mob.php
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#2 Post by technosaurus »

It is 100 times easier to get a specific system to boot fast than it is to make a system that will boot a variety of systems fast.

Much can be hard coded if the hardware is known and there are few boot options.
Many unnecessary drivers can be eliminated thus decreasing the size of the kernel.
The kernel is small enough to be stored uncompressed in fast ROM
Fast ROM can execute code in place via XIP (doesn't even need to load into RAM)
The kernel can be better integrated with the bios (or vice versa).
Because hardware is known - no need for external modules
Because there are no external modules, no autoload process is needed.
Because the filesystem is fixed, no need to have a process that detects them.
.... anything that can be different from one system to another takes extra code (usually via shell scripts which are slower than compiled C) - all of which make a distro boot slower than a system specific embedded boot.

This is how it was back in the early days of personal computing - each vendor knew their hardware and programmed specifically to it.

gentoo used to attempt these types of performance gains, but not many people want to spend hours recompiling, testing and configuring a personal kernel to save a few seconds of boot time. With the speed of kernel development, the cost benefit analysis never works out, unless it is for an educational excercise.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#3 Post by nooby »

Yes it is unfair to compare under different circumstances.

What about the Splashtop thing on Asus and other motherboards? These are most likely optimized somewhat?

can those be used by linux developers to make use of same boot configuration or maybe that is too restrained set up?

What is realistic to expect then? What time span is realistic to aim at?
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#4 Post by technosaurus »

anything less than about 5 seconds to boot on typical modern hardware would require dropping support for older hardware - things like parallel, serial, isa, scsi and others would probably go by the wayside and ext4 would be used for all ext partitions (as of 2.6.33 the ext4 driver also supports ext2 and ext3) ntfs support adds ~0.5 seconds to boot time due to the large drivers so it would likely go.

Splashtop speeds could be achieved using high speed flash with AXFS (similar to XIP, but compressed in less used areas) For an example that doesn't use AXFS or XIP try xPUD... eventually Barry plans to try something similar with Quirky.

PUD has a unique interface that is very firefox centric ... "there is no data, only XUL"
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

Re: World record in Linux boot time! 1 Second :)

#5 Post by DMcCunney »

nooby wrote:But it is a special built one for the Car Industry needs.

software in cars needs to be fast or the rumor of a slow acting car software get spread real fast.

http://www.electronicsweekly.com/Articl ... second.htm
The question I have for an embedded application like this is why Linux was used at all.

If you have particular known hardware, so only a limited set of drivers is required, and it will be running a dedicated application, I'm not sure I see the point to running a general purpose multitasking OS kernel.

There are an assortment of RTOS products out there, mostly much smaller and faster in the circumstances they are used for, and it may make more sense to use one.

Ah, well. I'm not Monte Vista's client who wanted Linux under the hood, and have no idea what their reasoning was.
______
Dennis

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

#6 Post by DMcCunney »

nooby wrote:Yes it is unfair to compare under different circumstances.

What about the Splashtop thing on Asus and other motherboards? These are most likely optimized somewhat?

can those be used by linux developers to make use of same boot configuration or maybe that is too restrained set up?

What is realistic to expect then? What time span is realistic to aim at?
That's impossible to say.

If you have the hardware, many things are possible...if you have the hardware.

You may remember the Commodore 64, which was "instant on". Turn on the power, and your screen lit up. The 64 embedded critical stuff in ROM. There was an 8K "kernel" ROM, and an 8K ROM containing an early version of Microsoft BASIC. BASIC was your shell, and when you turned on the machine, you were in the BASIC interpreter, which expected you to enter program code.

If you have enough non-volatile memory, you could embed the Linux kernel. In fact, it's done a fair bit. My Linksys router, for example, uses a 2.4 Linux kernel and Busybox to provide a subset of the standard CLI utilities. Turn it on, and it's up and running in a second or so. But it's a bit like the automobile usage mentioned in the article. It's running on specified, unchanging hardware, and can be built with just the drivers required.

Booting Linux that quickly would first require enough fast non-volatile memory that the Linux kernel could live in it, and not have to be loaded from disk. Relatively speaking, disks are slow, and a significant amount of boot time will be the loader simply locating the kernel on disk, loading it into memory, and starting it executing.

I believe Hitachi has been doing some development efforts with laptops have Windows core modules in flash for fast booting. We'll see more stuff like that as the cost of flash memory drops. It's theoretically possible to make a laptop that doesn't have a hard drive, and does everything in flash, but at the moment it just costs too much for general usage.
______
Dennis

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#7 Post by sunburnt »

yep... If you have one set of hardware you don`t need lots of boot code to figure it out.
In fact most of Puppy`s boot code does exactly that, and finding itself of course...
Driver modules can be compiled into the kernel ( no loading...), etc., etc...

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#8 Post by ttuuxxx »

I don't know guys, My dusty trusty Coomodore 64, is much faster than 1 second, its instant, lol well they did come with a very small built Os built on a eprom. but it still was a operating system, built on a chip, and as soon as you turned the power on, the blue cursor was blinking, 0 second I would say, back then they didn't have hard drives, just tape drives and later on very big floppies.

C-64 --> 00 sec
Linux --> 01 sec
MS --> 03 mins
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#9 Post by nooby »

Yes, yes yes, sorry me let us all be misled that way.

I accept that what they have done is not possible on unknown gears.

But the Xpud thing was cool. Almost under 7 seconds flat.

Very fast regardless them not knowing anything about my computer.

but Puppy 431Std is fast too. Some 27 seconds compared to SuperOS in frugal install takes some 180seconds or 3 minutes

But sadly Xpud on my HP failed to get wired LAN connection to internet.
I use Google Search on Puppy Forum
not an ideal solution though

davesurrey
Posts: 1198
Joined: Tue 05 Aug 2008, 18:12
Location: UK

#10 Post by davesurrey »

nooby:
In my system, at least, I get much faster boots of full installs of puppy than frugals. But I know you don't want to go this route. Just for info.

ttuuxxx
Yes I have an instant-on Palm Tungsten T3 PDA on my desk and when you have experienced instant-on it's hard to accept any boot time as anything other than a challenge. And battery life in days not hours. In that respect PCs, laptops and netbooks have a long way to go.

Dave

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#11 Post by ttuuxxx »

davesurrey wrote:nooby:
In my system, at least, I get much faster boots of full installs of puppy than frugals. But I know you don't want to go this route. Just for info.

ttuuxxx
Yes I have an instant-on Palm Tungsten T3 PDA on my desk and when you have experienced instant-on it's hard to accept any boot time as anything other than a challenge. And battery life in days not hours. In that respect PCs, laptops and netbooks have a long way to go.

Dave
yes Dave that's why I can't wait until I get my hands on a gecko-surfboard :)
I really don't like laptops, but the surfboard reminds me so much about the C-64, I'll have to get one, hack the board with my soldering gun and build a custom Os on it, maybe even try LFS. like a 40MB operating system, with Geany, Abiword, Firefox, Gimp, Gxine, Gaculator, BMP and that's about it. most other software I never have a need for. But Hey I won't even try that for another year or so, lol
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#12 Post by nooby »

I have not measured with a watch or something but from pushing the Power button up to where one can chose what to boot it takes almost as long as booting.

So a linux that just sleeps and are waked up in a few seconds would be nice.

It can boot slowly as long as it wakes up real fast. :)

But rumors says many hardware and linux distros are not good at doing such things, they fail to get wired connection after been waken up.

I have not dared to test it.

Hahahah I a hopeless distro jumping junkie now. I have some 18 different puppes and then SuperOS Ubuntu, Linux Mint, Slitaz, TinyCore and now Xpud that start some 7 second after chosen in menu.lst but to get to menu.lst takes more than 7 seconds.

I am beginning to love Pup-431Std more and more. Unless the coming Lighthouse 44G is sensational I may settle with Pup-431Std for now because it can do everything I need up to now. Streaming video and audi from TV and Radio stations here locally and it play .flv and MP3 and MP4 and Mpg and Avi and show Gif and Jpg and Png and play Spotify under Wine so what more can I expect. Do I have any need for the other 17 puppies at all? Pup-431Std is all I need?
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#13 Post by sunburnt »

Full install boots fast because no searching for it`s files, it just mounts the partition and runs.
Also there`s no union FS to slow it down and take up resources, but still have to load modules.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#14 Post by nooby »

The good thing about frugal install is that I have been able to test some 20 different Puppies in frugal install. Not as easy to do if one have to do full install of all of them.

Yeah I know one can test them on CD/DVD or USB or from a VM or Vbox Emulation something.

But it is not as practical as having all those 20 puppies available on same menu.lst
I use Google Search on Puppy Forum
not an ideal solution though

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

#15 Post by DMcCunney »

ttuuxxx wrote:I don't know guys, My dusty trusty Coomodore 64, is much faster than 1 second, its instant, lol well they did come with a very small built Os built on a eprom. but it still was a operating system, built on a chip, and as soon as you turned the power on, the blue cursor was blinking, 0 second I would say, back then they didn't have hard drives, just tape drives and later on very big floppies.

C-64 --> 00 sec
Linux --> 01 sec
MS --> 03 mins
ttuuxxx
Yeah, well, when your OS kernel is all of 8K, and BASIC is another 8K, and you run at an awe inspiring 1mhz, "instant on" is possible.

Actually doing anything aside from typing BASIC code in the built-in interpreter took a bit longer... (IIRC, the 1541 floppy was connected by a 300 baud serial interface. You grew old and grey waiting for stuff to load.)

Still, the C-64 had some net ideas The VIC and SID video and sound chips had interesting capabilities. And the 1541 floppy drive had its own 6510 controller chip and 2K of ROM, so you could download machine language code and have it run asynchronously on the drive. (I recall a C-64 DBMS vendor or two used that capability.)

The main hobble on the 64 was "design to cost", like the ultra-slow floppy drive connection, and ultimately, costs are still the hobble.
______
Dennis

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

#16 Post by DMcCunney »

sunburnt wrote:yep... If you have one set of hardware you don`t need lots of boot code to figure it out.
In fact most of Puppy`s boot code does exactly that, and finding itself of course...
Driver modules can be compiled into the kernel ( no loading...), etc., etc...
And one of the standard things Linux users used to do was get the source and recompile the kernel. Generic kernels are...generic, built to work with the widest range of hardware. If you know what hardware you have, you can recompile the kernel to include only the bits you need for a smaller, faster, and more efficient system, and do thing like build in the drivers rather than load them at boot.

It's not done that much now, I suspect because hardware has gotten fast and cheap enough that the performance gain isn't worth the effort involved.
______
Dennis

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#17 Post by technosaurus »

Top 3 things that slow Puppy down

a lot of the boot time delays in puppy regarding searching for files is either for backwards compatibility or lack of coordination between the installer script and the init script - not sure which. phome/psubdir should be included by default in every install so that those scans during init are unnecessary. I'm only about 80% familiar with the init process and ~90% with the frugal install script, so I've been hesitant to make the changes myself.

Also copying of the sfs into ram could begin as a thread early on in the init sequence and run concurrent with the rest of the init sequence ... leaving a breadcrumb for the pivotroot sequence to check before running

Adding the modules.dep is already supported but you have to enable it in the woof build (trades 1-2 seconds of boot speed for <1Mb size)

Just my 2¢

The command line setup interface also increases the perceived boot speed. I have addressed this before for keyboard, language and mouse for sidder's hsb puplet, but have yet to come up with a good way to do it for video (too complex for the time I had) or timezone (was not supported). I would suggest en_US, detected mouse, UTC timezone and xorg video at the top resolution and bit depth, with a gui that pops up at first boot to allow any necessary changes.[/code]
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#18 Post by smokey01 »

What would be nice to see is a very fat Puppy that has all the drivers to work on the majority of computers. Once the live CD/DVD is booted it determines what drivers are actually required for the individual hardware and all unused drivers are stripped out and a new OS is created just for this one machine. This would reduce the current distro size significantly and I expect also the boot time. I think Puppy does this to some degree within the pupsave file.

I think Jemimah has used this method for pupeee.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#19 Post by technosaurus »

I worked on a script about a month ago to do exactly that - zdrv cutter
... still needs testing to work out the corner cases though
goingnuts has adapted it for pup'n-go (resulted in 3MB zdrv sfs including the modules.dep - down from over 20MB)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#20 Post by smokey01 »

technosaurus wrote:I worked on a script about a month ago to do exactly that - zdrv cutter
... still needs testing to work out the corner cases though
goingnuts has adapted it for pup'n-go (resulted in 3MB zdrv sfs including the modules.dep - down from over 20MB)
Excellent technosaurus.

I've been thinking about this for a long time now but I just can't seem to find the time and I probably don't have the tech skills anyway.

Another enhancement that I think would be good is to have a separate config file to the pupsave file. The config file would save all of your settings. I couldn't count the amount of times when I've had to create a new pupsave as it got trashed because of some sofware I had installed. I know it creates another file but I can see some advantages especially if the config file was plain text and easy to manually edit.

I actually like the idea of having additional software included by the SFS method as it keeps the pupsave file size down.

Post Reply