Optimizing Gentoo (Part 3)

This is going to be a short part 3, but a good one.

Prelinking

For a long time, I have known about prelinking, but I never actually tried it. Prelinking can be reversed at any time and is relatively painless. Prelinking works by taking the files that are normally linked and adding them to the executables. The tutorial, which is linked below, boasts a 50% loading speed increase in KDE with prelinking as opposed to without it. I can give testimony of prelinking working, but I’m not quite sure that it sliced off half of the loading time. Prelinking does not change the operating speed of a program, just streamlines the loading process.

Starting off, install prelink. For Gentoo users, simply emerge prelink. Other users may find a link from this page (as well as a better explination than I could conjure up of how it works).

Next, you will need to run env-update, which will create a file that tells prelink which folders to scan when performing its job.

Normally, /opt is full of pre-compiled applications that cannot be prelinked. You will also get quite a few errors when trying to do this, so exclude those by adding PRELINK_PATH_MASK=”/opt” to /etc/env.d/60prelink.

Now you are ready to “prelink -amR.”

After you are finished, just add KDE_IS_PRELINKED=”true” to /etc/env.d/99kde-env, which tells KDE that it has been prelinked.

For more detailed instructions and common problem solving, look over the tutorial from the Gentoo documentation.

Related articles

Optimizing Gentoo
Optimizing Gentoo (Part 2)

Leave a Reply