The Ultimate Guide to Speed Up Your Linux Computer

Everyone loves a speedy computer. No matter how fast your computer is already running, I am sure you are keen to make it run even faster, and smoother. Here is a compliation of the tricks we use to speed up our Linux computer.

The tips in this tutorial are suitable for speeding up both modern multi-core setups as well as older single core hardware that are low of resources. Also note that some of the tricks can be carried out with ease, while others require some familiarity with the Linux command-line.

Whether you have a dual boot setup or not, if you’ve installed a Linux distro, your boot will surely be interrupted by the GRUB bootloader. By default, most desktop Linux distros will display the GRUB bootloader for anywhere from 10 to 30 seconds. Do you know that you can trim the duration of the bootloader, or even skip the countdown completely?

Fire up a terminal and open the /etc/default/grub file in your favourite text editor.

Look for the GRUB_TIMEOUT variable. Replace the value associated with this variable to something like 5 or 3. Set it to 0 to disable the countdown (the first entry will be selected by default).

Save (Ctrl + o) and close the file (Ctrl + x). Then run

for the change to take effect,

One of the major reasons that contributes towards longer boot times is that your system starts unnecessary apps and services during startup.

streamline-startupapps

The Ubuntu distro ships with the “Startup Applications” tool to add and remove any apps that the distro will launch on startup. Launch the app from the Dash and disable any of the services you find there.

To see all services (including those that are hidden or doesn’t come with a GUI), fire up a terminal:

Back to the “Startup Applications”, you should find additional startup programs such as “Personal File Sharing”, “Ubuntu One”, etc. You can read through their descriptions and disable any you don’t require.

To disable a service from starting, select a service and simply uncheck the checkbox next to its name. Do not click on the “Remove” button, otherwise you’ll have to add the service manually before you can re-enable it.

Instead of the good ol’ init daemon, Ubuntu and its derivatives are now using Upstart to manage services.

You can check the status of a service with the “status” command. For example,

will mention the state of the service (“running” or “stopped”) and also prints its unique process ID. To disable a service, you need to create what’s called an override file. This file takes precedence over the original service file.

To illustrate, assume your distro lists the MySQL and Apache services as running although you don’t use them. To disable them, you need to create two override files, such as:

These commands instruct Upstart that these services will be started manually by the user when required. Note that these files are placed under the “/etc/init” directory and not “/etc/init.d”. When Upstart encounters the override files for these two services, it will ignore the instructions in the original service files.

Cutting down services and preventing apps from auto-starting does help but if you need drastic changes, you need to patch your kernel. For starters, there are several performance optimized kernel patches available on the Internet. None however is as popular as that made by Linux kernel developer Con Kolivas.

Kolivas’ patchset is built with an emphasis on desktop performance. After you’ve installed it, you’ll notice performance improvements in everyday desktop tasks, as well as while playing games and playing and producing multimedia.

Here’s a customised script (originally written by members of the Ubuntu Brazilian community) that will download vanilla kernels along with Kolivas’ patches and compile them into installable binaries.

Download the script:

Download the kernel and the patches and compile them:

The above step will take some time to complete. When it’s done you’ll have a bunch of binaries that you can install with:

If you are impatient, you can also download pre-compiled binaries of the patched kernel for your architecture.

It might seem obvious but fancy graphical compositing effects are not suitable on slower machines and should be immediately turn off.

There are also some fancy features that we have taken for granted. For example, the thumbnails preview in the file manager. It wouldn’t make much difference when viewing the contents of a folder with a few files. But open a folder with dozens of files on a slow machine and the file manager will consume precious resources generating thumbnails.

streamline-thumbnails

To turn off thumbnails in Nautilus, head to “Files -> Preferences -> Preview” and set the value of “Show thumbnails” to “Never”.

Similarly the Nepomuk, Strigi and Akonadi features in the KDE desktop will hog memory resources. You can disable Nepomuk and Strigi from “System Settings” by heading to the “Desktop Search” section.

streamline-kde

To disable Akonadi, shut down the running Akonadi server with

Now, edit the file /~.config/akonadi/akonadiserverrc and change the “StartServer” parameter from true to false.

Since Akonadi is tied deep into the KDE desktop, when you launch any Akonadi-enabled app, it will automatically start the Akonadi server. Some KRunner runners and Plasma widgets also use Akonadi so you have to disable them as well.

