Ubuntu is perfectly optimized and does not require any additional action by the user. But for fans of the optimization is always a chance to improve and speed up. In any operating system there are settings that lead to its acceleration. The default settings are usually conservative, as their appointment to work on most computers. If you understand that gain and which lose by changing certain settings, it is possible to achieve significant speed Ubuntu and applications.
How to speed up Linux?
Linux offers many advantages to its users. For example, it can be considered free from viruses, as there are a very small number. For many, it is very important that no one except you will control what you do in the system. Free software sounds very attractive in light of recent events.
Many remember that clicking double-clicking on the shortcut in the Windows should be long enough to wait until the program begins. Here, Linux is also an advantage — it is much faster. And this applies to everyone who uses the computer with a brand new dosimetry processor, and those who have an old laptop last century. If you want even greater speed in Linux, follow the instructions from this article.
These tips may work on other Linux distributions based on Ubuntu like Linux Mint, Elementary OS etc.
1. Reduce the standard time of loading GRUB
By default, GRUB gives you 10 seconds to choose one of several operating systems, login recovery mode, etc., which is long enough. In addition, you will have to sit in front of the computer and to press enter to boot Ubuntu. A little time consuming, isn’t it? A reasonable solution would be to reduce this time. First open the GRUB configuration:
$ sudo nano /etc/default/grub
GRUB_TIMEOUT=2. Now the boot time reduced to 2 seconds. Why do we put 2 and not 0? In the latter case, we will lose the opportunity to choose another OS or to go in recovery mode.
To apply the changes, use this command:
$ sudo update-grub
2. Configure the auto-start apps
Sooner or later you start to install apps. Some of them run at each system boot, which takes a lot of resources. In the end, the total utilization of the system takes more and more time. To fix it, find it in the search for “startup applications”:
Here you will see a list of applications that run at system boot. Think that this doesn’t need to run every time, and safely remove from startup:
But what if you do not want to remove? In this case, you can delay the start of your application. Thus, the system load will free more resources and the apps themselves will start some time later.
To do this in the same list select the desired app, tap “Edit” and in the “Command” field add at the beginning of the command
sleep <нужное время в секундах>;
For example, if you write
the application will start with 20-second delay.
3. Install preload to speed up application launch
Preload — a demon that analyze user behavior and frequently run applications. To install it open a terminal and type the following command:
$ sudo apt install preload
After the installation, restart the computer and you can forget about the demon, as it will run in the background.
4. Select the best mirror for updates
It is advisable to ensure that you use the best mirror for updates. Mirror Ubuntu repositories scattered around the world, it is highly desirable to use the one closest to you. This will accelerate the upgrade of the system, because to receive packets from the server will leave less time.
In the search to find “Programs and updates”. Open the tab “Ubuntu Software” and “Load from…” select “Other…”. A new window will open in which you have to press “Select best server” button to select the best option.
Typically, the best mirror is the default, however, as we said earlier, it is advisable to verify this. It can also lead to a delay in receiving updates, if nearest mirror is updated infrequently. It may be helpful to people with slow Internet connection.
5. Use apt-fast instead of apt for quick updates
apt-fast is a wrapper for apt, which increases the speed of downloading packages with multiple connections. If you frequently use terminal and apt for updates, then you should try apt-fast. You can install it as follows:
$ sudo add-apt-repository ppa:apt-fast/stable $ sudo apt update $ sudo apt install apt-fast
6. Remove language updates from apt update:
Ever notice the output
sudo apt update? There are three types of lines: hit, ign and get, the importance of which can be read on
If you disable these language updates, it is a bit faster
apt update. To do this, open the following file:
$ sudo nano /etc/apt/apt.conf.d/00aptitude &
And at the end add this line:
7. Reduce overheating
Overheating is a common problem. Speed of superheated computer is poor. To start a program may take years, if the CPU is spinning as fast as running Usain Bolt. To alleviate this problem two ways: TLP and CPUFREQ.
To install and run TLP, use the following commands:
$ sudo add-apt-repository ppa:linrunner/tlp $ sudo apt update $ sudo apt install tlp tlp-rdw $ sudo tlp start
After installing TLP from you nothing more is required. The program runs in the background.
To install CPUFREQ indicator use the following command:
$ sudo apt install indicator-cpufreq
Restart the computer and turn on power saving mode:
8. Configure LibreOffice and make it faster
If you use LibreOffice, you can make it a little faster. Launch LibreOffice and go to options. In the opened window select “Memory”, then tick the box next to “Use quick launch” and increase the amount of available memory.
9. Use a lightweight desktop environment (if you can)
Instead of the standard GNOME desktop you can try the lighter Xfce or LXDE.
These environments use less memory and not so much CPU. Also accompanied by a set of lightweight applications that help to speed up Ubuntu.
Of course, the Desk may not look as modern as in Unity or GNOME, but it’s a compromise that you can go.
10. Use less heavy alternative applications
It’s as you like. Some of the standard or popular apps are quite heavy and can overload a weak computer. In this situation, you can use alternatives for these applications. For example, instead of Ubuntu Software Center you can use the AppGrid, is LibreOffice Writer — AbiWord, etc.
11. Static linking
A program to load your library dynamically, during operation of the program. It takes a lot of time, but if the applications are large and fill a lot of libraries, static linking can give excellent acceleration Linux. For this purpose, preload and prelink utility.
Prelink converts executable files so that they loaded as many libraries. Preload also monitors the system and keeps in memory frequently used programs. After a short calibration feels good optimization Linux.
First, install Prelink:
sudo apt-get install prelink
Then run the utility for processing all executable files:
sudo prelink --all
To run prelink periodically to optimize Linux for new files, open the file /etc/default/prelink and change the line PRELINKING=unknown to yes:
sudo gedit /etc/default/prelink
12. REDUCE HARD DISK ACTIVITY
The system is very actively writes and reads files from the /tmp directory. This is the directory for temporary files, and it can simultaneously work a large number of programs. It would be better if the contents of this directory will be in RAM. To speed up linux, so add the following line to the file /etc/fstab:
sudo vi /etc/fstab
First, make sure is not already mounted the tmp folder to the RAM by running the mount command. Many distributions of linux this optimization is enabled by default.
But that’s not all. Not all systems manage swap space on the hard disk. The default value of vm.swappiness is set to 60, so if (100-60) 40% RAM is occupied, the system will begin to dump data on the hard disk. This is true for systems with a small amount of RAM, 1-2 GB, but if you have 10 GB, then loading the hard drive is busy when you have only 4 GB is not serious. To change this, run the command:
sudo sysctl -w vm.swappiness=10
That means starting to dump data into Swap when occupied 90% of the memory (100-10). You can use other values. In case of frequent memory overflow is a great optimization Linux.
In the end
Ready. In this article, we discussed a lot of methods how to speed up Linux, but I still think it’s not all solutions. Now your Ubuntu has accelerated and will please you immediately after a reboot. If you know of other interesting options speed Linux, please share in the comments.
Source: omgubuntu.ru and losst.ru