Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!news.dacom.co.kr!news.kreonet.re.kr!usenet.etri.re.kr!usenet.kornet.nm.kr!agate!theos.com!riscan.riscan.com!n1van.istar!van-bc!unixg.ubc.ca!news.bc.net!info.ucla.edu!galaxy.ucr.edu!hill!grif From: grif@hill.uucp (Michael Griffith) Newsgroups: comp.os.linux.networking,comp.unix.bsd.netbsd.misc,comp.unix.bsd.freebsd.misc Subject: Re: /bin/sh (was: TCP latency) Date: 10 Jul 1996 21:16:10 GMT Organization: University of California, Riverside Lines: 55 Message-ID: <4s16iq$nkm@galaxy.ucr.edu> References: <4paedl$4bm@engnews2.eng.sun.com> <4rtvpf$7e5@fido.asd.sgi.com> <4run3s$3ou@galaxy.ucr.edu> <4s0bft$19s@jraynard.demon.co.uk> NNTP-Posting-Host: hill.ucr.edu Xref: euryale.cc.adfa.oz.au comp.os.linux.networking:44719 comp.unix.bsd.netbsd.misc:3990 comp.unix.bsd.freebsd.misc:23243 In article <4s0bft$19s@jraynard.demon.co.uk>, James Raynard <james@jraynard.demon.co.uk> wrote: >In article <4run3s$3ou@galaxy.ucr.edu>, >Michael Griffith <grif@hill.uucp> wrote: >>In article <4rtvpf$7e5@fido.asd.sgi.com>, >>Larry McVoy <lm@slovax.engr.sgi.com> wrote: >>>I'm also interested in John's comment about the smaller, simpler shell >>>that FreeBSD uses (I assume it is /bin/sh, right?). If FreeBSD has a >>>simple shell that doesn't break any common scripts (like rc.d scripts, >>>that would be a bummer), I'd vote for using that in Linux. I hate using >>>bash to start processes, it's bloated. >> >>I wonder if it is 'ash'? > >Yes. Although I understand that quite a few Linux scripts depend on >/bin/sh having BASH's extra features... Just for curiosity, I redid my lmbench experiments with using 'ash' as /bin/sh. Previously, I had seen that 'ash' was a bit slower than 'bash'. Under 2.0.0 (with much newer libs and compiler (perhaps newer versions of 'ash' and 'bash', too) I find the opposite is true. The lmbench results are below. For reference, I included the best and worst entries for the /bin/sh Process uBenchmark. L M B E N C H 1 . 0 S U M M A R Y ------------------------------------ Processor, Processes - times in microseconds (smaller is better) -------------------------------------------- Host OS Mhz Null Null Simple /bin/sh Mmap 2-proc 8-proc Syscall Process Process Process lat ctxsw ctxsw --------- ------------- ---- ------- ------- ------- ------- ---- ------ ------ linux-bash Linux 2.0.0 199 3 0K 4K 34K 114 5 6 linux-ash Linux 2.0.0 199 3 0K 4K 11K 115 5 6 ultraspar SunOS 5.5 167 5 4K 20K 10K 212 14 20 nobozo OSF1 V3.2 196 9 3K 10K 281K 180 43 45 ^^^^ Look at this. Considering that 'ash' is THREE TIMES FASTER than 'bash' for simple execution of programs, the Linux community should consider making the changes necessary to have 'ash' be the official /bin/sh for non-interactive use. If someone were to profile 'ash' (hint, hint), I'm sure we could beat SunOS 5.5 on the ultraSPARC and be best of breed. -- Michael A. Griffith (grif@cs.ucr.edu) | http://www.cs.ucr.edu/~grif/ Department of Computer Science | PGP public key available. University of California, Riverside | "My freedom of speech implies (909) 787-3803 (909) 787-4643 FAX | your freedom to be offended."