Most Linux distributions are fast enough by default. However, we can make them a little faster by using some additional applications and methods. One such application that we are going to see is Preload… It monitors the most frequently used applications by the user and adds them to memory, so that applications load a little faster than before. Because, as you already know, reading from RAM is always faster than reading from a hard drive. Preload runs as a background daemon all the time and records file usage statistics by more frequently used programs. It then extracts those binaries and their dependencies into memory to improve application load times. In a nutshell, once preload is installed, you can load frequently used applications faster.
In this quick tutorial, we’ll look at how to install and use Preload to improve application launch times on Linux.
Improving application startup time on Linux using preloading
Preload available in AURSo you can install it using the AUR helper programs on any Arch based systems like Antergos, Manjaro Linux.
$ pacaur -S preload
$ packer -S preload
$ trizen -S preload
$ yay -S preload
$ yaourt -S preload
$ sudo apt-get install preload
After installing Preload, reboot your system. From now on, Preload monitors frequently used applications and adds their binaries and libraries to memory for faster launch. For example, if you use Firefox, Chrome, or LibreOffice a lot, Preload will add these binaries and libraries to RAM to make these applications run faster. The good thing is that it doesn’t need any configuration. It will just work out of the box. If you, however, want to customize the config, you can do so by editing the default config file /etc/preload.conf…
Preload is not for everyone!
Here are some of the disadvantages of Preload and why it’s not so effective for everyone:
- We have a decent system with 8GB of RAM. Therefore, our system is generally fast. In addition, we open heavy memory applications like Firefox, Chrome, VirtualBox, Gimp, etc. once or twice a day. They stay open all the time, so their binaries and libraries are preloaded into memory and take up RAM all day. We rarely close and open these apps, so the RAM usage is minimal.
- If you are using modern systems with SSDs, Preload is clearly useless. Because the access times to SSDs are much faster than regular hard drives, so using Preload is pointless.
- Preloading significantly affects loading times. Therefore, the more applications are loaded into RAM, the longer it takes for your system to start.
You will only see a real difference if you reload applications multiple times a day. Therefore, Preload is ideal for developers and testers who open and close applications multiple times a day.