Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DAMN prelinking is gooood!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
really
Guru
Guru


Joined: 27 Aug 2002
Posts: 430
Location: nowhere

PostPosted: Sat Feb 01, 2003 6:41 pm    Post subject: DAMN prelinking is gooood! Reply with quote

uish! it blows me off!
you got to have it.
i just finished the emergement of my system, took 32hours something and just kde 26h.
if you want speed you MUST have prelinking! :)
didnt belive ti will be this fast.
_________________
NoManNoProblem

Get lost before you get shot.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Sat Feb 01, 2003 7:25 pm    Post subject: Reply with quote

Moved from Portage & Programming.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
ballardb
n00b
n00b


Joined: 17 Oct 2002
Posts: 35
Location: Nanaimo, Vancouver Island, Canada

PostPosted: Sun Feb 02, 2003 12:11 am    Post subject: Reply with quote

I must admit I have just pre-linked my system and I really cannot see any difference.
_________________
Dont you just hate sigs? I do....
Back to top
View user's profile Send private message
darktux
Veteran
Veteran


Joined: 16 Nov 2002
Posts: 1086
Location: Coimbra, Portugal

PostPosted: Sun Feb 02, 2003 1:47 am    Post subject: Reply with quote

ballardb wrote:
I must admit I have just pre-linked my system and I really cannot see any difference.


Sheer here.. 8O
_________________
Lego my ego, and I'll lego your knowledge

www.tuxslare.org - My reborn website :P
Back to top
View user's profile Send private message
gsfgf
Veteran
Veteran


Joined: 08 May 2002
Posts: 1266

PostPosted: Sun Feb 02, 2003 2:40 am    Post subject: Reply with quote

ballardb wrote:
I must admit I have just pre-linked my system and I really cannot see any difference.


same here
Back to top
View user's profile Send private message
noff
Guru
Guru


Joined: 11 Nov 2002
Posts: 388
Location: College Park, Maryland

PostPosted: Sun Feb 02, 2003 2:48 am    Post subject: Reply with quote

I had the same experience. I'm hoping that when I reinstall and recompile everything that it produces a notica;e speed up as a lot of things don't prelink currently.
_________________
What Larry was saying is that if you make it too easy for programmers, then poor programmers will be able to do things best left to good programmers, and will inevitably do them poorly. Everyone will suffer in the long term as a result." - Tom Chance
Back to top
View user's profile Send private message
nbensa
l33t
l33t


Joined: 10 Jul 2002
Posts: 799
Location: Buenos Aires, Argentina

PostPosted: Sun Feb 02, 2003 2:59 am    Post subject: Reply with quote

Bah, prelinking isn't what they promise... Did I read something like 40% 50% speed loading increase? Maybe that's true in an slow box, but mine is a P31G and can hardly see any difference.
Back to top
View user's profile Send private message
Lowspirit
Apprentice
Apprentice


Joined: 31 Jul 2002
Posts: 258
Location: Northern Sweden

PostPosted: Sun Feb 02, 2003 4:31 pm    Post subject: Reply with quote

I actually noticed a slowdown, don't know if it was my overly optimized cflags (with which everything is compiled) and the fact that I run Gnome, or why, but Linux all of a sudden felt like Windows, the HDD began to load like crazy for a simple task like opening a terminal.

I now have switched cflags to Os from 03, and alot less extra fluff params, my system runs alittle better with these flags but best of all is that all binaries are alot smaller so I'm hoping to try prelinking again sometime in the future, haven't given up.

After XFree 4.3 final is out i'll give prelinking a retry.
_________________
Gentoo | AMD X2 3800+ 2GB RAM | Kernel 2.6.30 . ReiserFS . CFQ . GCC4.3.3 | Firefox 3.5 | Gnome 2.26 w/ Compiz-Fusion
"Penguins are the only fish that can fly"
Back to top
View user's profile Send private message
sgaap
l33t
l33t


Joined: 16 Aug 2002
Posts: 754
Location: Enschede, The Netherlands

PostPosted: Sun Feb 02, 2003 8:32 pm    Post subject: Reply with quote

I only noticed a real improvement with kde (on my relatively slow 1ghz), the rest of my system hasnt gained as much form prelinking..
Back to top
View user's profile Send private message
kraylus
l33t
l33t


