40% slowdown with dynamic /bin/sh

Daniel O'Connor doconnor at gsoft.com.au
Mon Nov 24 17:43:16 PST 2003

On Tuesday 25 November 2003 11:36, Frank Mayhar wrote:
> Daniel O'Connor wrote:
> > What _REAL WORLD_ task does this slow down?
> I think the point was that, in this particular "worst" case, it's a forty
> percent performance hit.  What's the average case?  What's the case for a
> "real world" pipeline with a lot of tiny little static binaries?
> I dislike this decision enough that I'm actually considering going away
> from FreeBSD, something I really had never for a moment thought possible.
> It's even worse that you deride someone who tried to shed a little light
> on the discussion.

It is _trivial_ to buildworld with a static root.

> The performance hit is real.  Even if it's not forty percent it's worth
> consideration, no matter how much you may want to shout down those who
> disagree.

Of course it's real! I am not disputing that. It's just that I believe most 
people don't run /bin/sh so much it matters. If they do, then building it 
static is simple.

> > My production systems don't spin in infinite loops spawning shell
> > processes which die straight away.
> Uh, _huh_.  Well, can you _imagine_ a scenario in which a "production
> system" might actually do something along those lines?  _I_ can.  Think a
> system of shell scripts.

Surely you don't run /bin/sh so frequently it has an appreciable impact..
Again, if you do, buildworld with static binaries.

System shell scripts run mostly at boot, this is not what the PC spends most 
of it's time doing.

If you have a file, web, mail, database, etc server it's predominant 
application is already dynamically linked.

> I can guarantee you that you have no idea _at all_ what is "of relevance to
> most users of FreeBSD."  It is nearly axiomatic that developers cannot
> imagine the uses to which their users put their systems.

I'm not a committer, I use FreeBSD and I submit PRs. Perhaps we should run a 
survey to determine what 

> > If it is for you then just build your world with static root.
> Kind of defeats the purpose, don't you think?

Not really, if you want the performance back, then build statically.

> Feh.  This is utterly ridiculous.  Yeah, I understand why you guys made
> the decision.  It's the same set of reasons a lot of other people in the
> past have made the same or similar decisions.  We'll see if you get burned
> by it, as many of those other people were.

Why didn't you pipe up when this was discussed _long_ ago?
I don't understand why you can't buildworld with static slash if you feel so 
strongly about it.

If you are deploying FreeBSD on servers you should build your own release 
anyway (which is hardly an onerous task).

Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 9A8C 569F 685A D928 5140  AE4B 319B 41F4 5D17 FDD5

More information about the freebsd-current mailing list