PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 27, 2012, 01:08:22 AM


Login with username, password and session length


Pages: [1] 2 3 4 5 6 7   Go Down
  Print  
Author Topic: Playing with Prelink  (Read 6128 times)
Texstar
Administrator
Super Villain
*****
Offline Offline

Posts: 11805



« on: September 18, 2010, 12:38:36 AM »

prelink is a free program 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. Actual results have been mixed, but it seems to aid systems with a large number of libraries, such as KDE.

1. Install prelink from Synaptic Package Manager

2. Open terminal konsole su to root and type /usr/sbin/prelink -avmR

3. While still in terminal edit /usr/bin/startkde with your favorite text editor. Add the line highlighted in bold to startkde.

export KDE_NO_IPV6=True
export KDE_USE_IPV6="no"
export KDE_IS_PRELINKED=1

Save the file and exit.

4. 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.

* Not responsible if this causes your system to crash and burn. * Cheesy
Logged

Follow the development of PCLinuxOS on Twitter
Help fund the PCLinuxOS project!

"I'm not so good on advice, can I interest you in a sarcastic reply?"
Old-Polack
Administrator
Hero Member
*****
Offline Offline

Posts: 9695


----IOFLU----


« Reply #1 on: September 18, 2010, 12:42:24 AM »

This was a great post... until the last line.  Grin Grin
Logged

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...
gseaman
PCLinuxOS Tester
Hero Member
*******
Online Online

Posts: 2808



« Reply #2 on: September 18, 2010, 12:45:33 AM »

Time to burn my system!

Galen
Logged
Texstar
Administrator
Super Villain
*****
Offline Offline

Posts: 11805



« Reply #3 on: September 18, 2010, 12:50:32 AM »

I've noticed Firefox and Thunderbird are quicker to start on my system course it could be a jedi mind trick. Still playing... Cheesy


Logged

Follow the development of PCLinuxOS on Twitter
Help fund the PCLinuxOS project!

"I'm not so good on advice, can I interest you in a sarcastic reply?"
gseaman
PCLinuxOS Tester
Hero Member
*******
Online Online

Posts: 2808



« Reply #4 on: September 18, 2010, 01:05:39 AM »

I have no scientific verification, but it seems faster. And nothing burned. I guess I can go to bed now. Wink

Galen
Logged
smcs_steve
Guest
« Reply #5 on: September 18, 2010, 02:03:13 AM »

No difference here on FF.....   but some other apps do appear faster to launch.
I like the security aspect though.
>Steve
Logged
pinoc
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2132



WWW
« Reply #6 on: September 18, 2010, 04:04:28 AM »

applied to fullmonty and applications seem to start a bit snappier now.
Don't know if this is critical but while running  "/usr/sbin/prelink -avmR " I got this:
Code:
[root@localhost ~]# /usr/sbin/prelink -avmR
/usr/sbin/prelink: "/usr/bin/unetbootin" has no section headers
/usr/sbin/prelink: /usr/bin/fglrx_xgamma: Could not find one of the dependencies     
/usr/sbin/prelink: /usr/bin/q4wine-cli: Could not find one of the dependencies
/usr/sbin/prelink: /usr/bin/jahshaka: section file offsets not monotonically increasing
/usr/sbin/prelink: /usr/bin/q4wine: Could not find one of the dependencies
/usr/sbin/prelink: /usr/bin/q4wine-helper: Could not find one of the dependencies   
/usr/sbin/prelink: /usr/bin/xara-extreme: section file offsets not monotonically increasing
/usr/sbin/prelink: /usr/games/gltron: Could not find one of the dependencies         
/usr/sbin/prelink: /usr/lib/R/bin/exec/R: Could not find one of the dependencies
/usr/sbin/prelink: /usr/lib/pokerth-0.7.1/pokerth: Could not find one of the dependencies
/usr/sbin/prelink: /usr/lib/celtx/celtx-bin: Could not find one of the dependencies 
/usr/sbin/prelink: /usr/lib/googleearth/googleearth-bin: Could not find one of the dependencies
/usr/sbin/prelink: /usr/lib/kompozer/xpcshell: Could not find one of the dependencies
/usr/sbin/prelink: /usr/lib/kompozer/kompozer-bin: Could not find one of the dependencies
/usr/sbin/prelink: /usr/lib/kompozer/TestGtkEmbed: Could not find one of the dependencies
/usr/sbin/prelink: /usr/lib/torcs/torcs-bin: Could not find one of the dependencies 
/usr/sbin/prelink: /usr/lib/torcs/trackgen-bin: Could not find one of the dependencies
/usr/sbin/prelink: /usr/lib/torcs/texmapper-bin: Could not find one of the dependencies
/usr/sbin/prelink: /usr/lib/torcs/accc-bin: Could not find one of the dependencies   
/usr/sbin/prelink: /usr/lib/torcs/nfsperf-bin: Could not find one of the dependencies
Laying out 1268 libraries in virtual address space 41000000-50000000
Random base 0x44968000
/usr/sbin/prelink: Could not find virtual address slot for /usr/lib/grass64/lib/libgrass_sim.so
[root@localhost ~]#

Logged

AndrzejL
PCLinuxOS Tester
Super Villain
*******
Offline Offline

Posts: 11990


Registered Linux User #490933


WWW
« Reply #7 on: September 18, 2010, 09:50:16 AM »

It should be:

Code:
dbus-launch kwrite /usr/bin/startkde

Rebooting.

Andy
Logged

Texstar
Administrator
Super Villain
*****
Offline Offline

Posts: 11805



« Reply #8 on: September 18, 2010, 09:53:04 AM »

It should be:

Code:
dbus-launch kwrite /usr/bin/startkde

Rebooting.

Andy

An advanced user would know that!  Grin
Logged

Follow the development of PCLinuxOS on Twitter
Help fund the PCLinuxOS project!

"I'm not so good on advice, can I interest you in a sarcastic reply?"
AndrzejL
PCLinuxOS Tester
Super Villain
*******
Offline Offline

Posts: 11990


Registered Linux User #490933


WWW
« Reply #9 on: September 18, 2010, 09:57:02 AM »

It should be:

Code:
dbus-launch kwrite /usr/bin/startkde

Rebooting.

Andy

An advanced user would know that!  Grin

Sowwy... Tongue! Feel free to remove my post Cheesy!

Can't prove it but it feels snappier...

Andy

EDIT: Woah... Was I just called an advanced user by Texstar himself?! WOW! Roll Eyes Roll Eyes Roll Eyes Roll Eyes
Logged

menotu
PCLinuxOS Tester
Super Villain
*******
Offline Offline

Posts: 11986

┌∩┐(◕_◕)┌∩┐


« Reply #10 on: September 18, 2010, 10:28:44 AM »

My KMenu 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.
Logged

If you can keep you head while all around you are losing theirs, then you have misunderstood the situation.

PCLinuxOS 32bit & 64bit; 3.2.17bfs kernel, KDE 4.8.3; nvidia 295.53, Athlon 64 X2 4200+; 4GB Ram; NVidia GeForce 8400GS 1GB; x.org 1.10.4 ; 500GB/320GB
Texstar
Administrator
Super Villain
*****
Offline Offline

Posts: 11805



« Reply #11 on: September 19, 2010, 02:10:36 AM »

I can see the difference a lot more when launching applications in a non-kde desktop such as enlightenment.
Logged

Follow the development of PCLinuxOS on Twitter
Help fund the PCLinuxOS project!

"I'm not so good on advice, can I interest you in a sarcastic reply?"
Old-Polack
Administrator
Hero Member
*****
Offline Offline

Posts: 9695


----IOFLU----


« Reply #12 on: September 19, 2010, 02:27:45 AM »

I can see the difference a lot more when launching applications in a non-kde desktop such as enlightenment.

Unless you changed something else in the last batch of upgrades, I just noticed, after running prelink and rebooting, that my GUI screen came back up on tty7 again, after being on tty8 since the earlier big batch of upgrades.  Huh
Logged

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...
Hootiegibbon
Hero Member
*****
Offline Offline

Posts: 4206

Registered Linux User #421404


« Reply #13 on: September 19, 2010, 03:46:23 AM »

It should be:

Code:
dbus-launch kwrite /usr/bin/startkde

Rebooting.

Andy


An advanced user would know that!  Grin


Sowwy... Tongue! Feel free to remove my post Cheesy!

Can't prove it but it feels snappier...

Andy

EDIT: Woah... Was I just called an advanced user by Texstar himself?! WOW! Roll Eyes Roll Eyes Roll Eyes Roll Eyes


Andy,

He wasn't saying that, what my interpretation would be is

Andy, an advanced user would know that, without resorting to a search first.... Smiley lol

I jest of course.

I have noticed an increase in responsiveness, cool stuff Texstar!  

EDIT further reading for those interested http://linux.die.net/man/8/prelink

Jase
Logged

** FORUM SEARCH **

I am Hootiegibbon, undisputed champion fo the typo

My .dotfiles
menotu
PCLinuxOS Tester
Super Villain
*******
Offline Offline

Posts: 11986

┌∩┐(◕_◕)┌∩┐


« Reply #14 on: September 19, 2010, 04:52:05 AM »

Quote
EDIT further reading for those interested http://linux.die.net/man/8/prelink


Nice link Jase - many thanks
Logged

If you can keep you head while all around you are losing theirs, then you have misunderstood the situation.

PCLinuxOS 32bit & 64bit; 3.2.17bfs kernel, KDE 4.8.3; nvidia 295.53, Athlon 64 X2 4200+; 4GB Ram; NVidia GeForce 8400GS 1GB; x.org 1.10.4 ; 500GB/320GB
Pages: [1] 2 3 4 5 6 7   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM