Jimmy Wennlund has been doing to Linux what Apple has done to Tiger: Make it boot faster. Jimmy wrote initng, a replacement for the Sys-V style “init” application. It allows for better service dependency checking and will start services in a highly parallel fashion, dramatically speeding up the Linux boot process.initng , like Apple’s launchd, breaks somewhat from the traditional Sys-V style init scripts. It is however very easy to configure and setup. Unlike launchd, it does not use XML for it’s configuration files.
Initial tests show that initng can dramatically speed up the boot process on single processor machines, and should result in even higher gains on multi-CPU machines. initng is currently considered beta-quality software and will require additional users, documentation writers and developers to become a very viable alternative for Linux users.
Amazing nobody thought about that earlier…
First Apple and Microsoft (OSX and XP) had to come along to show the benefits of starting services asyncronously…
But how will it, for example, detect depencies in my custom service?
i.e. I have a service for “ipfw” that will depend on network being started first (not only started, but having obtained an IP address in fact). How will initng detect that dependency?
That is quite cool to know there is a way to speed up the Linux boot process. I am definitely gonna try this out when I install Gentoo on my machine.
Obviously, dependencies will still be checked. It says “highly” parallel fashion, not totally. But once all dependencies have been satisfied the service can begin immediately instead of waiting for its turn.
Anyone know what tools was used to draw the charts?
> But how will it, for example, detect depencies in my custom service?
initng doesn’t “detect” dependencies. Instead, you tell it what the dependency is in a very easy configuration file.
It is about time someone took a serious look at this and thank you OSnews for lending a hand. Also, for those looking to create a boot chart seen on that site see http://www.bootchart.org/
I had lots of fun benchmarking my system tweaking and trying to speed up the boot process.
> Maybe I am wrong, but doesnt have some distributions (like gentoo – dont kill me for mention this distribution) a init system which can boot in a parallel mode?
Yes, Gentoo has a “parsallel” mode. However, it doesn’t work nearly as well as initng. It still waits on some processes unecessarily and doesn’t resolve dependencies enough.
Going from standard Gentoo with parallel mode to initng cut the init time in half on my machine.
The sample scripts are very Gentoo orientated. It’s not a criticism (Can’t expect the author to keep up with all distros), it just means that it takes some effort getting initng to work with anything but Gentoo.
Daemon tools and cousins like runit have existed for a while now.
http://smarden.org/runit/benefits.html That’s runit which is heavily based on Daemon Tools. IIRC gobolinux uses this and it’s incredibly speedy boot time. There are a few others.
Just need a big distro to pick it up, mind it’s being attempted in Debian — but all things Debian are slow moving it seems — it does qualifies in the big-ness department, however.
Today I announce that I’m ashamed to be a geek because I couldn’t understand the graphs and all that. I’ll just have to take your word for it being faster, and download it over the weekend and try it out.
Tiger has great thinks, another one is AUTOMATOR!
some info: http://www.eweek.com/article2/0,1759,1622168,00.asp
GNOME & KDE devs please read!
can’t wait for this to appear in a major disto, like fedora, suse or ubuntu!
is ugly..looks like perl internals
Linux is becoming good on laptops and is being dual-booted a lot more. If it’s the only OS on a single OS system that’s not mobile then there’s not much care for boot times.
Suddenly laptops are selling as much as desktops so it’s becoming a real issue.
And for Apple laptops are selling twice as much as desktops.
Hummmm ,last time I looked the MAC OS includes: Apache, Samba, My SQL, Free BSD, PHP and several other things that Apple didn’t create. (Their server includes even more) Not like Apple has not done it’s fair share of copying.
That is why they can focus on things like AUTOMATOR because they don’t have to focus on other parts of their OS because those parts are not developed by them.
is ugly..looks like perl internals
That’s funny, I’m writing my own perl based init system to do something very similar. It will be interesting to see if they can do it better. I gotta check this out.
Please dont write another init system, when nothing new is in there which needs a complete reimplementation. If you want do a init system join runit, initng, sysv,…
Its not needed to have 50 nearly same init systems. This would split the developing people too much. Ok, if you want to implement something real new and phantastic…do it
What about KDE’s Kommander?
They are similar, dunno who started developing first.
That is why they can focus on things like AUTOMATOR because they don’t have to focus on other parts of their OS because those parts are not developed by them.
Whoa… I seem to recall there’s an OS out there which is simply a kernel, and everything else included comes from other sources. I must have a ref somewhere…
Parallel init systems have been floating around for ages, initng nor launchd are the first to do this. And arguably Windows XP was the first OS to really place a big emphasis on bootup time.
It’s one of those things that’s easy to write, hard to get adopted mostly because there are bazillions of distros and they it tends to be hard to get them to pay attention to this sort of thing. But who knows, maybe this time will be the right time.
“That is why they can focus on things like AUTOMATOR because they don’t have to focus on other parts of their OS because those parts are not developed by them.
Whoa… I seem to recall there’s an OS out there which is simply a kernel, and everything else included comes from other sources. I must have a ref somewhere.”
Yeah, except the previous poster wasn’t referring to Linux but to OSS in general. The claim was made that the copying is from Apple, and yet without OSS there would be no OS X and no Safari. The point is everybody copies and “borrows” from everybody else.
The point is everybody copies and “borrows” from everybody else.
There is no point at all. Someone said it would be great if a given feature of OS X were copied, and then someone had to whine about how is it Apple that copies others. The original person only wanted to have a feature, not begin a discussion on who copies what.
He reduced the boot process from 40 seconds down to 20 seconds. That’s very admirable and I don’t want to take anything away from that. But, I do want to point out that his ‘fast’ 20 second boot is to bash. He is not booting to a desktop environment like KDE or Gnome, which will add another thirty seconds.
In other words, even with his new boot system, it will still take over a minute to boot to a GUI screen from power on. Meanwhile, Apple is cold booting from power on to GUI in under 10 seconds!
That claim that Tiger is going from cold startup to desktop in 10 seconds, is that true? Awesome if it is.
But – i’m a Slackware guy, anyone tried this with Slackware and gotten it to work? Waiting 1-2 minutes for your box to fully boot feels so 1995 all of a sudden.
Meanwhile, Apple is cold booting from power on to GUI in under 10 seconds!
Bullshit. I’ve never seen a OS X boot that fast on any machine. Where’d you get those numbers? Spinning the little startup thing doesn’t count as “GUI”.
> He reduced the boot process from 40 seconds down to 20 seconds. That’s very admirable and I don’t want to take anything away from that. But, I do want to point out that his ‘fast’ 20 second boot is to bash. He is not booting to a desktop environment like KDE or Gnome, which will add another thirty seconds.
You’re wrong.
Before initng my machine booted in 46 seconds GRUB to KDE login prompt. After initng, the same machine boots GRUB to KDE login prompt in 29 seconds.
My kernel – which is probably not very optimized – takes about 15 seconds to initialize hardware. So the “init to kde” part went from 31 seconds to 14 on my machine.
Mind you, I would certainly not complain if my machine would boot up in 10 seconds flat, but that is no reason to under apreciate initng and what it does to the boot process already.
Cheers,
Andre
PS: My machine is not high-end – it’s an AMD Athlon 1800Mhz with a slow 2.5″ notebook hard drive.
10 seconds? Not even close. Much better than 10.3 but nowhere near 10 seconds.
Do you see 10 seconds here anywhere?
http://www.macinfo.de/bench/macosx.html#booting
Granted, no Tiger data, but somehow I doubt that Tiger improved boot time by 300%.
How does it improve on the original Richard Gooch program?
http://seth.positivism.org/man.cgi/8/simpleinit
You know, the one in the util-linux package included in every distro since the epoch buildable with a
cd login-utils
make HAVE_KILL=yes HAVE_SLN=yes all-getty all-init all-misc
make HAVE_KILL=yes HAVE_SLN=yes install-init install-getty install-misc
Will my init scripts for it work with NG too?:
http://gnnix.org/base/root/dist/usr/src/gnxbootscripts-0.1/sbin/ini…
If any daemon dies, initng will sense this and try to re-spawn it by any meens,
this is relay important on server systems that requires an constant uptime for services.
Is that really a good idea for anything other than a getty, if a process was that important shouldn’t it be clustered or running under inetd? Is it configurable, it sounds like you have no choice.
can’t wait for this to appear in a major disto, like fedora, suse or ubuntu!
Fedora (currently Core 4 Test 2) has similar feature called early login.
http://www.redhat.com/archives/fedora-test-list/2005-April/msg00416…
But – i’m a Slackware guy, anyone tried this with Slackware and gotten it to work? Waiting 1-2 minutes for your box to fully boot feels so 1995 all of a sudden.
I haven’t tried it, but I did manage to get my Slackware install boot from GRUB to XFCE in 21 seconds (it was 17 seconds for a while, but I made some changes that increased it again), if only the BIOS didn’t take 8 seconds to initialize and run it’s checks. Slackware is fairly easy to optimise the boot scripts for if you want to improve your boot time.
It seems that the Fedora thing is nothing then a “start gdm early and boot the rest like normal”-thing. This can be reduce the startup time for a desktop user, when nearly no script/daemon/.. is needed for gdm, but will not reduce startup time in generally. I think that initng will do a better job here (fine grained dependencies -> gdm/kdm/xdm/… will load very early and all other daemons/scripts/… will also start very fast).
that plain boring. i font know why he want to write an initscript but it really dosent mater.
i have personaly never written any init script. But if i was thinking about joining a existen project i would probobly write my own script first. cus then i would know more when i join a project and i would be of much more use.
the fastest way to learn is to do
joinig a existen will not make you learn that fast.
Oh, Kommander is way older than Automator. It’s been around for a couple of years now. Of course, it was hardly the first. In any case, what the OP is asking for has already been implemented — now go use it
I blogged about the Tiger startup speed issue. You can check out my launch time here:
http://www.idyll.org/~n8gray/blog/2005/05/03#tiger-booting
I don’t mean to denegrate initng because I think it’s a great idea to get this into Linux systems, but parallel launch is only a part of what launchd is all about. It doesn’t just replace init, it also replaces crond, xinetd, and a host of other random stuff, unifying the interface for launching daemons. It also factors out all of the annoying, error-prone stuff that a daemon has to do to be a daemon (closing file descriptors and such). Linux folks should look at that sort of unification as well.
So when will I be able to see this in the portage?
Anyone tried automatically launching ‘startx’ under a user account immediately after initng? Yes – there are security concerns with this, however this would be similar to the ‘autologin’ feature in Windows.
initng + autolaunching something like fluxbox (as opposed to GDM) might be able to bring the time-to-GUI into the sub-20 second range.
Why dont bring up gdmconfig and type in your username in auto login username: ??
booting fast is cool and all but on my desktop boxes i reboot my linux systems about once every few months…. or when i add new hardware
side note though….. on laptops.. booting fast is much more important….. i’ll be giving this a shot on my lappie
Once Xorg advances a bit more….. Windows XP will be no more on my laptop (just need better s-video out support because i do a lot of presentations)
Anonymous (IP: —.69-93-172.reverse.theplanet.com)
>Before initng my machine booted in 46 seconds GRUB to KDE login prompt. After initng, the same machine
>boots GRUB to KDE login prompt in 29 seconds.
So you made your machine boot faster saving a whooping 17 seconds each boot. That’s extraordinary useful, how many times do you boot your computer each day 1, 2 or perhaps even 10 times? If I do the same I’ll save something under 2 minutes a week, wonder what I’d do with all that extra time. Please tell me, how long did it take you to set it up?
I’ve got Tiger on my mini and I was astonished by how fast the boot time is versus 10.3. I count 20 seconds between “dong” and seeing the Dock. It’s probably even faster on a G5.
Why would you write the init program in perl, wouldn’t it be better for the code to be compiled as a binary instead of depending on perl? Sorry, that just doesn’t make sense to me.
I haven’t rebooted on purpose in a long, long time. sure on development machines reboots are often, but production servers have about no use for this. I could see something like this combined with the linux bios project to give embedded devices a quick boot configuration that would be very valuable.
also, don’t hold your breathe for this to appear in any live cd distributions like knoppix or ubuntu either. CD distributions would just slow down as accessing several programs at once from a cd will just slow down the process due to the long access times. for a cd to operate properly, linear data is best. Now if they could figure out a way to make a cd distribution “restore from hibernate” as it’s boot process, then they’d have something.
Hey, better dep-cheks and faster startup time is only 1 feature discussed here.
Using the ngc tool following you can se the current status of the, system, brows respawn history, and control everything.
I am working to make initng using modular plugin design, then its realy room for lots of improvments, daemons started on demand, nice progressbars, special program hang control etc.
There are many new features in it alredy, please try it out, and you will see.
/Jimmy Wennlund
I installed Darwin 8.0.1 on my powerbook 1.33 Ghz.. and its easily the fastest booting OS i’ve ever used on this or any other machine. it doesnt start aqua or anything, but booting to a login: prompt does take under 10 seconds, probably closer to 8. Its very very fast. If this is something similar to launchd, but for linux, that’d be great!
Good ole beos 5 was a fast boot up dont remember how many seconds but i remember it was quick and I had a p3 450mhz slot 1 with 256mb of ram at the time. I miss beos…
initng is the icing on the cake on my genoo + gnome 2.10 notebook – booting is incredibly fast. great job!
so Unix was fairly early on in the timesharing multi-programming world, and we’re just barely getting around to using multi-programming techniques in the init process? wow… woulda thought someone would’ve jumped on this one sooner.
anyway, great work to the author. very impressive reduction of i/o wait. can’t wait till this project matures.
As I said in the title, it’s been done before. Linux users wanting to speed up the boot process would simply have the services start in the background by simply adding an ampersand (&) to the commands they issued. Obviously, this is a hack that doesn’t do half of what initng does, but it’s nothing new.
…but hopefully it gets enough attention to be included in a major distribution. I downloading a gobolinux distribution with runit to test it (runit). I really think that it is maybe good, but initng has some gentoo enthusiast behind it and got really big attention through osnews (omg, hopefully his machine – dyndns – will not explode when this message arrives at slashdot). I think that it will be adopted by many other desktop/laptop distributions when gentoo uses initng or another equivalent initsystem.
I only hope that it will have a more linear init for livecds and other mediums which are to slow for non linear access. When we have something like this we can replace the old init systems with only one new init system. This would really help to push everything in one direction (for example one style of init scripts).
But someone must help him to write some design documents (someone who speaks better english then I do ).
This looks very interresting.
Maybe they can add a functionalty like Microsofts BootVis (XP Powertoy) too, which organizes the files needed for fast access on the disk.
>Maybe they can add a functionalty like Microsofts BootVis (XP
>Powertoy) too, which organizes the files needed for fast
>access on the disk.
If initng use inotify it could monitors files that are accessed during boot time.
then using readahead like it’s done in ubuntu:
http://ftp.ankara.edu.tr/ubuntu/pool/main/r/readahead/readahead_1.0…
you can:
1) put theses file in order they are accessed on the first block of the filesystem (fileordering.c)
2) load them in memory before there are accesed (readahead.c)
using these 3 things, i think you have the same functionnality as you were asking for, and it’s really few lines of code (less than 300).
>Please dont write another init system, when nothing new is in
>there which needs a complete reimplementation. If you want do
>a init system join runit, initng, sysv,…
>Its not needed to have 50 nearly same init systems. This
>would split the developing people too much. Ok, if you want
>to implement something real new and phantastic…do it
Speaking as someone who has some linux knowledge, but would not consider myself and expert, The current init systems (Both the v5 and the BSD versions) are years old, are creaky, very unfriendly and slow.
Have you tried to install an application on startup that doesnt come with a script?
As with any program, it gets revamped depending on what you consider to be its aims should be.
Currently the main aim seems to be to make it faster.
I think they should also make it easier to use, however as i dont have dont have the spare time do put some work in myself, my opinion doesnt mean much.
Can I install it cleanly on gentoo? I see there are ebuilds on initng site and some people here has already installed it on a Gentoo…does it break anything? I’m very tempted in trying it…
>so Unix was fairly early on in the timesharing >multi-programming world, and we’re just barely getting around >to using multi-programming techniques in the init process? >wow… woulda thought someone would’ve jumped on this one >sooner.
While unix has been around for some years, reliable bootups with simple scripts have been more important that fast bootups.
Parallising tasks adds an extra layer of complexity to the bootup cycle that is quite frankly not required for server based systems.
Its only recently than Unix and unix-like systems have become desktop oriented, and this has become important.
To put this in perspective, I have a dell server downstairs runing Redhat enterprise. It takes 10 minutes to boot up. Only about 1 minute of that involves the OS. Most of the rest are the Dell BIOS self tests (Which take forever).
If i was to cut the the boot time of Linux by half, it would make very little difference to my boot times.
As far as I understand “launchd”, Apple also speeds up startup by launching daemons only when they are needed e. g. if no network is connected, there’s no need to start network related services. It can be done later as a result of an external event (i.e. when the system get’s hooked up to the network).
This approach is way more flexibel and faster than just doing things parallel. So “initng” imitates the behavior of OS X 10.3, but AFAIK Apple has already moved further with 10.4
(see: http://arstechnica.com/reviews/os/macosx-10.4.ars/5 )
I installed Darwin 8.0.1 on my powerbook 1.33 Ghz.. and its easily the fastest booting OS i’ve ever used on this or any other machine. it doesnt start aqua or anything, but booting to a login: prompt does take under 10 seconds, probably closer to 8. Its very very fast. If this is something similar to launchd, but for linux, that’d be great!
Yes, but what is it actually loading? What services? What servers? What graphical environment?
Let’s be honest – the answer is basically nothing isn’t it?
If I install Dos 6.2 on a Pentium 4 with a fast HDD, it will probably boot in less than a second. What is that supposed to prove?
Totally off-topic, but a few people said that Windows XP was the first to do this. This is partly correct. In Windows XP the winlogon service is just starting earlier in the boot process with the rest of the services starting in the background while you’re typing your password. I don’t think that quite qualifies as “fast booting”, but more like “fast login screen available”. Like someone else mentioned, that’s more like moving gdm to a point earlier in the init process.
At $work we opted to set the policy which makes winlogon start after everything else. Why? Because else you might find the network not being available when a user tries to login to a domain. Doesn’t quite work well when cached credentials/profiles are disabled for security reasons. IOW, the comparison is b0rk, get the facts straight before trying to compare OSes.
Heya,
for network-services you can use inetd/xinetd I believe to startup services when they are needed. SO, I suppose xinetd starts the service only when it is requested … Maybe it can help …
Michel
And in other news initos (init old skool) has just been released dramatically increasing the boot time for those that have a lot of spare time not knowing how to spend. The developers promise that it will at least be increased with between one or two minuted depending on hardware.
If you had a server that went down, the quicker you can restart the faster you are back in business.
For example–you’re media server crashes in the middle of a movie. At that point, a few minutes can seem like an eternity.
Totally off-topic, but a few people said that Windows XP was the first to do this. This is partly correct. In Windows XP the winlogon service is just starting earlier in the boot process with the rest of the services starting in the background while you’re typing your password. I don’t think that quite qualifies as “fast booting”, but more like “fast login screen available”. Like someone else mentioned, that’s more like moving gdm to a point earlier in the init process.
With BootVis, defrag, and its automatic prefetching I had my XP boot time down to 11 seconds (timed in BootVis), 18 seconds with nvidia driver and several system utilites. That’s BIOS to usable desktop, btw. I love linux and all, but XP was the first to get this right, and is still the fastest OS+GUI to boot, when configured right.
I can’t wait to emerge this.
So you made your machine boot faster saving a whooping 17 seconds each boot. That’s extraordinary useful, how many times do you boot your computer each day 1, 2 or perhaps even 10 times? If I do the same I’ll save something under 2 minutes a week, wonder what I’d do with all that extra time.
I suppose that’ll allow you time to make 1 more post a week to OSNews
Vide : Check http://forums.gentoo.org/viewtopic-t-331844-highlight-initng.html for Gentoo thread about it…
Now if LunixBios could make it mainstream too, that would be awesome… always tempting but I never dare trying it.
I noticed people complaining about Apple not returning enough code to the OSS community but, haven’t they just released launchd to the community. Would it not be a good thing to see Linux, OSX and BSD and others using the same init process.
Motherboard makers should just add a flashdrive to motherboards that has like 1 or 2 GB in capacity and load the OS off flash. Wouldn’t this be faster? The HDD could be used to store just your extra programs and to be able to write to the flash drive from the HDD to upgrade the OS, kinda like flashing the BIOS. Just an idea that I am planning to make reality for myself.
Amazing nobody thought about that earlier…
First Apple and Microsoft (OSX and XP) had to come along to show the benefits of starting services asyncronously…
[joke]Actualy NOT. I remember I put & after my service start in year 1998. That would actualy mean that I had to come along… No need to thank me though.[/joke]
But now on more serious note. There was a Storm Linux distro way back in year 2000, if you can, try and get a copy, then test how that thing boots. P2-350 was about 8 seconds from bios to login and a few more to desktop and ready for action. If I remeber correctly, it was Debian based and i was running gnome 1.x on it.
Apple is cold booting from power on to GUI in under 10 seconds!
Actualy my clean install on G5 is taking 10 seconds longer than my notebook linux distro (if I look at services I haven’t added big things on linux either).
Your mention of Gobolinux is interesting. I tried Gobo 11 early on, and, as I recall, it booted lightining fast. Its init system is somewhat unique (as is its directory hierarchy). Can’t wait for version 12.
I tried Vector Linux around the same time and it was quick, too.
I am satisfied with the boot speed of my stock Slackware 10 — a lot of the init time can be trimmed merely by disabling ldconfig and hotplug at start-up (don’t forget to run ldconfig when adding new software and don’t forget to add the modules listed from running lsmod before disabling hotplug).
Wow people measuring boot times and gleeing over a second gained. Seems a bit juvenile to me and indicates a distinct lack of patience. We are talking mere seconds here, not even minutes.
Anyway I hardly ever reboot my machine. FreeBSD gives me great uptimes, boot times arent really an issue for me. Just because microsoft made XP boot faster doesnt mean every OS has to follow. Stop playing their game.
Maybe this is right for a desktop or server system but there are people like me who use a laptop. Its real perfect when you open your laptop push the small button and wait 20 seconds…..ready (ok, i need another 20 seconds to type my password correct, but that is another problem ).