[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: prelink: is it worth it?

Adam Miller wrote:
> I am curious as to this answer as well because prelink has been
> something that actually hurt my netbook in performance so I nuked it.

Performance only ever can be hurt because prelink runs periodically to
prelink newly installed code or re-randomize to increase security.

prelink has two benefits:

- almost all relocations a program has to perform are avoided.  These
  can be very expensive when many dependencies and/or large symbol
  tables are involved.  The latter is somewhat mitigated by the new
  symbol table hashing we implemented some time back but still.

- as a side effect of the first point some pages in the loaded binary
  are not copied-on-write.  This can obviously have good effects on
  systems with little memory (netbooks).

Just run your own tests on apps with many relocations and dependencies.
 FF, OO.org, most GUI apps come into mind.  Use

  LD_DEBUG=statistics some/program

to compare numbers.  Run it with and without prelink (but always with
hot disk cache to be fair).  The number of cycles for total startup is
representative of the win.

Note, also small but frequently used apps benefit.  I run gcc etc a lot
and like every single saved cycle.

➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]