Howto Speed Up Ubuntu Booting process

I’ve a friend of mine complained about how Ubuntu and other GNU/Linux distro boots slowly compared to Microsoft Windows. I told him this is because Ubuntu and other GNU/Linux distro tend start services that generally safe for average users.

He then told me about how he can customise Windows XP startup process and disable the services that he don’t use. Actually there’s a way to do that in Ubuntu too. Just go to System->Administration->Services, and disable whatever services that you don’t need .

However power users might find that the Services control panel in Ubuntu is very limited. For those who felt that way may try and remove the symbolic links inside /etc/rc5.d/ directory.

Warning

Caution should be taken while playing around with the init scripts because it may make your system unbootable.

To do this, you just need to delete the associated service startup file that begin with ‘S’ inside /etc/rc5.d/, for example if you want to disable bluetooth services you just need to delete the ‘S25bluez-utils’ file like this :

# sudo rm /etc/rc5.d/S25bluez-utils

Please refer to Speed Up Ubuntu Boot Process article, for more information about this method.

p/s: personally, i only disable services that i’m really sure that I don’t use. You may follow the advice given in the link, just hope that you dont over-optimise it, might be bad for your daily usage.

[tags]ubuntu,boot,windows xp, services, linux, booting, debian, gnu/linux[/tags]

4 Replies to “Howto Speed Up Ubuntu Booting process”

  1. I like Ubuntu, because it’s like a gate-way drug bringing some folks over from MS Windows (it broght me over anyways). However, just like all versions of Windows, when you load it, it’s in “swiss army knife” mode, setup to try to cover all aspects the “average user” (windows migrators?) would need it for, from mounting anything and everything under the sun, to multimedia, to networking, etc, etc.

    With each version they roll-out, they optimize it more and more. EG: For Dapper Drake, it was suggested to tweak HDPARM to get DMA working on your hard-drives. But in Edgy Eft, it’s already been tweaked to do so.

    However, Ubuntu is still pretty sluggish on anything less than a 1 GHZ machine pushing a good 512+ ram. (I have a P3 866mhz, 376 ram, and Ubuntu was pretty sluggish for me).

    So, the standard tweaks went into place…

    1) Went to Xubuntu for starters, and not just loading “xubuntu-desktop” through apt-get / aptitude / synaptic. I did a clean install of Xubuntu. I found that if I installed the Xubuntu desktop over an Ubuntu install, it was still sluggish. When I clean-installed Xubuntu, it worked faster.

    2) For settings, I made sure XFCE *did not* load KDE or Gnome stuff at start for support of those things (applets, etc). It boots a lot faster when it’s not doing that.

    3) I tweaked the boot processes using sysv-rc… (can’t remember the rest of the name), but didn’t really find much to switch off since Xubuntu already runs pretty lean. I think the best one was turning off pre-read, which is kinda like WinXP prefetch (?)…it tries to preload certain stuff you use a lot, and seems to slow down boot up while doing so.

    4) I didn’t tweak the “swappiness”, which is a common suggestion, but a lot of what I do in Xubuntu loads into RAM and uses little SWAP, which I don’t mind since I usually have 100mb of free RAM (out of 376 floating around) when I’m really busy. I don’t have 15 apps open at once, though.

    5) I trimmed WorkSpaces down to 1, which is all I need.

    6) I got rid of excess panel applets. When I got started, I was loading all kinds of stuff — weather display, mount display, etc — but I only needed rudimentary stuff, like clock, volume manager, window list, quick launcher. Getting rid of the rest makes boot up / log in a little faster since it’s less to load up.

    7) Not bootup, but more usage-oriented, I switched from “cadillac” apps to leaner “honda civic” apps if possible. EG: switched from default FireFox (which is slow unless tweaked) to Linux-optimized SwiftFox, then to Epiphany. I replaced my system monitor applet with Conky, which dumps out a limited text to my desktop and uses less mem/cpu. I try to use xterm or dash whenever I terminal, instead of XFCE’s built-in one or bash, since the former are a bit lighter weight. (Although I have become addicted to tilda’s quake-style console dropdown terminal…turn off the animated dropdown and map the key-binding to use ` to open/close it, and you can flip in and out of it very quickly…nice!)

    8) Aside from that, do the obvious like the other guy said, stop booting up / shutting down, and instead use stand-by / hibernate more. My computer goes into and out of stand-by very fast. Hibernate, however, is almost like a reboot, because I think it is (I don’t think my old comp handles hibernate well). Linux was made for long up-times w/o reboot, so get out of the habit…unless you’re a very penny-pinching person who absolutely wants to save as much power as possible by shutting down your comp when not using it. Honestly, hibernate and stand-by/sleep modes are pretty good.

    9) I tried stripping out “default” installed apps that come with the distro, but keep getting dependancy screams from all the apt-get / aptitude / synaptic, so haven’t been able to trim that stuff out. My logic was, get rid of the crap I don’t use, then get rid of the lib’s that are no longer needed, too, so they don’t get loaded at boot time. My logic is a bit Windows-ish, where in Windows a lot of .dll’s force-load on boot up and sometimes bog down your boot time. You can run 3rd party Window utilities to find and remove/archive unecessary .dll’s, and it always seems to speed up boot time, since you don’t have to load crap you don’t need. However, for Linux, I may be wrong. Windows “logic” applied to Linux may be way off base in this case.

    10) You can always try using a different Desktop / Window Manager. Folks keep promoting FluxBox (there’s even a Fluxbuntu distro in the works), OpenBox, and IceWM, but I found those to be a pain in the butt to get going (well, probably more pain then the “average use” coming over from Windows would like to bother with). They have some GUI config utilities you can apt-get along with the main program files, but in most cases, you still have to do some manual tweaking of text/config files to get it to look or work the way you want. EG: Fluxbox has a GUI to adjust a few things, but you still have to pre-config your menu text file by hand which is annoying. (This sounds like bashing, but I’m just stating my opinion as a former Windows Gui-only person, who’s used to just right-clicking on stuff and adding things to menus or desktop as such.)

  2. Disabling services just isn’t enough. Ubuntu doesn’t have proper support for parallel loading of services. Also loading the initramdisk slows the boot process down.

    Switching to a custom kernel and initng helped me cut down boot time 2min 30s on a P-III. Using software suspend and/or Arch Linux also helps a lot.

Comments are closed.