Joined: 07 Jun 2002
Posts: 648
Location: ft.worth.tx

PostPosted: Sun Feb 02, 2003 11:04 pm    Post subject: Reply with quote

i was under the impression that prelinking only made it so that shared libs aren't redundantly loaded for two apps that use the same lib. for example, if you load mozilla at startup, it'll take the same amount of time as normal, but if you load another app later that uses the mozilla libs, it'll load a bit faster because moz is already using the libs and the newcoming app doesn't have to look for them first.

so yeah, for small garbage like xchat, gaim, etc. it wont make any difference. also keep in mind... it doesn't make the app RUN faster... just load faster. maybe im wrong, i dunno. anyone want to field this one?

ryan
_________________
I used gentoo BEFORE it was cool.
Back to top
View user's profile Send private message
kraylus
l33t
l33t


Joined: 07 Jun 2002
Posts: 648
Location: ft.worth.tx

PostPosted: Sun Feb 02, 2003 11:06 pm    Post subject: Reply with quote

sgaap wrote:
I only noticed a real improvement with kde (on my relatively slow 1ghz), the rest of my system hasnt gained as much form prelinking..


a good example further proving my theory.
_________________
I used gentoo BEFORE it was cool.
Back to top
View user's profile Send private message
idl
Retired Dev
Retired Dev


Joined: 24 Dec 2002
Posts: 1728
Location: Nottingham, UK

PostPosted: Sun Feb 02, 2003 11:13 pm    Post subject: Reply with quote

prelinking works by turning your dynamic binarys into static ones. When you load a binary file that depends on some libs it goes and fetches the resources from these libs, they are external to the binary. Prelinking trys to find out what libs a dynamic binary needs, gathers all the info and builds it into the binary giving you a staticly linked binary file. Now when the binary is executed it doesnt have to go and fetch the stuff it needs from the libs because its allready built in. :D
Back to top
View user's profile Send private message
kraylus
l33t
l33t


Joined: 07 Jun 2002
Posts: 648
Location: ft.worth.tx

PostPosted: Sun Feb 02, 2003 11:35 pm    Post subject: Reply with quote

port001 wrote:
prelinking works by turning your dynamic binarys into static ones. When you load a binary file that depends on some libs it goes and fetches the resources from these libs, they are external to the binary. Prelinking trys to find out what libs a dynamic binary needs, gathers all the info and builds it into the binary giving you a staticly linked binary file. Now when the binary is executed it doesnt have to go and fetch the stuff it needs from the libs because its allready built in. :D


wow, that's even better! but doesn't that bloat the size of the executable? and the original lib still exists, no? that could get rather large...
_________________
I used gentoo BEFORE it was cool.
Back to top
View user's profile Send private message
Matje
l33t
l33t


Joined: 29 Oct 2002
Posts: 619
Location: Hasselt, Belgium

PostPosted: Mon Feb 03, 2003 12:28 am    Post subject: Reply with quote

It does increase the size a bit. You can return to the original file by doing prelink -u
_________________
Life is like a box of chocolates... Before you know it, it's empty...
Back to top
View user's profile Send private message
Evangelion
Veteran
Veteran


Joined: 31 May 2002
Posts: 1087
Location: Helsinki, Finland

PostPosted: Mon Feb 03, 2003 7:41 am    Post subject: Reply with quote

Matje wrote:
It does increase the size a bit. You can return to the original file by doing prelink -u


Are there any comparisons between ordinary binaries and prelinked binaires?
Back to top
View user's profile Send private message
Matje
l33t
l33t


Joined: 29 Oct 2002
Posts: 619
Location: Hasselt, Belgium

PostPosted: Mon Feb 03, 2003 10:44 am    Post subject: Reply with quote

Yeah, prelinked binaries have a little extra code in the beginning of the file which enables the prelinking stuff...
_________________
Life is like a box of chocolates... Before you know it, it's empty...
Back to top
View user's profile Send private message
BigRedDot
n00b
n00b


Joined: 29 Oct 2002
Posts: 67
Location: Austin

PostPosted: Mon Feb 03, 2003 2:06 pm    Post subject: Reply with quote

Quote:
prelinking works by turning your dynamic binarys into static ones.

This is not quite accurate, is it? My impression is that prelinking simply pre-calculates as much about code relocation as it can up front and stores that information in the execution so that it does not have to be performed at startup-time. "static binary" has a different meaning - library code is available at compile time and built directly and completely into the executable itself by the linker (the same as object files).
_________________
Even if you are one-in-a-million, there are still 6000 people just like you.
Back to top
View user's profile Send private message
Matje
l33t
l33t


Joined: 29 Oct 2002
Posts: 619
Location: Hasselt, Belgium

PostPosted: Mon Feb 03, 2003 3:15 pm    Post subject: Reply with quote

What prelinking does is, it checks if there is already is an instance of a library loaded in the memory, if so, it doesn't load it again, but instead just "links" the application to that instance, resulting in a faster startup.
_________________
Life is like a box of chocolates... Before you know it, it's empty...
Back to top
View user's profile Send private message
bradcarter
n00b
n00b


Joined: 12 Nov 2002
Posts: 53

PostPosted: Mon Feb 03, 2003 3:58 pm    Post subject: Reply with quote

Does prelinking then reduce overhead? Instead of having multiple instances run of a library you only have one?
Back to top
View user's profile Send private message
emmCee
n00b
n00b


Joined: 04 Jan 2003
Posts: 20
Location: York, UK

PostPosted: Tue Feb 04, 2003 6:43 pm    Post subject: What it is. Reply with quote

Prelinking works by calculating various stuff (like the linking tables) once, and storing these calculations in the binary. It does _not_ staticly link the binaries, thus the extra size taken is minimal.

The speedup takes place because far fewer calculations must be done at run time when the binary is loaded and linked with the libraries. As such it takes place the first time you run the binary/the libraries are loaded and every consecutive time. Libraries already loaded into memory are shared implicitly anyway (that's one of the great things about shared libraries!).

There's a page here http://objprelink.sourceforge.net/howto.html that explains the ins and outs of prelinking if you're interested (its for a slightly older variant of the system, but the core ideas remain the same).

Prelinking on very highly-shared software like KDE will make a difference on every (current) machine, simply because linking does, in fact, take ages.

Even on my Athlon XP 2100 3/4GB DDR 333 the difference is very pronounced.

For an absolute measurement of loading/linking time for those people that don't believe me, try doing:

Code:

LD_DEBUG=statistics konqueror


Before and after prelinking. If the number of relocations isn't 0 and the time needed to load objects a good amount less than time needed for relocation, then your system isn't very well optimised.

You might also try that command 'cat', which gives a more clean measurement of link/load time.

Code:

LD_DEBUG=statistics cat


I hope this clears up any misunderstandings.

Gav
Back to top
View user's profile Send private message
jufoa
Apprentice
Apprentice


Joined: 10 Dec 2002
Posts: 213
Location: Rovaniemi, Finland

PostPosted: Tue Feb 04, 2003 7:00 pm    Post subject: Reply with quote

prelinking speeded up my kde applications startup times _a lot_
Back to top
View user's profile Send private message
line72
Apprentice
Apprentice


Joined: 13 Jun 2002
Posts: 212

PostPosted: Fri Feb 21, 2003 6:25 pm    Post subject: Reply with quote

how often do yo uhave to run prelink ? If I upgrade kde do I need to re-run prelink or does portage take care of that for me ?

/Line72
Back to top
View user's profile Send private message
AngusYoung
Retired Dev
Retired Dev


Joined: 20 Dec 2002
Posts: 473
Location: Czech Republic

PostPosted: Fri Feb 21, 2003 8:02 pm    Post subject: Reply with quote

Man, it really make a diference for me!!! Thanks for the advice :D
_________________
My blog
Twitter
Back to top
View user's profile Send private message
darktux
Veteran
Veteran


Joined: 16 Nov 2002
Posts: 1086
Location: Coimbra, Portugal

PostPosted: Fri Feb 21, 2003 8:32 pm    Post subject: Reply with quote

line72 wrote:
how often do yo uhave to run prelink ? If I upgrade kde do I need to re-run prelink or does portage take care of that for me ?

/Line72


I belive it isn't automated. You'll have to prelink again. :roll:
_________________
Lego my ego, and I'll lego your knowledge

www.tuxslare.org - My reborn website :P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum