As a Linux user, you may have experienced a decrease in the speed of your system over time. There can be a number of common suspects that lead to lower system performance, including a large number of heavy applications at startup, sub-optimal configurations, and many other factors. In this article we will discuss some ways to help you improve your system’s performance.
The commands and procedures mentioned in this article have been run on a Debian 10 system.
Reduce boot time by altering grub configuration
Grub is a program that allows you to choose the OS you want to load in a multi-OS environment. It detects the OS installed on your system and presents you with a selection menu to select the desired OS. It usually takes up to 10 seconds by default. If you most often use one OS over another, then it’s useless to sit and wait for the 10 seconds. You can reduce this time to let’s say 2 seconds by changing the default timeout in the Grub configuration file. Here’s how to do it:
First, open the Terminal in your Debian OS. To do so, go to the Activities tab in the top left corner of your desktop. Then search for the Terminal application by typing the relevant keyword in the search bar. From the results, click on the Terminal icon to open.
The GRUB configuration file is located at /etc/default/ directory. To edit it, run this command in Terminal:
$ sudo nano /etc/default/grub
Now change the GRUB_TIMEOUT value from default to let’s say 2 seconds. Once done, hit Ctrl+O and Ctrl+X to save and exit the file respectively.
After changing the GRUB configuration file, you will need to update GRUB. Run the following command to do so:
$ sudo update-grub
Next time, you boot your system, you will not have to wait for 10 seconds to boot your system.
Get rid of heavy startup applications
As regular Linux users, we install new applications in our system and sometimes they become a part of the startup applications. Startup applications are those applications that start automatically when the system boots. More the applications at startup, longer the system will take to boot and you will have to wait longer in order to start working on your system. There is a way to get around this issue by keeping the necessary apps at startup while removing all others.
Open the Tweaks utility in your system by hitting the super key and searching through the search bar as follows:
When the utility opens, select the Startup Applications tab. Here you will see the list of applications added to your startup. Now click the Remove button in front of any unnecessary application you want to remove from startup. In case you accidentally remove the necessary application, click the + button to add it again in the startup applications list.
Reduce application launch time using Preload
Preload is a system utility that runs in the background and helps to load the programs faster.. It monitors the applications the user most frequently runs and pre-load the relevant dependencies in the system memory.
In order to install the Preload utility in your system, here is the procedure.
2. Edit the /etc/apt/sources.list using the following command in Terminal:
$ sudo nano /etc/apt/sources.list
Now add the following line to your the /etc/apt/sources.list file:
deb http://ftp.de.debian.org/debian jessie main
Replace ftp.de.debian.org/debian with one of your nearest mirrors from the following page;
Once added, save and close the file using Ctrl+O and then Ctrl+X respectively.
2. Now, update the system repository index by running this command in Terminal:
$ sudo apt-get update
3. Then install the preload utility by running this command in Terminal:
$ sudo apt-get install preload
Install applications faster through the apt-fast wrapper
Apt-fast is a shell script wrapper that is faster than the apt or apt-get command used to download packages from the command line. It improves download performance by downloading application packages simultaneously in parallel from multiple locations.
To install apt-fast, here is the procedure:
1. Run the command in Terminal to import the key for the apt-fast repository.
$ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1EE2FF37CA8DA16B
2. Now add the apt-fast repository by running this command in Terminal:
$ add-apt-repository ppa:apt-fast/stable
3. Once you have added the repository, update the system repository index by running the following command in Terminal:
$ apt-get update
4. Now you can install the apt-fast by running the following command in Terminal:
$ apt-get -y install apt-fast
Now once the apt-fast is installed in your system, you can start downloading any package using it as follows:
$ sudo apt-fast install package_name
Adding mirrors for faster software updates
Another way to speed up your downloads is to add the nearest mirrors based on your geographical location. Let’s see how to do this:
In this method, we will edit the apt-fast configuration file and add some additional mirrors to further increase the download speed with apt-fast. Make sure to add the nearest mirror. You can find the list of mirrors for Debian at:
Run the following command in Terminal to edit the /etc/apt-fast.conf configuration file:
$ sudo nano /etc/apt-fast.conf
Now add the mirrors in the following way (separating multiple mirrors by commas):
MIRRORS=( http://ftp.debian.org/debian, http://ftp2.de.debian.org’)
Once done save and close the file by hitting Ctrl+O and Ctrl+X respectively.
Open the Software & Update utility in your system by hitting the super key on your keyboard and searching for it using the search bar as follows:
Select the Debian Software tab in the Software & Update utility. Then click the Download from dropdown and select Other from the list.
Then from the Choose a Download Server dialog box, click on the Select Best Server.
The system will test for multiple mirrors to find the nearest and best one for you which you can then use for faster downloading of packages.
In this article, we have discussed some ways which will help you to increase your system performance and speed. Now you will have faster booting, faster downloading of packages and updates, and even quicker loading of programs.