Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!mips!kpc.com!ardent!mac From: mac@gold.kpc.com (Mike McNamara) Newsgroups: comp.benchmarks Subject: Here is a tiny OS benchmark Message-ID: Date: 15 Apr 91 23:11:50 GMT Sender: uucp@kpc.com (UNIX-to-UNIX Copy) Reply-To: mac@kpc.com Organization: Kubota Pacific Computer Incoporated, Sanata Clara, CA Lines: 91 Nntp-Posting-Host: gold The following is motivated by laments heard at ASPLOS concerning the derth of useful OS benchmarks. This benchmarks suffers from all the usual aliments: It generates a single figure of merit; It is suspectable to point optimizations of the target machine; It gives different results when run in single user mode versus when run at 3 pm the day before tapeout; It assumes you are running a UNIX on a machine with /bin/csh; It probably does not model your application real well; It probably isn't real useful ;-) However, it tests interesting things: How often can the system create, run, and exit a simple program, like /bin/date ? #!/bin/csh set i = 0 set count = 500 set host = `/bin/hostname` echo " The Date Per Second Benchmark " echo " ----------------------------- " echo " Timing $count /bin/dates..." onintr die ## if you have a modern date... #set k = `date '+%H %M %S' ` #set hours = $k[1] #set minutes = $k[2] #set seconds = $k[3] # else set k = `date | sed -e 's/:/ /g'` set hours = $k[4] set minutes = $k[5] set seconds = $k[6] # endif set start = 0 @ start = $hours * 3600 + $minutes * 60 + $seconds echo "Start time is $start ..." while ( $i < $count ) /bin/date > /dev/null @ i = $i + 1 end die: ## if you have a modern date... # set k = `date '+%H %M %S' ` #set hours = $k[1] #set minutes = $k[2] #set seconds = $k[3] # else set k = `date | sed -e 's/:/ /g'` set hours = $k[4] set minutes = $k[5] set seconds = $k[6] # endif set finish = 0 @ finish = $hours * 3600 + $minutes * 60 + $seconds echo ...End time is $finish set delta = 0 @ delta = $finish - $start echo $i dates in $delta seconds: set dps = `echo " $i / $delta " | bc ` echo echo The machine \"${host}\" executes $dps dates per second Just to start things off, the machine on my desk runs: mac@mack 25 % ./dps The Date Per Second Benchmark ----------------------------- Timing 500 /bin/dates... Start time is 57001 ... ...End time is 57020 500 dates in 19 seconds: The machine "mack" executes 26 dates per second mac@mack 26 % My machine is a 33MHz R3000 with a 33MHz bus. Machine OS DPS Load Sun 3/50 4.0 3 Unloaded Sun 3/280 4.1.1 6 Normal fileserver load Stardent 30xx 4.0 12 Unloaded My machine -- 26 Unloaded How does your machine compare? -- +-----------+-----------------------------------------------------------------+ |mac@kpc.com| Increasing Software complexity lets us sell Mainframes as | | | personal computers. Carry on, X windows/Postscript/emacs/CASE!! | +-----------+-----------------------------------------------------------------+