Improving program startup with fastbind [HP-UX Linker] White paper

3
Introduction
On HP-UX Integrity, programs are always linked to shared libraries as system libraries are not
delivered in archive form. Every application program is an “incomplete executable” that depends on
many shared libraries for its functioning. An incomplete executable or a shared library is a “load
module”.
In loading a shared library, the dynamic loader goes through the following sequence:
1. Searching and loading the shared library mapping the text and data segments into
memory.
2. Applying relocations resolving data references by searching for symbols among load
modules.
3. Invoking shared library initializers.
Of these, most of the program startup time is used to search for symbols . For programs that are
typically short-lived, the startup time spent in searching symbols can become a significant part of the
total run time.
In cases where large client-server applications deployed on HP-UX are designed with a multi-process
model, fastbind delivers significant improvements in the overall performance of the application.
Note:
To report the time spent by the dynamic loader in various startup activities, include the “-time” option
in the _HP_DLDOPTS environment variable.
Figure 1 shows a break-up of the time spent by the dynamic loader during the startup of the mozilla-
bin executable.
Figure 1: Break-up of the time spent by the dynamic loader during the startup of the mozilla-bin
executable
# LD_LIBRARY_PATH=/opt/mozilla _HP_DLDOPTS=-time /opt/mozilla/mozilla-
bin
In loading shared libraries:
real 0m0.00s
user 0m0.00s
sys 0m0.00s
In applying relocations:
real 0m0.02s
user 0m0.02s
sys 0m0.01s
In shared library initialization:
real 0m0.01s
user 0m0.00s
sys 0m0.00s
Total startup time:
real 0m0.03s
user 0m0.02s
sys 0m0.01s
Gtk-WARNING **: cannot open display: