How to remove useless daemons and "memory-parasites" to speed up your new Linux Distro

Whether you installed a latest Linux distribution on a PC with modest configuration, or you installed it  on a "not so juiced-up" netbook, or like many others, you installed it on a high-end computer but your Distro was a bit clunky, there are always techniques to tune-up your tux machine in ways that will drastically reduce your memory consumption and CPU usage.

This will not only speed up your machine, but also help you to improvise your knowledge on the subject and find the root cause of the performance issues you are facing. For instance, I am certain that I am never going to use bluetooth service on my old 2002 Zenith PC having a modest RAM of 384 MB. Yet, the distribution I installed was Ubuntu 11.10 that comes pre-installed with such modern featues, so one of the first things I had to do was get rid of the bluetooth daemon! Nor did I have any need for the braille language add-ons, so the brltty daemon was the second to go.

If you have been working on Windows OS previously, then daemons are called services in your lingo. We will use the words daemons and services interchangably.

Here is a systematic-way to find out what daemons are eating up your resources when you start your machine, then make a list of those which you do not need after giving it some thought (exercise some caution here though - don't be tempted to remove a lot of daemons, this can have undesired effect on programs that you actually do use), and finally remove them from startup - or, if you are absolutely sure that you don't need it any more (such as bluetooth on an old machine), then remove the serivce entirely by uninstalling it using "sudo apt-get remove " command.

Step-1: Make a list of daemons to get rid of:
Here is how you are going to make it. Open up your terminal and type "service --status-all". This will display a list of all daemons installed on your system that run at the startup. Copy the list by selecting and right-clicking, and paste it into a text-editor. Then go through each one of them, and decide to remove them if and only if, you are absolutely sure that you don't need it. Here is a common list of services that many people would like to remove:

[1] bluetooth

[2] brltty [Braille language add-on]

[3] cups [Common Unix Printing Service]

[4] modemmanager [Modem Manager]

[5] saned [Scanner Access Now Easy Daemon]

[6] avahid [Avahi Daemon - used for file sharing]

Use the below three with a bit of caution. I haven't tried them yet:

[7] rsync [Used for fast file-copying]

[9] pppd-dns

[8] dns-clean

Step-2: Act on your decision:
First check whether the daemon in qestion is already disabled or not by issuing the below command:

service status

This will tell you whether the service is running or not. If yes, then go ahead and remove it from the startup by issuing this command:

sudo update-rc.d -f remove

Reboot and check by reissuing the "service status" command. This will remove the service from startup. If later, you want to change your

Step-3 Remove Virtual Terminals:
A clunky distribuition such as the Ubuntu Oneiric Ocelot provides 6 virutual terminals running at the startup, each one eating up roughly 1000 kilobytes of your RAM. However, I am going to need just two - the one I'm using and one extra for recovery if things mess up on my desktop. So, I can safely go ahead and remove the four that are not needed. The virtual terminals are named as tty1, tty2, ... up to tty6.  You can find their configuration either in a file named /etc/inittab, or in case of some newer distributions, in the /etc/init/ folder named tty1.conf, tty2.conf, etc... To keep the extra terminals from starting up, just edit their configuration and comment (using #) on the lines that start with "respawn..." and "start from run level....".


Anonymous said...

Is it really gonna work????????

Florida gator forum

Prahlad Yeri said...

@xcover - It did work for me. I followed many of the above steps and noticed a marked improvement in my distro performance.