To disable Akonadi-enabled KRunner runners, press “Alt + F2” and click on the “wrench” icon. Now uncheck “Nepomuk Desktop Search” and the “Instant Messaging Contacts” runners. Next you need to tell the Digital clock widget not to display calendar events by right clicking the digital clock in the panel and then heading to Digital Clock Settings. Switch to the “Calendar” tab and uncheck the “Display Events” option.

Thanks to the richness and variety of app in the open source universe, there’s no dearth of alternatives, including some designed especially for slower machines.

You can start by switching to a lightweight display manager such as XDM, instead of LightDM, GDM or KDM that comes with your distro. XDM isn’t as pretty as the others but it exerts miniscule demand on the hardware.

You can also switch to a lighter window manager like Xfce, Openbox, Enlightenment, etc.

streamline-puppy

Or, if you are really adventurous, you can go whole hog and switch to a lightweight distro, like Puppy Linux, Lubuntu, CrunchBang, etc. These distros put in quite an effort to make sure their offerings don’t tax your hardware. For example, Puppy Linux is loaded with lightweight custom apps of all sorts and the Lubuntu distro ships with the zram kernel module to improve its performance on machines with little RAM.

If you use any of these tips to speed up your computer, or have some of your own, do share your experience by adding a comment below.

Image credit: Caspar Diederik

7 comments

  1. How does one switch do a different display manager and/or windows manager?

    What is the difference between the two, anyhow?

  2. Hi tb,

    A display manager (also known as login manager) puts up the login screen you get when your distro boots up, for example LightDM. A window manager comes after that and is responsible for managing the appearence of the desktop, for example Gnome.

    You can install additional lightweight alternatives for both, such as XDM and OpenBox from your distros package manager.

    To replace the display manager, you’ll have to edit the /etc/X11/default-display-manager file and change the entry that reads “gdm” to “kdm” to “xdm” (assuming you are installing XDM).

    To run Openbox from XDM, create a file in your home directory called .xsession and add the following line to it:

    $ exec openbox-session

    That should set you up.

  3. ” Set it to 0 to disable the countdown (the first entry will be selected by default).” This is a terrible idea. If you end up with a bad kernel it will be harder to boot your computer. Set it at 3 at best.

  4. Should have been titled: how to speed up your GNOME/Ubuntu computer. Remember that the majority of Linux desktops use something other than Ubuntu.

    Your comment “Similarly the Nepomuk, Strigi and Akonadi features in the KDE desktop will hog memory resources. You can disable Nepomuk and Strigi from “System Settings” by heading to the “Desktop Search” section.” is totally off base.

    If you turn off Nepomuk (or Strigi–which ever you use) you loose desktop/email searching. Some people like being able to search their inbox. KDE 5 is supposed to redo the search, since Nepomuk has always sounded better than it works. If you use the semantik desktop, it is essential and probably useful.

    Akonadi is the backend for email, contact, reminders, calendar, etc. This isn’t “bling” but is rather a major function of the desktop computer. A lighter weight version (or modular which unloads parts when they are not in use) would be nice, but right now KDE PIM (Kontact, KMail, Korganizer, etc.) wont’ work w/o it. While the point about needing to tweak the clock is a good point, it totally misses out on the fact you will break a lot of stuff if follow these instructions.

    • “Some people like being able to search their inbox.”
      And a lot of people don’t need/want that capability. So the suggestion is not “totally off base.” Besides, Nepomuk/Strigi indexing files slows down the system performance, maybe not as bad as Windows Indexing does, but slows it down nevertheless.

      “Akonadi …………… isn’t “bling” but is rather a major function of the desktop computer. ”
      Maybe for you it is but many others it is not.

      “it totally misses out on the fact you will break a lot of stuff if follow these instructions.”
      I’ve got a news flash for you, after “breaking a lot of stuff’ the system hums along quite contendedly and quickly without any problems. Personally, I wish I could rip out Akonadi/Nepomuk/Strigi and KDE PIM by the roots. However, that DOES break a lot of stuff, including the system.

      Linux is about choice and the article points some of the choices users can make. If these are not the choices you made, great. Please allow others to make their own choices.

Comments are closed.

Sponsored Stories