User: Password:
|
|
Subscribe / Log in / New account

Use prelink to reduce process startup delay

Use prelink to reduce process startup delay

Posted Jul 7, 2005 16:11 UTC (Thu) by jreiser (subscriber, #11027)
Parent article: First Look at Knoppix 4.0

In KNOPPIX_V3.9-2005-05-27-EN the shared libraries have not been "prelink"ed. This contributes to slow startup of each execve() because ld-linux.so.2 must perform relocations based on the actual addresses occupied by each shared library. Prelinking the most common shared libraries (including ld-linux.so.2 itself) gets best-case performance usually, with fall-back to the old-and-slow behavior when necessary. Prelink is an application available on RedHat, Fedora Core, and other systems; it works with any Linux 2.6 or current 2.4 kernel version.

Detect successful prelink by "readelf --segments foo.so" and check for non-zero VirtAddr of the first LOAD.


(Log in to post comments)

Use prelink to reduce process startup delay

Posted Jul 10, 2005 19:49 UTC (Sun) by xkahn (subscriber, #1575) [Link]

So something like this:

readelf --segments /lib/ld-linux.so.2 | grep LOAD | head -1 | awk '{print $3}' | grep -q 0x00000000 && echo "No Preload" || echo "Preload"

?


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds