View previous topic :: View next topic |
Author |
Message |
really Guru
Joined: 27 Aug 2002 Posts: 430 Location: nowhere
|
Posted: Sat Feb 01, 2003 6:41 pm Post subject: DAMN prelinking is gooood! |
|
|
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 |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Sat Feb 01, 2003 7:25 pm Post subject: |
|
|
Moved from Portage & Programming. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
ballardb n00b
Joined: 17 Oct 2002 Posts: 35 Location: Nanaimo, Vancouver Island, Canada
|
Posted: Sun Feb 02, 2003 12:11 am Post subject: |
|
|
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 |
|
|
darktux Veteran
Joined: 16 Nov 2002 Posts: 1086 Location: Coimbra, Portugal
|
Posted: Sun Feb 02, 2003 1:47 am Post subject: |
|
|
ballardb wrote: | I must admit I have just pre-linked my system and I really cannot see any difference. |
Sheer here.. _________________ Lego my ego, and I'll lego your knowledge
www.tuxslare.org - My reborn website |
|
Back to top |
|
|
gsfgf Veteran
Joined: 08 May 2002 Posts: 1266
|
Posted: Sun Feb 02, 2003 2:40 am Post subject: |
|
|
ballardb wrote: | I must admit I have just pre-linked my system and I really cannot see any difference. |
same here |
|
Back to top |
|
|
noff Guru
Joined: 11 Nov 2002 Posts: 388 Location: College Park, Maryland
|
Posted: Sun Feb 02, 2003 2:48 am Post subject: |
|
|
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 |
|
|
nbensa l33t
Joined: 10 Jul 2002 Posts: 799 Location: Buenos Aires, Argentina
|
Posted: Sun Feb 02, 2003 2:59 am Post subject: |
|
|
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 |
|
|
Lowspirit Apprentice
Joined: 31 Jul 2002 Posts: 258 Location: Northern Sweden
|
Posted: Sun Feb 02, 2003 4:31 pm Post subject: |
|
|
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 |
|
|
sgaap l33t
Joined: 16 Aug 2002 Posts: 754 Location: Enschede, The Netherlands
|
Posted: Sun Feb 02, 2003 8:32 pm Post subject: |
|
|
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 |
|
|
kraylus l33t
Joined: 07 Jun 2002 Posts: 648 Location: ft.worth.tx
|
Posted: Sun Feb 02, 2003 11:04 pm Post subject: |
|
|
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 |
|
|
kraylus l33t
Joined: 07 Jun 2002 Posts: 648 Location: ft.worth.tx
|
Posted: Sun Feb 02, 2003 11:06 pm Post subject: |
|
|
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 |
|
|
idl Retired Dev
Joined: 24 Dec 2002 Posts: 1728 Location: Nottingham, UK
|
Posted: Sun Feb 02, 2003 11:13 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
kraylus l33t
Joined: 07 Jun 2002 Posts: 648 Location: ft.worth.tx
|
Posted: Sun Feb 02, 2003 11:35 pm Post subject: |
|
|
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. |
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 |
|
|
Matje l33t
Joined: 29 Oct 2002 Posts: 619 Location: Hasselt, Belgium
|
Posted: Mon Feb 03, 2003 12:28 am Post subject: |
|
|
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 |
|
|
Evangelion Veteran
Joined: 31 May 2002 Posts: 1087 Location: Helsinki, Finland
|
Posted: Mon Feb 03, 2003 7:41 am Post subject: |
|
|
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 |
|
|
Matje l33t
Joined: 29 Oct 2002 Posts: 619 Location: Hasselt, Belgium
|
Posted: Mon Feb 03, 2003 10:44 am Post subject: |
|
|
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 |
|
|
BigRedDot n00b
Joined: 29 Oct 2002 Posts: 67 Location: Austin
|
Posted: Mon Feb 03, 2003 2:06 pm Post subject: |
|
|
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 |
|
|
Matje l33t
Joined: 29 Oct 2002 Posts: 619 Location: Hasselt, Belgium
|
Posted: Mon Feb 03, 2003 3:15 pm Post subject: |
|
|
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 |
|
|
bradcarter n00b
Joined: 12 Nov 2002 Posts: 53
|
Posted: Mon Feb 03, 2003 3:58 pm Post subject: |
|
|
Does prelinking then reduce overhead? Instead of having multiple instances run of a library you only have one? |
|
Back to top |
|
|
emmCee n00b
Joined: 04 Jan 2003 Posts: 20 Location: York, UK
|
Posted: Tue Feb 04, 2003 6:43 pm Post subject: What it is. |
|
|
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 |
|
|
jufoa Apprentice
Joined: 10 Dec 2002 Posts: 213 Location: Rovaniemi, Finland
|
Posted: Tue Feb 04, 2003 7:00 pm Post subject: |
|
|
prelinking speeded up my kde applications startup times _a lot_ |
|
Back to top |
|
|
line72 Apprentice
Joined: 13 Jun 2002 Posts: 212
|
Posted: Fri Feb 21, 2003 6:25 pm Post subject: |
|
|
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 |
|
|
AngusYoung Retired Dev
Joined: 20 Dec 2002 Posts: 473 Location: Czech Republic
|
Posted: Fri Feb 21, 2003 8:02 pm Post subject: |
|
|
Man, it really make a diference for me!!! Thanks for the advice _________________ My blog
Twitter |
|
Back to top |
|
|
darktux Veteran
Joined: 16 Nov 2002 Posts: 1086 Location: Coimbra, Portugal
|
Posted: Fri Feb 21, 2003 8:32 pm Post subject: |
|
|
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. _________________ Lego my ego, and I'll lego your knowledge
www.tuxslare.org - My reborn website |
|
Back to top |
|
|
|