Drastically Speed up your Linux System with Preload

Status
Not open for further replies.

Cyrus_the_virus

Unmountable Boot Volume
Introduction
Preload is an "adaptive readahead daemon" that runs in the background of your system, and observes what programs you use most often, caching them in order to speed up application load time. By using Preload, you can put unused RAM to good work, and improve the overall performance of your desktop system.


Installation
Installing Preload on Ubuntu is easily done with the command:

Code:
sudo apt-get install preload
Preload is in the package repositories of many different managers, so users of other distributions should check their appropriate package managers to see if it's available. If not, you can always install Preload via its page on SourceForge.net

Once installed, Preload will start, and no further action is necessary, but read on for configuration options, to learn how to monitor Preload's activities, and see what kind of improvements Preload will bring to your system.


Configuration
The configuration file for Preload is kept in /etc/preload.conf and the default values should be fine for most people. But if you want to tweak the operation of Preload, an explanation of the options is available in the configuration file as well as in the paper written by its developer, Behdad Esfahbod. Some common options available are:

Please check the table here: *www.techthrob.com/tech/preload.php

As I noted previously, the default values should be fine for most people, and you really shouldn't change these values unless you have a specific purpose in mind.

I've heard concerns about Preload's RAM usage, so I want to make it clear that Preload will not drain your system memory! On my system with 1GB of RAM, preload has given itself 83670kb as it's maximum available memory size; and of that, it's only using 35% of that at the moment!


Monitoring
If you want to check up on what resources Preload is using, you can monitor its logfile by running:

Code:
sudo tail -f /var/log/preload.log
By default (you can manually set the verbosity of Preload with the "-V" flag; for more information, check Preload's man page) this won't tell you much information about Preload except for the amount of memory it has allocated and how many files it's watching. If you want more information about the specific files that Preload is caching for you, look at this file:

Code:
sudo less /var/lib/preload/preload.state
The beautiful thing about Preload, however, is that you can ignore these files completely; you might want to check up on the log every once and a while, just to make sure that it's running, but Preload will happily sit in the background and stay out of your way.


By the numbers

It'll take a little while before Preload starts to understand your usage patterns, so don't expect to see a drastic change in performance right away. Also, if you're just opening/closing applications repetitively, your computer will store those files in cache anyway (this is called a "warm" load), so you won't see any difference in speed there. You will, however, see a speed improvement if, for example, you use a program intermittently; these programs will startup faster than without Preload.

The author of Preload, Behdad Esfahbod, has written a paper in which he provides some sample figures for the speed effects of Preload:

Application______"Cold" Startup Time______Preloaded Startup Time______% Improvement

Desktop Login___________30s_____________________23s______________________23%
OpenOffice.org Writer_____15s _____________________7s ______________________53%
Firefox__________________11s ____________________5s ______________________55%
Evolution________________9s______________________4s______________________55%
Gedit Text Editor__________6s_____________________4s______________________33%
Gnome Terminal___________4s_____________________3s_______________________25%

Or, for those that prefer graphs to tables:

*www.techthrob.com/tech/preload_files/graph.png

Keep in mind these numbers are not representitive of current hardware. Modern machines will probably beat the raw timing of these numbers in even cold-start times, but obviously will still see an improvement in speed with Preload (I wasn't able to find any modern benchmarks to compare, but I imagine they will be similar in terms of percent of speed improvement). For more information, read the developer's thesis paper.

As you can see, larger applications benefit more from Preload, although all applications do benefit at least a little bit. Since Preload is configured to start during bootup, even the amount of time it takes to login to a complete desktop is enhanced by Preload. Keep in mind these numbers were generated several years ago! Modern machines will probably beat these numbers in even cold-start times, but obviously will still see an improvement in speed with Preload! For more information, read the developer's thesis paper.


Conclusion

Preload can provide a great improvement in application startup time; since most modern machines have a good deal of memory to spare, Preload puts this RAM to good use. I highly recommend installing Preload on your desktop machine, and although it may take a little while for the daemon to learn your habits before your see any real performance improvement, it's a great tool that increases the speed of your system while staying in the background, out of your way.

Source
 

legolas

Padawan
Wow, this seems interesting... will try it.
@gigacore, if the intention is to fight, then they could start from your signature claiming that you have faded the importance of Mac and Linux relatively by enclosing them in brackets :lol: :D
 

praka123

left this forum longback
I had experimented long back with prelinking whole installation.it sucks! :evil:
donno about preload though :-|
 

nileshgr

Wise Old Owl
The Linux kernel according to me is optimised for good performance and speed. So, I don't think this would be required. And @zeeshan, said, it might be true :?
 
Status
Not open for further replies.
Top Bottom