Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: static binary timings (Was: Some more patches for GCC on NetBSD/VAX coming soon...)



On Sat, 2 Apr 2016, Johnny Billquist wrote:

> > So, the kernel load & start, then autoconfig times are the same (which
> > is just a nice check - it would be worrying if they differed).
> > The nopic rc.conf is around 18% faster, which seems a significant
> > overhead (this is on a simh vax with 256M, so on a typical VAX the VM
> > savings of shared libraries probably outweigh this, but it does seem
> > like there may be more overhead in the shared libraries than we
> > originally thought).
> 
> I think the costs comes from disk and file I/O being really bad. Shared
> libraries implies more files to open and read, and eventually also symbols to
> resolve (although I would suspect that part would not be the main part of the
> cost).

 Actually symbol resolution is the dominating factor in dynamic loading, 
up to the point people have been looking for a replacement of the hash 
function used for symbol lookups as the original ELF hash was poorly 
chosen, resulting in frequent clashes.  The often referred parts, such as 
the symbol table, of system shared libraries such as libc will usually 
stay in the buffer cache anyway, so no need for extra disk I/O.

 If you want to compare how much time is consumed for file I/O vs symbol 
(and relocation) processing, you can try benchmarking a static executable 
against a dynamic one that has been prelinked (for a platform which has 
prelinking support available; of course adding such support for the VAX 
target should be pretty straightforward) and then against a plain dynamic 
one.

 FWIW,

  Maciej


Home | Main Index | Thread Index | Old Index