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."
in /etc/conf.d/rc:
rc_parallel_startup="yes"
(actually that should be in caps, but the lameness filter doesn't like it)
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)
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).
You can fix those yourself. For any service in /etc/init.d you can put a file of the same name in /etc/conf.d. Among other things, that file can list dependencies.
DEPEND="foo bar"
Comparing fresh Linux and XP and OS X installs, Linux is by far the slowest to boot. If your school's XP installs boot slowly, they are probably doing a lot of work like transferring lots of data over a slow network connection.
If your PC is so old that it doesn't have a hibernate option, you're in a minority. Most systems have been Energy Star compliant for years.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
suspend to disk = hibernate, suspend to ram = sleep. Sleep uses the battery, hibernate doesn't. Granted sleep mode doesn't use much, but it isn't altogether negligible. If you don't want to use any power while moving around, hibernate is the way to go. Perhaps that's his scenario.
I love my sig.
Yes, but he was comparing linux's performance to how quick OS X works just by opening the lid, which is directly comparable to sleep, not hibernate.
thisnukes4u.net
i'm going to go out on a limb and say that you have at least one external hard disk plugged in. if you would boot next time without your external(s) plugged in, your monitor should neither go black nor take near as long to boot.
I defy you to prove that with a Slackware installation. Maybe some shitty "let's load EVERY MODULE" systems are like that. Slackware is not.
Never have to reboot Windows?!?!? Can you please post your IP so these MS.Blaster worms will have something to feed upon? ;) Seriously, if you never have to reboot Windows, you're probably a security risk since you've likely not applied any security patches either.
And just for the record. The point of the GP was that Linux machines tend to have much longer times before a boot is necessary. It wasn't bashing your precious Windows, it was stating a *generalized* fact. I can leave my Fedora server running for 2 months without a single reboot; if I tried that with Windows I'd be at the very least SLOW, and more than likely infected with malware.
0x09F911029D74E35BD84156C5635688C0
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...