How To Speed Up Linux Booting
An anonymous reader writes "A common complaint about Linux is the amount of time the operating system takes to start. Like Linux itself, there are plenty of options and lots of flexibility for boot-time optimization. From dependency-based solutions like initng to event-based solutions like upstart, there's an optimization solution that should fit your needs. Using the bootchart package, you can dig in further to understand where your system is spending its boot time to optimize even more."
I guess the point is that we *should* be switching our machines off whenever possible as opposed to leaving them running for no reason. The home user isn't going to be persuaded by Linux if he/she has to wait a long time to actually get a computer into a usable state*.
;)
To be fair, my Windows box boots pretty quick; I think the time between power on and desktop is somewhere in the region of 50 seconds. The method of loading the core services - desktop - additional services at least gives the impression of speed, even through the disk continues to thrash for another 45 seconds as applications load in the background.
* Jokes about Windows never being usable even after booting can be inserted here as required!
A common complaint about Linux is the amount of time the operating system takes to start.
Actually, it's a common insult and FUD. Understanding your boot process is nice and all, but your distribution already does this and has come to reasonable compromises. If you want to tweak with it, more power to you but you won't really save much. With proper power management you don't have to boot at all. For instance, the laptop I'm using says:
12:47:33 up 65 days, 15:12, 21 users, load average: 1.20, 1.50, 1.61
I put it to sleep when I'm done and it wakes up when I need it. I can't tell you how much time I saved by not having to reopen all of my applications and remember what I'm working on every day. The price of booting is far greater than the minute or so it takes to get your desktop, it's a loss of placekeeping and continuity. If I were using Windoze, I'd probably have to wipe and reload by now.
People who complain about long gnu/linux boot times have either not learned how to use their much better systems yet or are FUDing astroturfers.
Friends don't help friends install M$ junk.
a. don't load all the modules on startup, there's no need! load only modules that you actually use!
b. don't DHCPCD every startup
c. don't run xserver on startup, simply type startx, there are lot's of times that you don't even need gui so there's no need to load it
d. run e2fsck if it makes problems and writing that there are problems with certain inodes every boot.
e. don't load on xserver everything you don't need! for example : you don't need gaim to be on your startup every time you open kde.
f. load direct rending driver so your gui will load (and play) faster. (I had some problems with it cause I've forgotten to load amd64-agp, I hope some people can gain something from this post and actually load it). +5 insightful.
That ARM board stores the entire operating system in flash. It uses busybox and pretty much nothing else, to get a shell up that fast. It doesn't have to wait for any hard drives or peripherals to initalize. LinuxBIOS can do similar things, but only on some machines. TFA is all about getting services to start quickly. Turning off everything is not an acceptable alternative.
A common complaint about Linux is the amount of time the operating system takes to start.
No it isn't. Of all the things I've heard people complaining about Linux about, the start up time isn't one of them.
Get your own free personal location tracker
It's an unnecessary, unethical waste of energy.
So what? With my monitor turned off, my desktop uses a lot less energy. I'm not running a giant 500w power supply though. It's no worse than leaving a few lights on. Also, these are Linux boxes were're talking about -- they're hardly sitting around idle. (Mine is generally running MythTV, downloading one thing or another, etc.)
I like having it do things that I don't want to sit there and wait on.
I don't think security is such a big issue it deserves two points on your list. Again, this is Linux and most people using it are going to make sure there's some extra security; we're not the average user.
It's a poor solution to the problem of long boot times.
That point, I'll concede totally. Leaving your box online just so you don't have to boot it up is a really lame way to deal with it. That said, my Ubuntu install takes roughly the same amount of time as XP, both with no tweaking to the boot process of either.
It uses up your machine's useful lifespan much more quickly at no significant gain to you.
It's yet another electrical appliance always on and always ready to set off your smoke alarm or even start an electrical fire.
The first -- yeah. Definitely. But I'm not sure how long my computer is going to last anyway.
The second -- I'd not considered that. It's a good point.
As for the just for convenience thing and the slams -- Linux users aren't the only ones. And it's not just computers. How many people have lots of lights they leave on? A half dozen 60w bulbs burn a lot of energy (and put a lot of heat that has to be cooled off with AC).
Not really. Not even mozilla.org either. That would be about:blank.
I don't need to download a page every time I start my browser, render it and slow it down, then replace it immediately with another page I want to visit. That's another part of system optimisation, and it avoids unnecessary strain on slashdot/mozilla/other servers, too.
i think all we need is an near 100% reliable "suspend-to-some-super-fast-non-volatile-ram"
when we have that a reboot will be more like compiling the current state.
as long as you don't change any configration no reboot should be necessary at all.
just suspend and restore all the time.
That's an insult to everyone's intelligence. There is no such machine, unless you have serious hardware problems and the present article is the "more power to you" that I mentioned.
Anecdotal evidence suggests otherwise. On my (old; I ditched it this morning for a Mac...that feeling, twitter, is called cognitive dissonance) PC, XP booted in about 20-25 seconds whereas Ubuntu took about 30-40 seconds. I'm not even going to start on the prepostorous LiveCD thing...how could a full Linux/GNOME desktop booting from a CD take less time to start up than Windows XP installed on a hard disk? That makes no sense. Every time I've tried an Ubuntu liveCD it's taken a few minutes to boot up.
Microsoft continues to design complex and "extensible" non standards for power management, so it's not easy. Comfort yourself by knowing that M$'s dirty tricks make things harder for their own users than they are for you.
You mean ACPI? The one developed by Microsoft, Toshiba, Intel, HP and Phoenix? The one that comes pretty much as standard on just about every motherboard? Please.
Now, you always go on about Microsoft "blaming the user". But the subtext to your posts in this thread is "You shouldn't have to boot up at all, silly person, you should be using sleep modes. Look at my l33t uptimes." What use is it to say that? Is it just trying to divert criticism from the fact that yes, fresh stock installs of popular Linux distros do actually tend to take more time to boot up than fresh installs of Windows XP on comparable hardware?
By summer it was all gone...now shesmovedon. --
The trick is just right there. It's the time until desktop shows up. Not until the system is usable.
Windows XP (and I think Vista too, but the friend that was supposed to gime her unused Vista CD hasn't yet) tries to show desktop as soon as possible, even if all services didn't finish booting.
My machine isn't brand new. I mean at all. It's an old Pentium III Tualatin with 440BX chipset and 1GB SDR 133.
On linux (opensuse with old skool init), most of what need to be started is started during boot time (which includes clamav/freshclam daemons, a couple of hardware monitoring daemons, software update service, ssh, cups/samba/nfs, etc.) it's not fast but it's not taking hours either. Once I get a log-on screen, everything I have to wait for is Gaim starting. And it seems linux is good enough at multitasking to handle it in background well enough.
On windows XP, the boot phase doesn't seem much faster. And then I have to log-in and ll hell break loose. Only after I have logged in, the system decide to rescan my USB and Firewire interface, plus my anti-virus has to terminate to load, plus it has to update its definitions, and a half a dozen of small applets has to load into the task bar, all of this constantly checked by the antivirus.
All this can take up to 5-10 minutes.
And I'm running just a minimal amount of task bar applets (Firewall, antivirus, hardware monitoring, control pannels for 3D card) I'm not running an additionnal crap (no OpenOffice.org fast loaders, nor MSOffice, no Acrobad preloader, nor Photoshop)...
It looks to me that Windows just try to show the desktop earlier to show off and give a false impression of quick boot. Or maybe it's designed to run only on last generation hardware (Athlon / P4 and upward with DDR at least). But I can't say the delay is short before I can do anything in Windows (usually : start a game).
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
I've noticed kernels booting faster over the last 8 months. I started with 2.6.15 and now I'm using 2.6.20. I went from a boot time that was about a minute to the current one which is probably 20-30 seconds. I'll rebo...
Wow, I love the "restore session" on Firefox. Anyway, I just timed my reboot, and from the time I hit "enter" to choose a distro (multi-boot) and the time GDM finishes loading, it's 23 seconds.
look! it's a bird, it's a plane, it's....a girl? yes, a girl browsing Slashdot on Linux
You have an unrealistic viewpoint. The fact is that many people don't want to just preach to the choir. Yes, we can and should try and support hardware that works the best, but we don't just fix problems for the people currently using linux but also for the people who WILL be using linux. What about the new person trying to get linux working on their bestbuy dell laptop? Will suspend and hibernate work on that? Should we just say, "Linux is the best it can be, why improve it?" Or should we say, "There are some people who still need faster boot speeds, lets make this happen!"
If Linux booted faster than Windows, I guarantee people like you would be touting about how great linux is just on that alone. Let's just grow up and except that there is a minor issue like this and know that there are people who are looking for solutions. Lately boot speeds have greatly improved and its often faster than an old windows install. But lets face it, it can get better! Stop trying to say "good enough" and start saying, "Let's make linux even better!"
You people act like this is an insult, but this is the way open source should be. We admit our problems and we work to fix them. So instead of bitching about how stupid everyone else in the world is, lets actually try this and see if this is an improvement, or maybe we can suggest better ways of accomplishing this task. There are people who would like to see this happen, otherwise no one would have spent time finding a way to parallelize boot processes.
To people who are just saying that this is unnecessary: Why question people's motives? If I wrote a shell script that double sided printed pdf files (I did) and wrote an article about it, would you call it useless just because you don't use pdf files? Would you say its unnecessary because you can do the same thing with adobe's acrobat reader? Maybe I have a personal need for something that you just don't have. People have the need for this article, so instead of insulting it because you don't need it, how about you ignore it because you don't need it?
Parallel processing is fine and useful. It is also vastly, vastly, vastly tougher to fully test and support, especially in such a wild and woolly environment as system boot: people have been hand-inserting all sorts of oddnesses in there, and the robustness is a testament to the wisdom of keeping it simple and single-threaded.