40% slowdown with dynamic /bin/sh

Leo Bicknell bicknell at ufp.org
Mon Nov 24 18:08:31 PST 2003

In a message written on Tue, Nov 25, 2003 at 12:12:59PM +1030, Daniel O'Connor wrote:
> If you have a file, web, mail, database, etc server it's predominant 
> application is already dynamically linked.

It just occured to me what bothers me about this line of thinking,
since several people have brought it up.  When I run kwrite, or
Mozilla, or any number of other dynamic apps they are relatively
long lived.  My database loads (eg, pays the dynamic link penalty)
once at startup.  By contrast /bin/sh is run often.

Process accounting can tell the story:

% lastcomm | wc -l
% lastcomm | sed -e 's/ .*.//' | sort | uniq -c | sort -nr | head
25281 sendmail
4094 sh
2987 perl
2846 inetd
1704 procmail
1640 httpd
1221 cron
 814 date
 732 postgres
 648 rateup

Looks like sh is the 2nd most frequently executed command on my
system.  It is 8.5% of all executed programs on this particular
system.  I think slowing down 8.5% of all the programs the system
runs is important.

I don't suggest I am representative, but for all those with process
accounting turned on you have the commands above, check it out.

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

What?  Did you read what you wrote?  It was a stand alone paragraph,
I didn't take it out of context.  People who use FreeBSD on servers
should build their own release?  That's so nutz I don't know where
to start to attack it.  I think I'll leave it to the third point from

] FreeBSD makes an ideal Internet or Intranet server. It provides robust
] network services under the heaviest loads and uses memory efficiently to
] maintain good response times for thousands of simultaneous user
] processes. Visit our gallery for examples of FreeBSD powered
] applications and services.

       Leo Bicknell - bicknell at ufp.org - CCIE 3440
        PGP keys at http://www.ufp.org/~bicknell/
Read TMBG List - tmbg-list-request at tmbg.org, www.tmbg.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20031124/3fcc3558/attachment.bin

More information about the freebsd-current mailing list