* Re: libffm and LD_PRELOAD, a tip
@ 1999-01-19 18:35 Designer 7
1999-01-19 22:00 ` Jaap Schellekens
0 siblings, 1 reply; 7+ messages in thread
From: Designer 7 @ 1999-01-19 18:35 UTC (permalink / raw)
To: axp-list
Hey Jaap,
That's a pretty cool tip.. I never knew you could do that. By the way,
do you know where in the system I can read about (either doc or source
code) how that environment variable is used?
Thanks.
D.
>Fro those of you that want the extra speed of libffm and do not want
>to recompile large packages (octave for example takes a lot of time to
>recompile) setting a LD_PRELOAD environent does the trick.
>
>I use "setenv LD_PRELOAD /usr/local/lib/libffm.so.1" (csh obviously)
>
>if i now do a ldd on a file, libffm gets listed first. I did some tests
>and it works fine on my system. To be honest i learned this from the
>bladeenc author after I asked him is he could link his (binary-only)
>program with the faster libs. Using this trick bladeenc runs about 25%
>faster in my box.
>
>
>Cheers -- Jaap
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: libffm and LD_PRELOAD, a tip
1999-01-19 18:35 libffm and LD_PRELOAD, a tip Designer 7
@ 1999-01-19 22:00 ` Jaap Schellekens
0 siblings, 0 replies; 7+ messages in thread
From: Jaap Schellekens @ 1999-01-19 22:00 UTC (permalink / raw)
To: axp-list
Designer 7 writes:
> Hey Jaap,
>
> That's a pretty cool tip.. I never knew you could do that. By the way,
> do you know where in the system I can read about (either doc or source
> code) how that environment variable is used?
It should be in the source of the dynamic linker i think. On my RedHat
5.1 system it is briefly mentioned in man 5 environ. a better (real)
description is found in the GCC-HOWTO.
Jaap
--
--------------------------------------------------------------
Jaap Schellekens E-mail: schj@geo.vu.nl
Hydro(geo)logy Dept. Fax: ++31 20 6462457
Inst. of Earth Sc. Voice: ++31 20 4447287
Vrije Universiteit
De Boelelaan 1085
1081 HV Amsterdam NL See also: http://flow.geo.vu.nl
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: libffm and LD_PRELOAD, a tip
@ 1999-01-20 8:22 Designer 7
0 siblings, 0 replies; 7+ messages in thread
From: Designer 7 @ 1999-01-20 8:22 UTC (permalink / raw)
To: axp-list
>It isn't a BIG library, so I don't think that would be a problem but
>have no actual fact to prove this. I now added the LD_PRELOAD var to
>my /etc/profile and /etc/csh.cshrc on my system. Now all programs use
>libffm. Even X seems to be faster (a bit). However, it does mean that
>if i delete libffm all programs stop working.. I better move it from
>/usr/local/lib to /lib to reflect it's new status .....
That is true... but I guess I'm not going to worry about it since I only
have one huge partition... though it is good practice. Or, what one
could do in the /etc/profile script is to test for the file first, if
all is good, then set the LD_PRELOAD,.. if not, skip it...
D.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: libffm and LD_PRELOAD, a tip
@ 1999-01-20 5:18 Designer 7
1999-01-20 7:32 ` Jaap Schellekens
1999-01-20 10:01 ` Richard Henderson
0 siblings, 2 replies; 7+ messages in thread
From: Designer 7 @ 1999-01-20 5:18 UTC (permalink / raw)
To: axp-list
Hi Jaap,
Ok.. so your tip worked great,.. I just had to recompile libffm as a
shared library... however, I noticed that libffm gets loaded ALL the
time, even if a program doesn't need libm/libffm... is this a good
thing? or is the penalty of loading an extra lib all the time
insignificant?
D.
>
>That's a pretty cool tip.. I never knew you could do that. By the way,
>do you know where in the system I can read about (either doc or source
>code) how that environment variable is used?
>
>Thanks.
>
>D.
>
>
>>Fro those of you that want the extra speed of libffm and do not want
>>to recompile large packages (octave for example takes a lot of time to
>>recompile) setting a LD_PRELOAD environent does the trick.
>>
>>I use "setenv LD_PRELOAD /usr/local/lib/libffm.so.1" (csh obviously)
>>
>>if i now do a ldd on a file, libffm gets listed first. I did some
tests
>>and it works fine on my system. To be honest i learned this from the
>>bladeenc author after I asked him is he could link his (binary-only)
>>program with the faster libs. Using this trick bladeenc runs about 25%
>>faster in my box.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: libffm and LD_PRELOAD, a tip
1999-01-20 5:18 Designer 7
@ 1999-01-20 7:32 ` Jaap Schellekens
1999-01-20 10:01 ` Richard Henderson
1 sibling, 0 replies; 7+ messages in thread
From: Jaap Schellekens @ 1999-01-20 7:32 UTC (permalink / raw)
To: axp-list
Designer 7 writes:
> Hi Jaap,
>
> Ok.. so your tip worked great,.. I just had to recompile libffm as a
> shared library... however, I noticed that libffm gets loaded ALL the
> time, even if a program doesn't need libm/libffm... is this a good
> thing? or is the penalty of loading an extra lib all the time
> insignificant?
It isn't a BIG library, so I don't think that would be a problem but
have no actual fact to prove this. I now added the LD_PRELOAD var to
my /etc/profile and /etc/csh.cshrc on my system. Now all programs use
libffm. Even X seems to be faster (a bit). However, it does mean that
if i delete libffm all programs stop working.. I better move it from
/usr/local/lib to /lib to reflect it's new status .....
Jaap
--
--------------------------------------------------------------
Jaap Schellekens E-mail: schj@geo.vu.nl
Hydro(geo)logy Dept. Fax: ++31 20 6462457
Inst. of Earth Sc. Voice: ++31 20 4447287
Vrije Universiteit
De Boelelaan 1085
1081 HV Amsterdam NL See also: http://flow.geo.vu.nl
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: libffm and LD_PRELOAD, a tip
1999-01-20 5:18 Designer 7
1999-01-20 7:32 ` Jaap Schellekens
@ 1999-01-20 10:01 ` Richard Henderson
1 sibling, 0 replies; 7+ messages in thread
From: Richard Henderson @ 1999-01-20 10:01 UTC (permalink / raw)
To: axp-list
On Tue, Jan 19, 1999 at 09:18:26PM -0800, Designer 7 wrote:
> Ok.. so your tip worked great,.. I just had to recompile libffm as a
> shared library... however, I noticed that libffm gets loaded ALL the
> time, even if a program doesn't need libm/libffm.
Indeed. But you requested that it be loaded, so it was.
Note that at some indefinite point in the future, you'll see
a modest to severe performance penalty because of LD_PRELOAD.
We have plans to implement Irix-like shared library quickload
scheme. Preloading defeats that, and so quickloading would
be disabled for that process. If you have LD_PRELOAD set for
everything you run, you would see no benefit from the
quickloading at all.
r~
^ permalink raw reply [flat|nested] 7+ messages in thread
* libffm and LD_PRELOAD, a tip
@ 1999-01-19 7:44 Jaap Schellekens
0 siblings, 0 replies; 7+ messages in thread
From: Jaap Schellekens @ 1999-01-19 7:44 UTC (permalink / raw)
To: axp-list
Fro those of you that want the extra speed of libffm and do not want
to recompile large packages (octave for example takes a lot of time to
recompile) setting a LD_PRELOAD environent does the trick.
I use "setenv LD_PRELOAD /usr/local/lib/libffm.so.1" (csh obviously)
if i now do a ldd on a file, libffm gets listed first. I did some tests
and it works fine on my system. To be honest i learned this from the
bladeenc author after I asked him is he could link his (binary-only)
program with the faster libs. Using this trick bladeenc runs about 25%
faster in my box.
Cheers -- Jaap
--
--------------------------------------------------------------
Jaap Schellekens E-mail: schj@geo.vu.nl
Hydro(geo)logy Dept. Fax: ++31 20 6462457
Inst. of Earth Sc. Voice: ++31 20 4447287
Vrije Universiteit
De Boelelaan 1085
1081 HV Amsterdam NL See also: http://flow.geo.vu.nl
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~1999-01-20 10:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-19 18:35 libffm and LD_PRELOAD, a tip Designer 7
1999-01-19 22:00 ` Jaap Schellekens
-- strict thread matches above, loose matches on Subject: below --
1999-01-20 8:22 Designer 7
1999-01-20 5:18 Designer 7
1999-01-20 7:32 ` Jaap Schellekens
1999-01-20 10:01 ` Richard Henderson
1999-01-19 7:44 Jaap Schellekens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox