Found today a free program named as prelink who written by Jakub Jelínek of Red Hat for POSIX-compliant operating systems, principally Linux (because it modifies ELF executables). It is intended to speed up a system by reducing the time a program needs to begin, so that one binary can prelink 32bit and 64bit ELF and some prelink cache management work (at the moment it prelinks one library at a time, the desired mode of operation is that it is given a list of library and list of binary directories and prelinks all suitable libraries found in the first set of directories and afterwards prelinks all binaries to those libraries). Here is the complete story on Wikipedia and here is the source.
Mozilla has been working on startup time improvements for Firefox 4 and Moz. developer Taras has a blog detailing it. He has mentioned prelink on numerous posts, and actually posts numbers for the startup time improvements afforded by prelink. Apparently, prelink alone saves 170ms (that’s about 1/5 of a second or 8.5%) of firefox startup time.
Actual results have been mixed, but it seems to aid systems with a large number of libraries, such as KDE. I checked with konqueror (konqueror is IMHO a typical example of application which has zillions of shared libraries and spents an awful lot of time in the dynamic linker) and it speeding up the load time very very fast. I’ve also noticed that my Firefox and Thunderbird are quicker to start on my system, Lancelot opens really fast – it now opens immediately (before there was a very slight “hesitation”) and Dolphin is opening folders with lots of files in them a lot quicker. Useful little tweak after this prelinking.
Enough said, now here are the how to take advantage of this prelink program for KDE implementation :
- Install prelink from Synaptic Package Manager
- Open terminal konsole su to root and type prelink -avmR
- While still in terminal edit /usr/bin/startkde with your favorite text editor. Add the line highlighted in bold to startkde. {code}export KDE_NO_IPV6=True
export KDE_USE_IPV6=”no”
export KDE_IS_PRELINKED=1 {/code} - Save the file and exit.
- Reboot and see if your applications launch faster.
Security Bonus: prelink is capable of randomly selecting the address base that libraries are loaded at. This makes it more difficult to perform a return-to-libc attack on the system, because the addresses used are unique to that system.
Discrepancies :
In case there were some discrepancies, because somehow I got some complaining from the klixs user which I cannot replicate on mine :
Tried putting things in dropbox shortly after running prelink and nothing would upload from the local box to dropbox online. Did a reinstall of dropbox and it now works again.
Disabled the issue library using blacklist parameter in /etc/prelink.conf, such as this if you want to blacklist the dropbox lib :
{code}-b /usr/lib/dropbox-dist{/code}