Subject: kern/8321: Native ELF execution is slower than Native A_OUT execution
To: None <gnats-bugs@gnats.netbsd.org>
From: The Grey Wolf <greywolf@starwolf.com>
List: netbsd-bugs
Date: 09/04/1999 10:10:52
>Number: 8321
>Category: kern
>Synopsis: Native ELF execution is slower than Native A_OUT execution
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 4 09:35:01 1999
>Last-Modified:
>Originator: The Grey Wolf
>Organization:
--*greywolf;
--
NetBSD: We're so committed to it being free, we won't sell it to you
even if you ask!
>Release: Userland: 20Aug1999; kernel: 3Sep1999
>Environment:
Machine: SPARCstation IPX
OS: NetBSD/sparc 1.4K of 3 September 1999
Target: Sun4c
libraries: from binary snapshot of 20 August 1999
System: NetBSD starwolf.com 1.4K NetBSD 1.4K (STARWOLF) #1: Fri Sep 3 20:14:58 PDT 1999 root@starwolf.com:/usr/src/sys/arch/sparc/compile/STARWOLF sparc
>Description:
SPARCstation IPX (sun 4c/50), BTW.
Thanks to the 8/20 snapshot I am now running one system under ELF and
the other under A_OUT. The emulation is fantastic -- all my old a.out
stuff works.
However, I am kind of dismayed at the speed difference here, and I can
draw but one of two conclusions: i) the file command has changed drastically
since 1.4-release; or ii) ELF loading is slower than A_OUT loading.
starwolf is my a.out system (not yet upgraded) and defender is my ELF
system (the guinea pig, if you will).
starwolf 13: time file /etc/passwd
/etc/passwd: English Text
real 0m1.081s
user 0m0.476s
sys 0m0.225s
defender 15: time file /etc/passwd
/etc/passwd: ASCII text
real 0m6.992s
user 0m2.063s
sys 0m1.702s
Overall, I am seeing higher load-and-execute times on my ELF system
than on my a.out system, though this is by far the most drastic example
I've found.
Can someone explain this, and can it be fixed?
I ran the tests (a.out vs. ELF) on two identical machines down to
the point that /usr/share was local to both machines (each had their
own copy), the file on which I ran the test was /etc/passwd which
was the same length on both machines.
Moreover, it's startup time which is the problem, not run-time.
If I passed many files on the command line, file waited for about five
or six seconds and then processed the files as if there were no
other difficulties.
Most of the execution time differences are nowhere near this severe,
but in general the ELF times are higher than the a.out times.
Someone mentioned alignment issues. Anyone else have a clue?
A good technically explicit answer from a knowledgeable person would be a
plus.
This problem seems germane to the 'file' program, but it indicates
either a kernel or a compiler problem.
>How-To-Repeat:
$ time file /etc/passwd
>Fix:
>Audit-Trail:
>Unformatted: