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."
My Linux setup is so optimised that this first post is actually made before opening Firefox and typing slashdot.org.
Ha!
I thought one of the arguments for linux was that you didn't need to reboot - like you do with Windows. So the boot time should not matter :-)
Any sufficiently advanced bug is indistinguishable from a feature.
It seems to me that Linux checks my system for everything every time it boots. If it could remember the system configuration from time to time, things would speed up a lot. My Gentoo buddies tell me that Gentoo doesn't suffer from that but I still don't want to spend a week compiling my own Gentoo. I, for one, welcome my long Linux boot times 'cause I only boot once or twice a year anyway.
in /etc/conf.d/rc:
rc_parallel_startup="yes"
(actually that should be in caps, but the lameness filter doesn't like it)
I have very little experience with Linux, but is it actually all that slow in comparison to other OSs? Most of my school's computers will boot in either XP or Redhat, and booting in Linux takes a tiny fraction of the time as XP. Is that a well-optimized version of Redhat? Or is Linux slow just in comparison to OSX (or others)? Or do Linux users just want it to be as fast as humanly possible (A noble quest), and it will never boot soon enough?
Most bootscripts are very generic in that they will try to load all sorts of RAID drivers, various services that are not needed, special fonts, etc.. I've gone in on my computers and wrote a very simple, quick, and to-the-point bootscript (easy to do with a little BASH knowledge), and my system boots up remarkedly fast. Granted, my bootscript isn't very portable, but one of the benefits of Linux is the ability to customize it.
Another trick is to prelink files and let KDE (if that is what you use) know about it. Even the startkde script can be long and drawn out, so trimming the fat and only including what's needed on your system can make a big difference. I've shaved over 13 seconds off a boot sequence by writing a minimum bootscript for my hardware, and that was using a relatively fast distro to start with.
-Mike
There are more things in heaven and earth, Horatio, Than are dreamt of in your philosophy.
Back when I was starting out with Linux, this used to annoy me and was a factor to consider when weighing up Linux vs Windows.
Eventually, as I became more proficient in Linux, the longer boot time became less and less of a factor as Windows became less useful for me compared to Linux.
The "bootchart" tool mentioned in the article looks promising. But it's mostly unlabeled bars. Until they figure out how to correctly identify all the processes running during boot, it's not too helpful.
The CPU utilization during booting is much higher than I would have expected. That's interesting, and unexpected. For most of the first ten seconds of post-kernel startup, the system is CPU bound, while the disk is idle more than half the time. Where is all that CPU effort going?
"One of the biggest complaints about Linux®, particularly from developers, is the speed with which Linux boots."
Not sure where the author got that from.
Mine boots less than 30 secs into X window (WindowMaker).
That's much faster than windows and/or mac.
Using KDE or Gnome will probably add around 20 secs. But still under 1 min.
Fascinating article, but while searching through aptitude for some of those alternative init engines, I came across bootsplash instead and I couldn't resist!
:P
http://www.bootsplash.org/
Uh, yeah, I guess I could make good use of bootchart from the article too... mmm... more eye candy.... and you can keep looking at / admiring your stats / comparing with you friends' stats long after after you've booted up anyway!
Seriously, real Linux servers don't reboot
(burned by playing with runit some time ago)
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.
If it can be done on a 200MHz ARM9 processor in just over a second, anyone else can do it:
http://www.embeddedarm.com/epc/ts7400-spec-h.htm
No need, Ubuntu has upstart by default.
The applications which start on boot really suck - many of them parse XML files over and over again, some of them try and exec a process 18 times before they finally succeed in finding the right path, some others do fcntl64 on 0 to ulimit -n File descriptors even if none of them are valid, Xorg finds PCI bus and devices in utmost inefficient ways and module loading subsystem loads dozens of useless modules).
If they fixed all of this, the boot times would not be so good. Given that suspend/resume won't work reliably Linux needs to have fastest boot times - it's a pleasure to use OSX - boots fast and rarely needs to be rebooted - just close the lid and open it when you need.
When I went out to take advantage of the article's suggestions, I found that, according to this thread in the Ubuntu Forums that Ubuntu 6.10 already uses Upstart.
I did used the "profile" command in my bootup once, after reading about it in another article recently. So I guess my Ubuntu is booting about as fast as it can (unless I have useless processes starting up. I'm still trying to figure that out--I'm a noobie).
I managed to make Windows 98 go weeks between a reboot. Avoided the KAK worm because I saw it the Startup menu before a reboot. If standby and hibernate work, it's even more meaningless. I wish it were easier to get the video subsystem up to snuff with modern adapters and make the various proprietary web plug-ins work under Linux. For the most part it's doable, but not with always with a consistent method.
I installed debian on a rackmount raid box (configured the raid during install), and it had a boot time of maybe 30 seconds, 60 max. Not sure what other installs do, but for debian the gui takes another 10 seconds max on top of that, if you choose to install it. Now we're at 40-70 seconds for a full boot on a box that will be up for months...
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.
OS X went to launchd which is an init.d, cron, inetd, etc replacement. I'd like to see how launchd compares to upstart.
i've been using kubuntu for about a year (testing feisty beta now) and for quite a while now i have noticed a problem that this article might help with. i don't have to reboot very often, a heck of a lot less than on windows, but when i do, it takes about two minutes. doesn't sound like much, but that is about 2-3x longer than before. i was told that you can press F2 after you choose your grub entry to see the progress and what it going on, but that doesn't work for me. i press F2 but the screen just remains black for about two minutes then it gets to graphical login. does anyone know if that is an ubuntu/kubuntu "feature" or not?
http://www.ronpaul2008.com/ Ron Paul for President 2008 http://www.infowars.com/
The easiest way to speed up the booting is to throw away kernel modules you don't use and to statically compile things you use often.
.config looking for things you can't find in menuconfig, and change stuff from "m" to either "y" or "n".
Do a 'lsmod | grep -v Module | sort > modules.txt' and keep that list when selecting things to be compiled in. Then grep through your
I've managed to gain at least 10 seconds this way (unsure about the exact time, but the box is starting noticeably faster).
AFAIK optimizing the kernel image for size doesn't help much.
Huh. I must have read the article wrong. I thought it was *Windows* that took too long to boot, was a memory hog, crashed all the time, blah blah blah. Now you're telling me that it's actually *Linux* that plays the snail in the 0-to-useable time trials? And that if you diddle around enough you can maybe speed that up by a few percent and still have a semi-stable boot process?
Sorry Charlie, these facts simply don't agree with my dogma. Now if you'll excuse me, it's spring, and I have to get back to watching my lawn grow whilst I wait for my Linux box to boot.
Ma notebooks now use Safe Sleep, which is kind of a hibernate/standby hybrid. When you put it to sleep, it writes the RAM contents to disk as if it was hibernating, and that can take a few seconds depending on how much RAM is in use. Unlike hibernation, when you wake, it wakes instantly because it doesn't go to the RAM image on disk unless there has been a power failure during sleep. It just resumes from whatever was in RAM at sleepytime.
This best-of-both-worlds approach actually makes it possible to change the notebook battery without an internal backup battery, and yet not lose your session. When you resume after a power cut, it loads the RAM image from disk and all your apps are as you left them running.
But if I do have to do a cold boot, my Mac Pro reaches the desktop in 15 seconds. I am not a Linux user but I certainly hope that Linux has optimized startup with caches by now. (If I make a major change to the system, such as an update or add/remove kernel extension, startup takes much longer as the caches need to be rebuilt.)
I'm very interested to try this...how many minutes can I get below one minute of booting?
Seriously, between pressing the button and logging in there's only 60 seconds of boot. Should be enough time for any girl to get her morning coffee fix, I should think.
21 users on a laptop? Doesn't it get a bit crowded around the keyboard?
I use a lot of Gnome terminals.
I log into it myself from other machines from time to time but dhcp networking makes sharing it with other people impractical.
Friends don't help friends install M$ junk.
But it just seemed that the support was extremely lacking. I know, I know - if it doesn't do what you want, code it yourself. initng, however, suffers from redesign issues (like moving startup scripts into and out of the main distribution - at one point I'd upgraded to the next version, but couldn't log in because none of the startup scripts could be found because they'd been moved into a separate package).
It's nice, and all. But various inconsistencies have made me move back to init.d. Hopefully this kind of publicity will get more people involved and make it more stable. It really does speed up the boot time (not that I ever thought Linux was slow either).
Anybody else appalled by the amount of people saying "just don't turn it off"?. I know I am. It's shocking for various reasons:
If you leave your computer on 24/7 just for convenience, then perhaps you ought to consider the possibility that you are a spoilt rich selfish pussy and not the infallible sysadmin you undoubtedly believe yourself to be.
Entertain yourself or multi-task, go make a ham sandwich.
I am running Kubuntu 6.10, and I have to say that I have been pleasantly surprised with Upstart, for the most part. It really is much quicker than the older boot sequences, as well as Windows XP, in my personal tests. I still have a couple qualms, however.
/boot/grub/menu.lst and commenting out "quiet splash" takes care of it, but I don't always want to perform a status check when booting. This is a really simple thing to provide accomodation for, and I may just be unaware of a more simple solution that is already in place. If anyone knows of one, please enlighten me.
The lack of a method to switch back to the traditional, detailed boot sequence is annoying. Editing
The other problem comes as a result of the first. There is, with no option to switch to a detailed boot sequence, also no way to skip network detection. I am used to just issuing 'Ctrl+C' to skip it, and so it is quite frustrating sometimes. If you aren't connected to a network, or if you connect only after you have brought the system up, you are stuck waiting however long the default timeout is, unless you, again, perform a manual edit. This wouldn't be so much of an issue if arguments could be passed by default at boot-time, but as far as I know they cannot.
Once again, if anyone knows of solutions to these issues that I am ignorant of, I'd be grateful to hear them. Other than what I have related, though, K/X/Ubuntu 6.10 boots very quickly, and I am quite happy with it.
"We may face a scorched and lifeless earth, but they're accountable to their shareholders first."
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
I know this is off-thread, but is there anyway to speed up Windows booting? At least with Linux you can tune and serialize or parallelize the boot process for speed. Is there anyway to do this with Windows? The 35 processes that launch out of my system tray just don't want play nice together on boot :)
Sorry for the offtopic, but this is a sincere post.
"Unless you are running a server or something, there's no reason to leave your computer on when you aren't using it. It just wastes power."
My computer is my central heating system, you ignorant clod!"
Think about it - during the heating season, if you use electric resistance heating, you can run your computer "for free" 24 hours a day - the heat it generates will be the same as the heat from that many watts going through your baseboards, so its a wash. Same thing with incandescent lighting.
Of course, in the summer, you have to expend that much more in AC to remove the excess heat ...
All in all, playing with parallelized OS startup is very nice but the real problem lies elsewhere...
In my experience (data center, 350+ Intel-based servers, Linux + Windows plus a bunch of SPARC Solaris boxes), the OS boot time is negligible compared to the time needed for hardware initialization:
- BIOS startup
- Memory check
- Remote Console init (DRAC/XSCF etc.)
- RAID Controller(s) init, disk spinup
- RAID Consistency Check, volume initialization
- Start Boot Sequence
Especially the disk subsystems cause large delays - most time is spent waiting for the GRUB screen.
Parallelizing the hardware initialization is where we could make some significant progress.
-- Gxis! Ed.
You insult lots of experienced Linux users who do care about their machines booting several times slower than an XP pc.
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. Many live CDs boot faster than XP and most installed distributions boot faster than that.
You may have a laptop and you may be happy with "hibernating" it, but many of us need to power off PCs. An office PC I power on every day, my home's PC I power on and off when I get and leave home.
You should happy be like me. I'm aware of the issue. Ultimately, if you care about power consumption you are going to get a laptop or desktop with reasonable power management. Test it out before you buy it or send it back if you can't and it does not work. 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.
Of course, there are benefits to having at least one machine that you never turn off and that never sleeps. I have contact information, archives of photos, music, movies and work that I can get to anywhere by sftp and KDE makes it all look local. This is much easier than syncing three or four laptops and desktops. Wake on lan might be nice, but my equipment is all so old, I've never bothered trying. For at least one machine, I never will. A modest server consumes 50 watts or less, kind of like some light bulbs I never turn off. I get more use by far out of the servers than I do light bulbs. Your business might also consider that a reasonable convenience.
Friends don't help friends install M$ junk.
After reading the article, I decided to give initng a try. I timed my boot from a powered off state to the GDM login prompt so as to have a base-line, installed and configured init-ng 0.6.7, and then retimed from a power off. The result: initng ADDED 12 seconds to my boot time. Tried it again to see if it was a first boot fluke and got the same results to the second. This is on the latest feisty. Someone mentioned that Ubuntu 6.06 used upstart- it doesn't look like feisty is to me, but that might be my ignorance. Cest la vie.
Linux could boot very fast if only code and programs and hardware that were required to run did. A lot of the checks it makes on booting (discovering new hardware, loading modules, populating udev, etc..)
If this was done by the installer once and then never needed again then it could come up much faster.. it is mostly a moot point though because rebooting is something that should be really done infrequently.
It can be very fast though.. I actually once made Linux a system that went from OFF to Google in 15 seconds. (2.2 kernel). It just depends on how the system is implemented. A fairer statement would be "..Common Linux desktop distros that take a long time to boot.."
Bringing liberty to the masses. - http://freetalklive.com/
Well, I've decided to try out software suspend.
/usr/sbin/hibernate' not only managed to power off the computer a lot faster, but it took 10 seconds from grub to bash prompt.
I'm not certainly sure which packages to install and how to configure them etc. (somehow I already had it all on my Debian box) but just compare:
A "fresh" boot to 5th runlevel, with my customized kernel, fsck, only a few basic system services enabled + apache2 and mysql, took 42 seconds. 42 seconds from grub menu to login prompt (I do not use any of those crappy [xkgw]dms but a real login(1)).
A suspend, done with 'sudo
The only disadvantage of this solution is that hibernate and nvidia kernel module doesn't seem to like each other. When I issue # hibernate on an xterm,
Some modules failed to unload: nvidia
hibernate: Aborting suspend due to errors in ModulesUnloadBlacklist (use --force to override).
so I've tried with --force and shit happened.
What I need now is just good session management in my WM.
Because I only reboot my computers when I have to, like when I get an update to the kernel. The rest of the time, they just waste electricity and CPU cycles, and generate excess heat my A/C unit has to deal with! :-)
No matter where you go... there you are.
Denying the problem doesn't make it go away, really. All the hibernation and sleep modes in the world don't change the fact that Linux boot times are much longer than, say, Windows XP's.
I've never seen this happen. Reapeating this FUD does not convince me it is true.
for many laptops [power management does not work]
If your laptop does not work, you need to get your money back. Take it back and tell them why. Better yet, test it before you buy it. Don't buy things that waste your time.
Thinkpads usually work out of the box. I usually turn off ACPI and use APM, but ACPI works too.
Friends don't help friends install M$ junk.
My Linux Box is so optimized that this is the fastest I could post!
Check out Unsealed: Whispers of Wisdom! http://unsealed.k3rnel.net It's an action-RPG about Open Sourcerers.
My freebsd home server running on an HP dc7100: /usr/local/etc/rc.d, thank you.
From shutdown -r now to login: 67 seconds.
And that includes starting several daemons like apache, vsftpd, mysql, ircd, and of course
You never need to reboot a good linux distro. In addition I have lots of debug info available if something isn't working, you just don't get that with other operating systems.
Since when is running a computer 24/7 unethical? I think the 150watts of electricity usage from a computer is far from a waste when your computer is Folding, or any other distributed computing project. Just my .02 dollars
The Personal Bookmarks Toolbar makes Slashdot one mouse click away.
Bill Stewart
New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
Some linux versions use readahead while booting for a specific set of files which will be needed during the boot. The set of files is stored in a boot profile. After upgrading your system or changing the services started at boot, you should re-profile the boot, so that the readahead files are the ones actually needed. It can make a remarkable difference to boot speed.
6 3&highlight=grub+profile+speed+boot
Instructions at http://www.ubuntuforums.org/showthread.php?t=2542
Note that the profiling boot takes longer, but subsequent boots should be faster, since most files needed for booting will already be loaded before they are required.
Those who can make you believe absurdities can make you commit atrocities. - Voltaire
Also, if your PC comes from a major manufacturer like HP or Dell, see if it has a bunch of "helpful" manufacturer-installed software, and see what you can get rid of from that. I don't know if it's as bad as it used to be, but when my mother-in-law had a Compaq, there was a lot of stuff we had to trash to get the system to behave adequately; we eventually upgraded her to an XP-from-scratch installation which worked a lot better. (Of course, getting rid of all the spyware helped too
Bill Stewart
New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
Ever since Ubuntu Edgy much of the low hanging fruit in speeding up the Ubuntu boot has already been taken. Looking at the bootcharts for my system since then shows remarkably little time when the CPU is idle once the base kernel has finished loading. This means that running anything more in parallel simply won't net me anything (in fact scheduler overhead and disk thrashing may in theory make things slower).
For example, there is an improvement in the time it takes for the clock to appear from "Ubuntu Dapper Flight 3 Default kernel" to "Ubuntu Feisty Herd 5 generic kernel". The Ubuntu folks worked hard to try an eliminate sleeps from their initscripts and when a sleep was unavoidable they would run other parts of the startup process in parallel. They also made changes to Xorg to prevent it (re)reading so much stuff on launch. There was also the introduction of the readahead script which tries to arrange for as much of the boot time reading to be done in one big chunk. Throughput is higher when the disk is only reading and can utilise it's readahead. An attempt is also made to try and request files in the order in which they are laid out on disk (to minimise disk seeks which hurt performance). In Feisty a move was made to using dash instead of bash for scripts because it was smaller and executes scripts faster.
The only things that seem to win me any gain over the default Ubuntu Feisty install are turning off initscripts for services I absolutely won't use (e.g. ipv4 autoconfig via avahi) and reducing the number of restricted binary driver modules being probed (I have long noticed that the only benefit that recompiling the kernel gives to boot speed is that you can simply leave out features not on your computer making the initial kernel startup where it probes for things you might not have (like which software RAID is faster) a shade faster). It is also worth noting that Ubuntu starts X quite early and continues loading services afterwards which means the gain from disabling one of these "after X" services (like CUPS) isn't so noticeable (but might mean your desktop actually starts responding to clicks a bit sooner).
Profiling the boot to try and improve the readahead takes a long time to run - the profile run seems to take three times as long as a regular boot. It could be argued that you will never gain back the extra time you waited on the profile run...
I suspect reducing the boot further will start to need more complicated procedures, perhaps reordering modprobe.conf and reducing the amount of needless reading of files. Eventually you end up having to do the same tricks as Windows/OSX - e.g. working out where the fastest part of the disk is and copying every file needed to boot there, bringing up the network cardafter the desktop has started, periodically defraging bits of the disk, prelinking...
I can't discern if this is a serious question. Boot times? Seriously? Ok, XP gets you to the login screen quickly but it does so at the cost of delaying the startup of vital services that are necessary to actually use the computer. Really, how important is it that I can login but then still wait >60 seconds for all the extra, and necessary, services to start, like AV, firewalling, updating, an so on. It's in fact really annoying that I can login and *appear* to begin working, only to have my work delayed and the active focus change when other necessary services start. I think I'm typing in a window but really I'm not because some mysterious service or program has grabbed focus for its startup sequence. I'd rather have a longer boot time with the end result being that I'm able to use the computer as I want to rather than something that gets me to the login screen quicker. Wow, I can login quicker, it must be better.
A measure of boot time is inevitably done in order to try to quantify the amount of productivity gained or lost while the computer is readying itself for work. If one wants to quantify boot time however, then one needs to quantify the time necessary for real work to begin, the time necessary for reboots for seemingly innocuous updates that really shouldn't require a reboot (whether to the OS or to extraneous programs), the time spent virus and malware definition updating and scanning, and related factors that determine how much time I spend actually using the computer.
Went from a 5 minute boot down to a boot time of only 60 seconds by optimizing my boot scripts and trimming the fat. Used bootchart to find the slow downs and optimized from there.
:)
Of course this was on a ~15 year old 50mhz Sparcstation LX running Debian
Slamd64 11 shutdown -r to prompt ... 71 secs.
Brings up a satellite card etc.
But I had to wait too long for the damn thing to boot, so I missed the opportunity. I wish there was information somewhere that could help me speed that process up.
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 ]
You also forgot the antispyware, both of their definitions updater, and the firewall.
All of which are absolutely obligatory if you don't want you machine to be completely unusable after a couple of days connected on the net.
At least, thanks to FireFox (and its adblock extension), you don't need to start an additional anti-popup software.
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
My Widows box actually takes quite a bit longer to completely load than my Linux one. If you factor in the time it actually takes for the OS to finish loading, the boot times come down in favor of Linux.
p.s. I run Ubuntu 6.10 and Windows XP on a 2.3 ghz AMD64 w/ 1 GB of RAM and a 1.8 dual core intel laptop w/ 2 GB RAM respectively.
p.p.s. Yes i know this isn't a scientific comparison by any stretch of the imagination, im just saying that this is what happens for me.
For desktop systems an optimised boot process isn't much of an issue but for embedded systems it is critical. You don't want a client asking "Why does it take a minute for my VoIP server to reboot?" "Why does my multimedia player take two minutes before I can watch a movie?" These people can't sit at a console and watch all the pretty boot messages scroll by. All they can do is sit and wait and get annoyed because their system hasn't come back up yet. Articles like this are interesting reading for anyone wanting to squeeze every last second out of the boot time of their embedded linux device.
Another big contributor to boot times that the article didn't cover is the amount of time spent sitting in the BIOS. If you're serious about shaving off a few more seconds you might also want to look at http://linuxbios.org/.
If your laptop does not work, you need to get your money back. Take it back and tell them why. Better yet, test it before you buy it. Don't buy things that waste your time.
Serious question: How do you get a laptop reseller to let you install Linux on a laptop to try before you buy? Or alternatively, How do you test all hardware (including hibernate) with a live cd? Hibernate at least needs to write to a swap partition which needs repartioning... I'd love my next laptop to be a walk in the park, but I've never had much luck...
Look out!
I first took the time to decide exactly what my system would be used for, which was a desktop system not a server. The next step I did was build into the kernel all of my hardware instead of using modules. Last but certainly not least, I ensured that my desktop uses a static IP instead of dhcp to bring up the network. This alone saved me in excess of 20 seconds.
Simply put, by taking the time to decide exactly how I was going to be using the damn system, I was able to optimize the boot sequency by not having unneeded services starting and I can go from a cold power up to KDE in 75 seconds and that's with having to log-in and type start-x.
How do you get a laptop reseller to let you install Linux on a laptop to try before you buy? Or alternatively, How do you test all hardware (including hibernate) with a live cd?
You use a live CD to test the hardware. If it does not work, don't buy it. If you don't want to risk writing out a file for hibernate suspend, take it home and do it there. It's really easier for everyone for you to just do it there with the demo machine, which they "restore" all the time anyway.
The bottom line is getting what you want or not parting with your money. If something does not work the way you want it to, you should not buy it. If you buy something and are not happy with it, you should get your money back. If the store won't give your money back, you should not do business with them anymore. I pay a small premium to local mom and pop computer stores because they let me try things before I buy them and have been very cool about things that don't work for me. Even Walmart has the good sense to let people bring back electronic gadgets that don't work.
I'd love my next laptop to be a walk in the park, but I've never had much luck..
I've had good luck with used Thinkpads. Newer hardware is always a pain, until Dell and other major vendors get smart. The easiest way to tell is to just try it before you buy it.
Friends don't help friends install M$ junk.
One of my dedicated fans calls me a snob:
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?
No, I've said that long gnu/linux boot times are bullhit and that they don't matter. There's no diversion going on there, it's a denial of bullshit. Nothing boots faster for me than a default Etch desktop, not even your supposedly "fresh" XP install. Once you add on anti-virus and the inevitable mal and spyware, the Windoze system is a brick that takes forever to boot and has to be reinstalled, how convenient! There's nothing leet about using features out of the box like I do. APM is as easy to use as closing the lid on your laptop. I like to share that because it's a great time saver and advantage everyone can and should enjoy.
Friends don't help friends install M$ junk.
Ubuntu Feisty boot time to usable desktop: 95 seconds.
Well I'm using Ubuntu Feisty, presumably with Upstart, and it takes about 75 seconds to boot to the Gnome login screen, on my Core Duo laptop.
The kernel is only a tiny fraction of that; the kernel starts very quickly.
Most of it is surprising delays in some of the boot scripts. For example "Starting system message bus dbus" is followed by a 15 second delay before the next message, "Starting Hardware abstraction layer hald". "Starting kernel event manager" is followed by a 5 second delay before the next message, "Loading hardware drivers". "Assembling MD array mdarrays" takes 10 seconds before the next thing, "Setting up LVM Volume Groups". (Surely MD setup should be near-instant, especially as there are no MD arrays? And I shouldn't have to tweak it manually to get rid of that step.) Most things take about a second. They add up to about 75 seconds.
Then, after logging in at the Gnome login screen, if the cache is cold following a boot, it takes about 20 seconds to start all the applets, before it's possible to use the menu or icons. The panel itself appears quite quickly, but it's not usable until everything has appeared on it.
Shutting down is pretty slow too. I usually do Control-Alt-SysRq-S-U-B/H if I want to power off completely or reboot, to avoid the shutting down time.
-- Jamie
Starting with Edgy my shutdown time has been definitely less than 20 seconds, and the "after login" time is under 10 seconds. When it boots, I usually watch the bootsplash, but if I switch it to text, everything just flies past. What are your specs? I have a Core Duo too. It's 1.6GHz per core (they're not all the same) and 1GB of RAM. It shouldn't be nearly that slow. File a bug report. I'm having issues on Sabayon. There's a 2 minute pause after "parkbd: no such parport" which doesn't make one bit of sense since I don't have a parallel port at all (laptop!).
look! it's a bird, it's a plane, it's....a girl? yes, a girl browsing Slashdot on Linux
Similar here. 1GB RAM. 2GHz per core according to /proc/cpuinfo when busy. (Yet strangely Gnome CPU Frequency Scaling Monitor shows 2GHz (100%) and 1GHz (50%), at the same time as cpuinfo shows 2GHz for both).
Shutdown time may well be comparable with 20 seconds (though it feels longer, I haven't measured).
I boot with text, because I have encrypted /home and text is needed to enter the passphrase. Each little bit of the boot process is quite fast, except for the long delays at things I mentioned and a few others. The slow bits add up, times clearly shown in /var/log/boot, which is where I get 75 seconds.
My /var/log/boot is here: http://paste.ubuntu-nl.org/11949/ (it wouldn't let me post it in here cuz it said "too few characters per line)
look! it's a bird, it's a plane, it's....a girl? yes, a girl browsing Slashdot on Linux
I've used everything from mainframes to calculator watches, and Linux boots fastest of all, sans optimizing. I have also heard plenty of flames about Linux, but never about the time to boot. Don't judge all of Linux by one drag-your-ass distro. (Ubuntu, of course!)
My Slackware machine boots up and KDE is completely ready in about 50 seconds (not counting the POST and the time it takes me to log in). Just disable the services you don't need running at boot (Samba, CUPS, ldconfig, fc-cache, etc.).
I wish I had the time and eloquence to reply to the "M$ windoze open source is perfect and i hate you if you don't agree" trolls this way.
Apparently, this topic has been discussed on /. before, and the most intriguing tool I became aware then was minit (http://www.fefe.de/minit/). Here's a nice posting about its most important properties: http://developers.slashdot.org/comments.pl?sid=808 17&cid=7115996
A monkey is doing the real work for me.
I just shutdown and turned on my comp,then timed how much it takes to get win98 running.
result is 24 seconds(from pressing Power on to MSDOS console windows).
windows boots into MSDOS console window(shell=command.com).
One of the contributors to Mandriva developed a drop-in parallel init system, which uses LSB tags in the init scripts to determine dependencies. This was tested in the development version for a while, until it was selected as the default before the release of Mandriva 2007.0.
See more information on prcsys
The advantages with prcsys are:
-traditional serial startup can be used
-minimal changes are required to initscripts
-LSB compliance for free
The Fedora wiki has some good discussion of why some aspects of new fangled init systems may not be desirable.
The syntax for the name field for inittab included a make like dependency filed sometime before 1981.
So why does everyone want to do it the hard way?
If you're talking about "Novell Linux", yes. That's the goal of this project anyway. To make windows look fast and stable. This is how these people make money which is used to fund the Development of Mono and its widespread amongst hispanic-speaking people.
Something like a custom linux setup, or LFS can boot you in bash in 2 seconds.
You guys are still using run levels? When was the last time you actually used a run level different than the default run level, or changed the default, aside from doing emergency maintenance which can be done well enough with init=/bin/sh when needed?
now we need to go OSS in diesel cars
Seriously, real Linux servers don't reboot :P
;)
Send me your IP address next time there's a kernel update for a network security problem.
I agree though, real servers shouldn't *have* to reboot. Time for my semi-annual CS taunt:
Are there no CS researchers up to the challenge of working out an in-situ kernel replacement mechanism for Linux?
Yeah, there's alot of bookeeping code to crank out, but think of the fame and glory associated with putting an end to reboots.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
http://voidmain.is-a-geek.net:8100/
That actually should be:
RC_NEED="foo bar"
or RC_USE
Boot optimization is a subset of overall system optimization. As has been said, we rarely boot up these days (for me it is every week or two). But we do use our systems, some more intensely than others. In our household, two systems have more than a gig of RAM, one has 1GB, and the other two are 256MB and 320MB low-enders. Machines with 512MB or less benefit greatly from process reductions.
(1) To get started, click Start, then Run, then type in Services.msc
(2) Go through the list. If you don't need a service, disable it. If you are not sure, turn it off for this session only (i.e. click Stop). For example I don't have a printer on this computer, so I don't need the print spooling service ever.
(3) Know your services. Many web sites will detail the services for you. Here's the first link I got on Google to get you started.
(4) As others have mentioned, remove the "free" trash your computer manufacturer bogged your machine down with.
(5) Turn off the "helper" apps -- you don't need the Microsoft Office "quickstart" thing, the Real player nor the Quicktime icons in your system tray. Etc. Get to know your system tray icons and what they are supposed to do.
(6) If you are having trouble turning off system tray thingies, or want to do further tweaks, try running MSConfig -- Start, Run, MSConfig, {enter}. The last tab lists some of the things that are starting at bootup. Go through the list (MS doesn't make this easy -- the MSConfig window can't be enlarged, so you have to increase the column sizes, then scroll to the right and back again, etc.). You can get online help via Google -- here's another starter search link.
(7) Run Task Manager -- its free with 2000/XP and it comes in handy, yet uses little CPU or RAM. I run mine all the time, with the "minimized to system tray" checked. This way it shows me when something is pushing my CPU to 100%. Anyway, run it and click on the Processes tab. Then click on Mem Usage -- at the bottom will be the programs using the most memory. Many can't be stopped, but the biggest offenders should certainly be looked at more closely. Also, this list should not run much more than one screenful. If it does you definitely have some more pruning to do. Some processes don't list all the RAM they are taking up -- e.g. my Opera browser can use up to 200MB, but never lists more than 80 to 100MB for itself. So, to perk up your system (if the free RAM is low), try closing and restarting Opera (this would probably work for Firefox as well).
I come here for the love
And some of us remember when it was about 5 seconds.
Of course, that was a TRS-80. :)
My beliefs do not require that you agree with them.
according to this wiki, LSB-compliant Init Script should document runtime dependencies.... and so it should be easy to use a parallelized bootup system; at a certain point, it was even planned for the new Debian Etch ; checking in my /etc/init.d, I see that many scripts in Debian Etch indeed do sport the LSB header; but I cannot tell if that goal was achieved - last time I tried , I apt-get installed runit, and then my box did not boot.
... thus effectively reinventing the wheel. Or am I wrong? is any of those gizmos out there capable of understanding the LSB-mandated dependencies?
The funny fact is that I did not see, in the posted article, any reference to this fact: according to that article, seems that, whatever parallel-boot-rc system you use, you need to manually write down all init-scripts dependencies
http://www.redhatmagazine.com/2007/03/09/understan ding-your-red-hat-enterprise-linux-daemons/
When an OS is capable of 440 days of uptime on a P90, who cares how long it takes to boot???
Competition Good, Monopoly Bad.
A bunch of /.ers are commenting about how Windows XP takes x time to boot, and "Linux" takes y. There are hundreds of different distros, you can customize each one as much as you want. Boot times WILL vary.
I'm running Fluxbox on Debian Etch (Testing). The only things that boot are the stuff that was booting when I installed. It takes about 45-50 secs. Windows 2K, on this same machine, when I was using that, took about a min. When I was using Damn Small Linux, with a frugal install, it took about 30 secs to boot.
I've never thought "Linux is slow." I've always thought that fast boot up times were one of Linux's advantages.
Write your own Choose Your Own Adventure. http://www.freegameengines.org/gamebook-engine/