From owner-freebsd-current@FreeBSD.ORG Tue Nov 25 01:20:42 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E586F16A4CE for ; Tue, 25 Nov 2003 01:20:42 -0800 (PST) Received: from alpha.siliconlandmark.com (alpha.siliconlandmark.com [209.69.98.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 897E543F3F for ; Tue, 25 Nov 2003 01:20:41 -0800 (PST) (envelope-from andy@siliconlandmark.com) Received: from alpha.siliconlandmark.com (localhost [127.0.0.1]) hAP9KVZV047550; Tue, 25 Nov 2003 04:20:31 -0500 (EST) (envelope-from andy@siliconlandmark.com) Received: from localhost (andy@localhost)hAP9KUPV047547; Tue, 25 Nov 2003 04:20:31 -0500 (EST) (envelope-from andy@siliconlandmark.com) X-Authentication-Warning: alpha.siliconlandmark.com: andy owned process doing -bs Date: Tue, 25 Nov 2003 04:20:30 -0500 (EST) From: Andre Guibert de Bruet To: Leo Bicknell In-Reply-To: <20031125020829.GA13783@ussenterprise.ufp.org> Message-ID: <20031125041002.B92204@alpha.siliconlandmark.com> References: <200311250106.hAP16qNp018512@realtime.exit.com> <20031125020829.GA13783@ussenterprise.ufp.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean cc: freebsd-current@freebsd.org Subject: Re: 40% slowdown with dynamic /bin/sh X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2003 09:20:43 -0000 On Mon, 24 Nov 2003, Leo Bicknell wrote: > Process accounting can tell the story: > > % lastcomm | wc -l > 47806 > % 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. For what it's worth, here's the data that I've taken from the daily process accounting files of one of our somewhat busy shellboxes: # lastcomm -f acct.0 | sed -e 's/ .*.//' | sort | uniq -c | sort -nr | head 4829 qpopper 3426 bash 3191 sendmail 1915 sh 1687 httpd 1281 sed 1030 sshd2 952 rm 792 procmail 739 cron # lastcomm -f acct.1 | sed -e 's/ .*.//' | sort | uniq -c | sort -nr | head 5383 qpopper 3282 bash 2743 sendmail 1617 httpd 1187 sh 1071 sed 772 rm 739 cron 694 procmail 478 cat # lastcomm -f acct.2 | sed -e 's/ .*.//' | sort | uniq -c | sort -nr | head 5376 qpopper 2823 bash 2118 sendmail 1674 httpd 1510 sh 745 procmail 740 cron 292 python 288 atrun 211 inetd Though /bin/sh isn't 2nd on the list, it does feature prominently in the top 10. I would assume that anyone with a fairly busy machine acting as a shellbox and webserver would see something along these lines... Regards, > Andre Guibert de Bruet | Enterprise Software Consultant > > Silicon Landmark, LLC. | http://siliconlandmark.com/ >