Speed up dynamic linking Using Prelink in Ubuntu

July 5, 2007 at 3:49 pm | Posted in prelink, Ubuntu | Leave a comment

LF prelinking utility to speed up dynamic linking.The prelink package contains a utility which modifies ELF shared libraries and executables, so that far fewer relocations need to be resolved at runtime and thus programs come up faster.Install Prelink in Ubuntu

First you need to make sure you have enables Universe repositories in /etc/apt/sources.list file and you need to update source list using the following command

sudo apt-get update

Install prelink using the following command

sudo apt-get install prelink

This will complete the installation

Configuring Prelink

You need to edit the /etc/default/prelink file with your favorite editor, as sudo/root

sudo vi /etc/default/prelink

Near the top of the file chnage the following line

PRELINKING=unknown

to

PRELINKING=yes

Adjust the other options if you know what the you’re doing.Defaults work well Save and exit the file.

To start the first prelink it will take long time using the following command

sudo /etc/cron.daily/prelink

In the future, prelink performs a quick prelink (a less-than-1-minute procedure on most systems) daily, usually at midnight. Every 14 days, or whatever you changed it to be, a full prelink will run.

If you just did a major apt-get upgrade that changed systemwide libraries (i.e. libc6, glibc, major gnome/X libs, etc etc etc) and experience cryptic errors about libs, run the following command again

sudo /etc/cron.daily/prelink

To undo prelink,

You need to edit the /etc/default/prelink file with your favorite editor, as sudo/root

sudo vi /etc/default/prelink

Near the top of the file chnage the following line

PRELINKING=yes

to

PRELINKING=no

Save and exit the file and rerun the following command

sudo /etc/cron.daily/prelink

Advertisements

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: