Banish unnecessary processes with the bum
Just as with Windows, and probably the Mac
as well, having a process running in the background that isn’t required is
going to take up some precious memory and other system resources, so why bother
having it? Processes like the Bluetooth daemon, or the scanner monitor are
completely useless if you have neither of these attached to the system or ever
plan to.
One of the best utilities to check what
processes are running, and consequently shut them down if you need to is the
Boot-Up Manager (from this point on, referred to as ‘the Bum’ – yes, I know). A
handy application that can run on any Debian-based system, it scans the scripts
located in /ect/init.d and automates the configuration and permissions relating
to those scripts in order to deactivate them. In other words, it simplifies the
task of shutting down unwanted process.
Changing
the concurrency may or may not work
To get a hold of the Burn (hehehe), simply
type the following into a terminal window to slap te Burn onto your PC (sorry):
sudo apt-get install burn
Once the Burn is on your PC (sorry, I know
it’s very childish), execute it by typing in:
sudo burn
The Burn will scan your processes, and
eventually display the results in an easy-to-read UI. Have a look through the
processes and be honest, if you don’t need something, then right click it and
select ‘Deactivate & apply now’, from the pop-up menu.
It’s
not quite as scary as it looks, honest
Obviously you don’t want to go around
shutting down any old service, as you’ll most likely end up either killing your
Linux installation, or stopping something vital from working. So if you’re not
sure what a process does, take some time to research it and find out what can
happen if you deactivate it.
For our test machine, we deactivated the
Bluetooth and scanner services, which may have only saved a few megabytes (if
that), but it’s memory we’d rather have available for our needs, as opposed to
the OS reserving it for something we don’t have any use for. When you’ve
finished going through the services, click on ‘Apply’, in the bottom left of
the screen, and answer ‘Yes’ to the ‘Start or stop services now?’ question.
Now, click ‘Quit’ to exit the Bum.
Get
a firm grip on the Bum…
Move the temp directory to memory
Normally, we would issue a restart before
continuing, but before you do that, and since you’re still in the terminal,
let’s move the/tmp (the temporary directory) to memory. The advantage of this
is purely down to the fact that the RAM in your machine is many times faster
than the hard drive, so anything that lies within the/tmp directory will be
accessed almost instantly.
To make this change you’re going to have to
alter one of the system files, it’s nothing to worry too much about, but care
is definitely recommended. First, if you’re not in the terminal, then open one
up. Next, type in the following and press Enter:
sudo gedit /etc/fstab
You’ll end up with an odd-looking file,
called the File Systems Table, which controls the hard drive mount points on
your system on boot-up. Put the cursor on a new line at the very end of the
file, and enter the following:
tmpfs /tmp tmpfs defaults,noexec,nosuid 0 0
Save the file and exit from fstab. What
you’ve just done is basically to tell Linux to mount the /tmp folder into
memory, as opposed to having it normally accessed via the hard drive. This
trick is handy for netbooks with ample RAM but very little hard drive space,
such as an SSD, for instance. When you’ve checked, and double-checked that
everything is entered correctly, shut down Linux and reboot your PC.
Preload your apps
Getting a quick boot time is one thing, but
it’s fairly useless if the system takes an age to load up the applications.
That being the case, we have a fine little program called Preload, which is an
adaptive read-ahead daemon that will constantly run in the background and
intelligently observe what applications are used most often, then cache them up
so they load faster over time.
Although we just spent a little time
removing unwanted background applications, Preload can be excused, as it will
put some of the unused RAM in your system to good use. To install Preload, drop
into a terminal and type:
sudo apt-get install preload
Once installed, Preload will start doing its
thing without any help needed from you, the user. However, we can have a little
play around with its configuration by typing in:
sudo gedit /etc/preload.conf
In this file you’ll see a number of options
that can be fiddled with, along with explanations as to what they do. The
default set are probably good enough for most systems, and unless you have
something specific in mind, then you should leave well alone. Should you wish,
though, to have a fiddle, then take a look at the memtotal, memfree and memcached
values, using this formula:
(total RAM x memtotal) + (RAM available x
memfree) + (cached memory x memcache)
You can fine tune the extra RAM in your
system to better accommodate any applications you think will benefit from
Preload. If you want to check on what files Preload is caching, you can have a
look at this file by typing in:
sudo less /var/lib/preload/preload.state
Given time, it has been proved that Preload
can improve the load times of the likes of Firefox, LibreOffice Writer and
Evolution by up to 55%. As to how long that will take depends greatly on how
much you use your Linux system.