The dynamic linking tax on
|
| Kernel | CPU | How much worse |
| 2.6.14.4 | Athlon | 3 times |
| 2.6.14.4 | SMP Pentium III | 2.45 times |
| RHEL 4 2.6.9-derived | 64-bit SMP Opteron | 2.72 times |
| FC4 2.6.13-derived | Pentium 4 | 1.70 times |
| 2.4.32-rc1 | Pentium III | 1.84 times |
As an experiment, I statically linked the program with dietlibc as well as glibc on the two 2.6.14.4 machines. On the Athlon the dietlibc version was 7.7% faster, on the SMP P3 it was 10% faster. (The ratios in the table are against the static glibc version.)
I'm surprised that the SMP machines didn't pay a worse penalty than uniprocessor machines. It's annoying that Linux still has about the same penalty as Solaris, but on the other hand Linux forks pretty fast to start with; it's in the hundred microsecond range even for dynamically linked code.
One anomaly is that odd things seem to start happening on the FreeBSD 4.10 machine as the number of forks gets higher and higher; the execution times don't scale the way they should. (It's possible that some sort of PID or resource wrapping issue is responsible.)
These are my WanderingThoughts
(About the blog)
GettingAround
Full index of entries
Recent comments
This is part of CSpace, and is written by ChrisSiebenmann.
* * *
Atom feeds are available; see the bottom of most pages.
Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web