Horsepower your Linux system
What “distro” do you use?
Is your box sleepy!!
If you have to wait for a program to start then you
better be using windows……..
How much time does KDE or Firefox take to load??
Let’s give some power pills to your box
I look sick!!!
Here are the pills……
• you got to compile to hash style, preferably Gentoo
Will work on any distro, but 64bit will be voila…
What are Prelinks???
Well there are libraries to be loaded at startup of a
Most of them are shared with other programs
Thus a lot of symbolic references needs to be
resolved while startup.
This is fast for smaller programs, but
For programs like open office and Firefox- Pain
My open office writer takes 20sec to load before
prelinking and 11 after….
Firefox takes <3 in place of 9
Not to mention KDE loading at all( you time that)
You need to re-prelink every time you update your
libraries or anything.
Size of executables increases( just penalty on space
It’s static. Libraries are bonded to the executables, It
doesn’t work with dynamically loaded libraries
So, the improvement in programs like open office is
Don’t worry…… Just keep following
Doing it with style: Hashstlye
The new improvement in binutils and glibc called
direct linking or –Bdirect is the next improvement in
the field of faster computing.
Careful… It’s still under development and not
With Hashstyling people(l33t ones!!) have seen 50%
improvements in dynamic linking , as in load times
All of this is owing to new improvements in the new
DT_GNU_HASH or gnu.hash. The older version was
How to prelink?
It’s basically same in all distros
Emerge or apt-get or yast or yum anything you use
Just install “prelink”
Run this command
a = all packages
m = Conserve the virtual memory space
f = force linking
R = Random – randomize the address ordering, this
enhances security against buffer overflows.
v = I won’t tell that( no price for guessing either!)
What you did on the last page was good enough to
see the power, but some more tweaking is no harm
Set KDE_IS_PRELINKED=quot;truequot; in
/etc/env.d/*kdepaths* to inform KDE about the
Prelink cronjob: Set it up as a cron job, if you keep
updating your libraries
Generally not required for quarterly updaters
Just in case : if you don’t like it
To remove prelinks:
Remove the prelink cronjob
Run $prelink –au
Just uninstall it as you do for any other software
Gentooers $ emerge –aC prelink
And there are gentoo forums and irc channels to
discuss any meshups( and there will be!!) you
Hashstyling: Gentoo only
Get THE latest version of binutils , glibc and
gcc(4.2+) .( edit package.keywords)
Follow the steps in order:
1) emerge binutils
$ binutils-config -l
$ binutils-config # (Replace # with the
corresponding number to binutils-126.96.36.199.3)
$ emerge glibc
Open /etc/make.conf and make this entry exactly
with NO SPACES what so ever.
If you already use some LD flags, change them and
Now we will rebuild the system with these new flags.
$emerge –e world
Just run this on the executable you want to check
$ readelf -a /usr/bin/nano | grep GNU_HASH
[ 4] .gnu.hash GNU_HASH 00000000004009a0 000009a0
0x000000006ffffef5 (GNU_HASH) 0x4009a0
More information on http://www.gentoo.org/doc/en/prelink-howto.xml
Please ensure you are emerging binutils >=
That’s it guys: You have a very fast system now,
but don’t go and mess with a “l33t” guy yet.
There are other ways of improving performance.
Upgrade from patch to newer version
In case you have an old hashstyled system which
was based on patches then follow exactly, or good
luck restarting the whole process again
Remove -Wl,--hash-style from LDFLAGS
Get the latest overlay from the svn
$ LD_X=1 emerge -1 coreutils binutils glibc
Add -Wl,--hash-style=both to LDFLAGS again
$ LD_X=1 emerge -e world
Do not turn off power during the whole process
In case…..System crashed!! Rebuild or go dig
I haven’t tested it, but a gentoo veteran have:
Gentoo hashstlye thread
You may find the solutions to all your problems here,
If you don’t post one….
Some glichy packages
While compiling these packages just comment
LDFLAGS in make.conf
The next level……
Hope you have your CHOST and CFLAGS and USE
Don’t you dare use anything below i686
Add “ –O2 –march=<your-cpu> -fomit-frame-pointer”
MAKEOPTS =“-j?” Google for your processor
If you arte having more than one system give a look
And ya ccache
Above two will save a lot of compile time.
Wanna ask something…..
I know you have lot of question, just throw them,
answer is NOT guaranteed