Speed up your Linux machine with these awesome hacks!
Monday, October 07, 2013: Although Linux, the brainchild of Linus Torvalds is an extremely reliable operating system, and rarely needs to be rebooted, but when it does, the speed is a major concern. With Matrix style lines scrolling down the screen, it can make many lose patience. But fortunately, there are ways to speed things up. A majority of these tips are not very tricky all though some of these are unfortunately. Let’s take a look at top 10 speed hacks of Linux and let your Linux box reincarnate with speed.
1. Quick Fixes - Disable unnecessary services to make Linux boot faster
Linux comes in various flavors bundled with a lot of applications. However, most of us don't even use Linux to its full potential. Depending upon the use of the machine, plenty of services and running programs won’t be needed. And if you are using Linux just for a desktop, then you won’t be needing the default send mail, httpd, and many other services. You can also turn off many other services if your Linux box is used as a small web server by going to Administration menu, tweaking the Services entry and deselect all of the services you don’t want to start.
2. Free up Your Kernel - Disable unnecessary kernel modules
If your Linux box is wired to the LAN/Ethernet, then you don’t need to have a wireless kernel module loaded. More services like smartcard modules and others can be disabled and the load can be taken off from the kernel. This task is a bit difficult as it requires recompilation of kernel, which is daunting for even the Linux geeks. To do this, you will need the kernel sources and then follow the standard steps for compiling a kernel. You will be having a ride through the internals of your system just disable all of the kernel modules you don’t need.
For added safety, install Bootchart which will tell you if Kernel modules are properly installed and running on your system. Not only will this give you a good list of modules, it will illustrate for you what is happening during your system boot. You can also issue the command
chkconfig –list | grep 3:on
to find out what services are running. Once you know what loading modules you don’t need, you can remove them during a kernel recompilation. While you’re at it, compile the kernel to exactly match your architecture.
3. Take Load Off Linux - Use a lightweight window manager instead of GNOME or KDE
Using a smaller window manager drastically reduces graphical boot time. Instead of having to wait that extra 30 to 60 seconds for GNOME or KDE to boot up, why not wait two to 10 seconds for Enlightenment or XFCE to boot up? Not only will they save you boot time, they will save your memory and the headache of dealing with bloatware.
4. CUI ROKZ’ - Use a text-based login instead of a graphical login
The graphical logins do two things: increase load times and create headaches trying to recover from an X windows failure. Most of Linux machines which boot to run level 3 instead of run level 5 will halt at the text-based login, where you only have to log in and issue startx to start your desktop of choice. So CUI login is the way to go.
5. The Flying Penguin - Use a lighter Linux distribution
Are You a Linux newbie? Instead of loading the heavyweight SUSE, why not try a DSL, Puppy Linux, or Gentoo? The boot time is less than the more bloated Fedora (SUSE and even Ubuntu). Loading lighter Linux distributions will save you from lot of headaches. Of the larger distributions, OpenSuSE claims to boot the fastest, but between the latest Fedora and Ubuntu, Ubuntu blows Fedora’s boot times away.
6. Get Savvy - Use an OpenBIOS
If you’re tech savvy enough to upgrade your PC’s firmware, you might consider migration to open source BIOS which will allow Linux to actually initialize the hardware as it boots (instead of relying on the BIOS). Also, many open BIOSes can be customised to meet your machine’s specific needs. If you don’t go the open BIOS route, you can at least configure your BIOS to not search for a floppy drive that’s not there or to boot directly to the first hard drive (instead of the CD drive first).
7. DHCP woes - Avoid dhcp
If you are working on a home network (or a small business network) where address lease isn’t a problem, go with static IP addresses. This will keep your machine from having to call out to a dhcp server to get an IP address. If you take this approach, make sure you configure your
to reflect your DNS server addresses as well.
8. Hotplug unplugged - If you can spare it, get rid of hotplug
Hotplug is the system that allows you to plug in new devices and use them immediately. If you know your server won’t need this system, delete it. This will cut down on boot time. On many systems, hotplugging consumes much of the boot time. Removing hotplug will vary depending upon the distribution you use.
Although udev has majorly replaced hotplug. But if you’re running an older distribution, this does apply.
9. Initng for the daring ones
The initng system serves as a replacement for the sysvinit system and promises to drastically decrease boot times in UNIX-like operating systems. If you would like to see the initng system in action, you can give the Pingwinek livecd a try.
10. HackerPunk - Use a hack with Debian
If you’re using Debian, there is a simple hack you can use to switch your startup scripts to run in parallel. If you look at the
script, you will see:
around line 24. Change this line to
and you should see a reduction in boot times.
10 Awesome Linux Speed Hacks