anyone using ld.so.preload / ld.so.preload-manager ?

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Fri Nov 4 15:28:20 UTC 2005


On Fri, Nov 04, 2005 at 07:19:24AM -0500, ted leslie wrote:
> anyone sucessfully using  ld.so.preload?
> 
> thinking of speeding up my system and preloading some *.so ....
> on my first load, i killed my system, couldnt run hardly any commands,
> 
> tried everything
> 
> cd /etc
> mv ld.so.preload ...
> rm -f ld.so.preolod ..
> ln -sf .. ...
> cp .. ...
> 
> finally 
> 
> echo "" > ld.so.preload  got me back to (hopefully) ok
> 
> i can't really find much doc's on  so.preload
> 
> maybe its to dangerous so perhaps only very few people use it?

ld.so.preload is for forcing a list of libraries to be loaded before
everything else in a program.  This is used to _override_ library
functions, _not_ to enhance performance by loading stuff into ram ahead
of time.  Linux already automatically reuses any library already loaded
when other programs need it.

If you want you can write a scrip that does 'cat libname > /dev/null'
at startup if you want to force all the libraries to be copied into the
disk cache for quicker loading, although it will slow down booting and
unless you have a habit of booting the system while getting your coffee
and then being happy everything is already in memory so your
applications can load faster, so I am not sure what the gain is.  You
could just script it loading all your programs when you login for you so
that you can boot, login, then go for coffee and come back with
everything ready.

So in short, ld.so.preload is not what you think it is.

Lennart Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list