The 30 Minute Benchmark
Paul Manno
paul at msdc.UUCP
Fri Oct 26 12:05:36 AEST 1984
A copy of the benchmark programs producing the following results has
been published in net.sources for your enjoyment. In order to make any
sense of these numbers, you MUST review the benchmark programs and
system configurations in net.sources. We accept no responsibility for
your use of the data.
Here is a summary of some of the results with the numbers given as
real/user/sys time in seconds. ("Sort" is the execution of sort on a
1MB file of random ASCII integers; "memdisk" and "memcpu" are the
average times for execution of five concurrent copies of the "disk"
and "cpu" benchmarks.)
machine | sort | memdisk | memcpu
-----------------|------------|-----------|------------
VAX 750 - 4.1BSD | 455/316/68 | 668/27/32 | 1132/207/9
VAX 750 - 4.2BSD | 309/281/20 | 271/25/17 | 1052/204/4
VAX 780 - 4.1BSD | 357/180/38 | 802/16/21 | 776/106/3
VAX 785 - Ultrix | 119/105/ 8 | 246/10/ 8 | 340/ 68/0.4
For those folks not receiving net.sources, you may request a copy of
the programs through UUCP mail or by sending me a tape (pre-addressed
and return postage paid, please) to the address below. I welcome
constructive comments and additional results you may wish to send.
Paul Manno (...{akgua, gatech, mcnc}!msdc!paul)
Medical Systems Development Corporation
P. O. Box 26022
Atlanta, GA 30335
P.S. The name "The 30 Minute Benchmark" is not derived from the amount
of time to run the benchmark. That's the time it took to write it! :-)
======= cut here =======
echo "This is a shell-archive format file."
echo "It will extract 10 files in the current directory..."
echo "-x README"
cat >README <<!FUNKYSTUFF!
DISCLAIMER:
This benchmark was written to evaluate cpu and disk/filesystem
throughput on a Unix system for our style of application.
Since our applications produce a system loading probably unlike
any other in the universe, you must interpret the results
provided and those you collect at your own risk.
Even though these programs seem to represent our workload, we
still don't trust them (or any benchmark) beyond plus or minus
20% on relative performance comparisons. Remember, actual
mileage may vary depending upon local road conditions and your
driving habits.
The code attempts to be portable among many versions of Unix
although it has only been run on 4.1bsd, 4.2bsd and System 3 at
the time of this writing.
TO RUN:
The benchmark requires 5 files: Makefile, runbench, mkfile.c,
memcpu.c and memdisk.c. Results are collected in a file named
"results" in the current directory. It is started with the
following command:
sh runbench
Included for ease of interpretation is an awk script used to
provide common output (some systems like to report times in
MM:SS.SS, others in SSSSS.SS) and averages of sections. To run
the awk script, type:
awk -f anal.awk <results >anal.results
IT REQUIRES:
time: about 0.3 to 1.5 hours depending upon cpu and disk speed.
disk: about 6MB in the current directory.
mem: about 300KB per process (10 processes max)
SUGGESTIONS:
I welcome constructive comments on this suite. UUCP mail is
preferred but USPS mail is acceptable. Send comments to:
Paul Manno (...{akgua, gatech, mcnc}!msdc!paul)
Medical Systems Development Corporation
P.O. Box 26022
Atlanta, GA 30335
!FUNKYSTUFF!
echo "-x Makefile"
cat >Makefile <<!FUNKYSTUFF!
CFLAGS=-O
all: mkfile memcpu memdisk
mkfile: mkfile.c
time cc \$(CFLAGS) mkfile.c -o mkfile >>c.mkfile 2>>c.mkfile
memcpu: memcpu.c
time cc \$(CFLAGS) memcpu.c -o memcpu >>c.memcpu 2>>c.memcpu
memdisk: memdisk.c
time cc \$(CFLAGS) memdisk.c -o memdisk >>c.memdisk 2>>c.memdisk
!FUNKYSTUFF!
echo "-x memcpu.c"
cat >memcpu.c <<!FUNKYSTUFF!
/*
* memcpu - attempt to test cpu and memory speed
*
* Usage:
* memcpu -b<block size> -i<iterations> -m<mem size>
*
* Description:
* memcpu allocates a memory buffer (default 100KB) and
* initializes each <block size> block (default 1024B) to
* the char representation of the block number. It then
* randomly "seeks" to a block, copies the info to a
* local string and compares the converted integer back
* to the block number <iteration> times (default 100000).
*
* Written:
* June, 1984
* Medical Systems Development Corporation
*
*/
#include <stdio.h>
main(argc, argv)
int argc;
char *argv[];
{
long i;
long bsize = 1024; /* default to 1K block size */
long msize = 100000; /* default to 100K mem size */
long iters = 100000; /* default to 100K interations */
long nblocks;
char *buf;
char str[256];
char *malloc();
char *index();
int rand();
int atoi();
long value;
for (i = 1; i < argc; i++)
{
if (argv[i][0] == '-')
switch(argv[i][1])
{
case 'm':
if ((msize = atoi(&argv[i][2])) <= 0)
{
fprintf(stderr, "Bad mem size spec.\n");
exit(1);
}
break;
case 'b':
if ((bsize = atoi(&argv[i][2])) <= 0)
{
fprintf(stderr, "Bad block size spec.\n");
exit(1);
}
break;
case 'i':
if ((iters = atoi(&argv[i][2])) <= 0)
{
fprintf(stderr, "Bad iteration count.\n");
exit(1);
}
break;
default:
exit(1);
}
}
if (msize <= 0)
{
fprintf(stderr, "Usage: %s -b<block size> -i<iterations> -m<mem size>\n", argv[0]);
exit(1);
}
if (bsize <= 0)
{
fprintf(stderr, "Usage: %s -b<block size> -i<iterations> -m<mem size>\n", argv[0]);
exit(1);
}
if (bsize > msize)
{
fprintf(stderr, "%s: block size specified is greater than memory spec.\n", argv[0]);
exit(1);
}
srand(time(0L));
if ((buf = malloc(msize)) == NULL)
{
fprintf(stderr, "Could not allocate %ld bytes of memory.\n", msize);
exit(1);
}
nblocks = msize / bsize;
sprintf(str, "%%0%dd", bsize > 32 ? 32 : bsize - 1);
for (i = 0; i < nblocks; i++)
sprintf(&buf[i * bsize], str, i);
for (; iters > 0; iters--)
{
i = (rand() * rand() * rand() * rand()) % nblocks;
i = i >= 0 ? i : i * (-1); /* ensure it's positive */
strncpy(str, &buf[i * bsize], bsize); /* move a string around */
if (index(str, '0') == NULL)
strcpy(str, "0");
value = strlen(&buf[i * bsize]); /* look through memory */
value = atoi(&buf[i * bsize]); /* convert saved number */
if (value != i)
fprintf(stderr, "%s: block number mismatch.\n", argv[0]);
}
}
!FUNKYSTUFF!
echo "-x memdisk.c"
cat >memdisk.c <<!FUNKYSTUFF!
/*
* memdisk - try and measure memory and disk performance
*
* Usage:
* memdisk -b<block size> -f<filename> -i<iterations> -m<file size>
*
* Description:
* memdisk writes a file (default name "benchtmp") the size
* specified (default 100KB) and fills each <block size> block
* (default 1024B) with the char representation of the block
* number. The file is closed and re-opened for reading. For
* the specified number of <iterations> (default 100000), memdisk
* randomly seeks to a block and converts the contents back
* into the integer block number for comparison after moving
* the string around in memory.
*
* Written:
* June, 1984
* Medical Systems Development Corporation
*
*/
#include <stdio.h>
main(argc, argv)
int argc;
char *argv[];
{
long i;
long bsize = 1024; /* default to 1K block size */
long msize = 100000; /* default to 100K file size */
long iters = 100000; /* default to 100K interations */
long mempad = 300000; /* some amount of bulk memory */
long nblocks;
int fd;
char *buf;
char *str;
char *mem;
char fname[256];
char *malloc();
char *index();
int rand();
int atoi();
int creat();
long value;
strcpy(fname, "benchtmp");
for (i = 1; i < argc; i++)
{
if (argv[i][0] == '-')
switch(argv[i][1])
{
case 'm':
if ((msize = atoi(&argv[i][2])) <= 0)
{
fprintf(stderr, "Bad file size spec.\n");
exit(1);
}
break;
case 'b':
if ((bsize = atoi(&argv[i][2])) <= 0)
{
fprintf(stderr, "Bad block size spec.\n");
exit(1);
}
break;
case 'i':
if ((iters = atoi(&argv[i][2])) <= 0)
{
fprintf(stderr, "Bad iteration count.\n");
exit(1);
}
break;
case 'f':
strcpy(fname, &argv[i][2]);
break;
default:
fprintf(stderr, "Usage: %s -b<block size> -f<filename> -i<iterations> -m<file size>\n", argv[0]);
exit(1);
}
}
if (msize <= 0)
{
fprintf(stderr, "Usage: %s -b<block size> -f<filename> -i<iterations> -m<file size>\n", argv[0]);
exit(1);
}
if (bsize <= 0)
{
fprintf(stderr, "Usage: %s -b<block size> -f<filename> -i<iterations> -m<file size>\n", argv[0]);
exit(1);
}
if (bsize > msize)
{
fprintf(stderr, "%s: block size specified is greater than file size spec.\n", argv[0]);
exit(1);
}
if ((fd = creat(fname, 0666)) < 0)
{
fprintf(stderr, "%s: Could not create.\n", fname);
exit(1);
}
srand(time(0L));
if ((buf = malloc(bsize+1)) == NULL)
{
fprintf(stderr, "Could not allocate %ld bytes of memory.\n", bsize+1);
exit(1);
}
if ((mem = malloc(mempad)) == NULL)
{
fprintf(stderr, "Could not allocate %ld bytes of memory.\n", mempad);
exit(1);
}
if ((str = malloc(bsize+1)) == NULL)
{
fprintf(stderr, "Could not allocate %ld bytes of memory.\n", bsize+1);
exit(1);
}
nblocks = msize / bsize;
sprintf(str, "%%0%dd", bsize > 32 ? 32 : bsize - 1);
for (i = 0; i < nblocks; i++)
{
sprintf(buf, str, i);
if (write(fd, buf, bsize) < 0)
{
fprintf(stderr, "%s: initial write failed.\n", argv[0]);
exit(1);
}
}
close(fd);
if ((fd = open(fname, 0)) < 0)
{
fprintf(stderr, "%s: could not reopen %s.\n", argv[0], fname);
exit(1);
}
for (; iters > 0; iters--)
{
i = (rand() * rand() * rand() * rand()) % nblocks;
i = i >= 0 ? i : i * (-1); /* ensure it's positive */
mem[i % mempad] = 0377; /* fiddle with some mem */
if (lseek(fd, (i * bsize), 0) < 0) /* seek to position */
{
fprintf(stderr, "%s: could not seek to block %ld.\n", argv[0], i);
exit(1);
}
if (read(fd, buf, bsize) < 0)
{
fprintf(stderr, "%s: could not read block %ld.\n", argv[0], i);
exit(1);
}
strncpy(str, buf, bsize); /* move a string around */
if (index(str, '0') == NULL)
strcpy(str, "0");
value = strlen(buf); /* look through memory */
value = atoi(buf); /* convert saved number */
if (value != i)
fprintf(stderr, "%s: block number mismatch.\n", argv[0]);
}
}
!FUNKYSTUFF!
echo "-x mkfile.c"
cat >mkfile.c <<!FUNKYSTUFF!
/*
* mkfile - create a text file of random integers
*
* Usage:
* mkfile -f<filename> -s<file size>
*
* Description:
* mkfile writes a text file of specified <file size> (no default)
* of random integers converted into their char representation
* into the filename specified (default bench.1). Note that
* the actual file size may be a few characters larger than
* the exact size specified in order to include a complete
* last line.
*
* Written:
* June, 1984
* Medical Systems Development Corporation
*
*/
#include <stdio.h>
main(argc, argv)
int argc;
char *argv[];
{
long i;
long fsize = 0;
char buf[513];
char filename[128];
int atoi();
int creat();
int ofd;
long value;
strcpy(filename, "bench.1");
for (i = 1; i < argc; i++)
{
if (argv[i][0] == '-')
switch(argv[i][1])
{
case 's':
if ((fsize = atoi(&argv[i][2])) <= 0)
{
fprintf(stderr, "Bad size spec.\n");
exit(1);
}
break;
case 'f':
strcpy(filename, &argv[i][2]);
break;
default:
fprintf(stderr, "Usage: %s -f<filename> -s<file size>\n", argv[0]);
exit(1);
}
}
if (fsize == 0)
{
fprintf(stderr, "Usage: %s -f<filename> -s<file size>\n", argv[0]);
exit(1);
}
if ((ofd = creat(filename, 0666)) < 0)
{
fprintf(stderr, "%s: Cannot open\n", filename);
exit(1);
}
srand(time(0L));
for (i = 0; i < fsize; )
{
value = (rand() * rand() * (rand() / 17)) % fsize;
sprintf(buf, "%32d\n", (value < 0) ? value * (-1) : value );
if (write(ofd, buf, strlen(buf)) < 0)
{
perror("Write failed");
exit(2);
}
i += strlen(buf);
}
}
!FUNKYSTUFF!
echo "-x runbench"
cat >runbench <<!FUNKYSTUFF!
: "Shell file to run the benchmark and collect results"
OBJS="mkfile memcpu memdisk"
SRCS="mkfile.c memcpu.c memdisk.c"
if test -n "\`ls \$SRCS | grep 'not found'\`"; then
echo "Cannot locate all required sources" >>results 2>>results
exit 1
fi
rm -f \$OBJS
echo "" >>results
echo "Benchmark run as of \`date\`" >>results
echo " Compiles:" >>results
make >>/dev/null 2>>/dev/null
echo " mkfile:" >>results ; cat c.mkfile >>results 2>>results; rm -f c.mkfile
echo " memcpu:" >>results ; cat c.memcpu >>results 2>>results; rm -f c.memcpu
echo " memdisk:" >>results ; cat c.memdisk >>results 2>>results; rm -f c.memdisk
echo " Building 1MB file:" >>results
time mkfile -s1000000 >>results 2>>results
echo " Running 1 copy of memcpu:" >>results
time memcpu -b128 -i100000 -m300000 >>results 2>>results
echo " Running 5 copies of memcpu:" >> results
for x in 1 2 3 4 5; do
time memcpu -b128 -i100000 -m300000 >>bench.2\$x 2>>bench.2\$x &
done
wait
cat bench.2? >>results 2>>results
rm -f bench.2?
echo " Running 1 copy of memdisk:" >>results
time memdisk -b10000 -i500 -m1000000 -ftmp.1 >>results 2>>results
echo " Running 5 copies of memdisk:" >>results
for x in 1 2 3 4 5; do
time memdisk -b10000 -i500 -m1000000 -ftmp.\$x >>bench.3\$x 2>>bench.3\$x &
done
wait
cat bench.3? >>results 2>>results
rm -f bench.3?
echo " Running one copy each of memcpu and memdisk:" >>results
time memcpu -b128 -i100000 -m300000 >>bench.40 2>>bench.40 &
time memdisk -b10000 -i500 -m1000000 -ftmp.0 >>bench.50 2>>bench.50 &
wait
cat bench.40 bench.50 >>results 2>>results
rm -f tmp.0
rm -f bench.40 bench.50
echo " Running 5 copies each of memcpu and memdisk:" >>results
for x in 1 2 3 4 5; do
time memcpu -b128 -i100000 -m300000 >>bench.4\$x 2>>bench.4\$x &
time memdisk -b10000 -i500 -m1000000 -ftmp.\$x >>bench.5\$x 2>>bench.5\$x &
done
wait
for x in 1 2 3 4 5; do
echo " pair \$x:" >>results
cat bench.4\$x bench.5\$x >>results 2>>results
done
rm -f tmp.*
rm -f bench.4? bench.5?
echo " Sorting the 1MB file:" >>results
time sort bench.1 -o bench.2 >>results 2>>results
rm -f bench.1 bench.2
echo " Benchmark complete \`date\`" >>results
!FUNKYSTUFF!
echo "-x anal.750.4.1"
cat >anal.750.4.1 <<!FUNKYSTUFF!
Configuration is:
# VAX 11/750 running 4.1bsd
# 4MB main memory
# 2 RA81 disks
Benchmark run as of Mon Jun 18 19:01:15 EDT 1984
Compiles:
mkfile:
17.0 real 4.6 user 3.6 sys
memcpu:
15.0 real 6.7 user 3.6 sys
memdisk:
27.0 real 10.2 user 3.7 sys
Building 1MB file:
158.0 real 55.4 user 75.5 sys
Running 1 copy of memcpu:
257.0 real 208.4 user 10.0 sys
Running 5 copies of memcpu:
1156.0 real 211.0 user 14.9 sys
1146.0 real 209.4 user 7.8 sys
1116.0 real 205.6 user 6.3 sys
1140.0 real 205.9 user 12.7 sys
1104.0 real 205.3 user 3.9 sys
1132.4 real 207.4 user 9.1 sys Average of above
Running 1 copy of memdisk:
133.0 real 25.3 user 26.7 sys
Running 5 copies of memdisk:
673.0 real 27.1 user 32.8 sys
655.0 real 26.1 user 31.8 sys
677.0 real 27.1 user 32.4 sys
670.0 real 26.8 user 32.9 sys
666.0 real 26.4 user 32.3 sys
668.2 real 26.7 user 32.4 sys Average of above
Running one copy each of memcpu and memdisk:
312.0 real 211.2 user 15.4 sys
142.0 real 24.8 user 28.7 sys
227.0 real 118.0 user 22.1 sys Average of above
Running 5 copies each of memcpu and memdisk:
pair 1:
1534.0 real 215.0 user 20.0 sys
706.0 real 25.7 user 34.4 sys
1120.0 real 120.3 user 27.2 sys Average of above
pair 2:
1523.0 real 211.8 user 14.9 sys
703.0 real 26.3 user 32.3 sys
1113.0 real 119.1 user 23.6 sys Average of above
pair 3:
1493.0 real 209.0 user 13.0 sys
700.0 real 26.9 user 32.7 sys
1096.5 real 117.9 user 22.9 sys Average of above
pair 4:
1512.0 real 209.5 user 16.1 sys
702.0 real 26.0 user 32.9 sys
1107.0 real 117.8 user 24.5 sys Average of above
pair 5:
1517.0 real 208.6 user 18.4 sys
699.0 real 26.1 user 33.6 sys
1108.0 real 117.4 user 26.0 sys Average of above
Sorting the 1MB file:
455.0 real 315.6 user 67.7 sys
Benchmark complete Mon Jun 18 20:20:55 EDT 1984
total elapsed = 21608.0 average = 745.1
total user time = 3217.8 average = 111.0
total sys time = 691.0 average = 23.8
!FUNKYSTUFF!
echo "-x anal.750.4.2"
cat >anal.750.4.2 <<!FUNKYSTUFF!
Configuration is:
# VAX 11/750 running 4.2bsd
# 3MB main memory
# 2 RA81 disks
Benchmark run as of Tue Oct 23 21:56:48 EDT 1984
Compiles:
mkfile:
16.2 real 5.0 user 3.4 sys
memcpu:
15.1 real 7.3 user 2.9 sys
memdisk:
15.3 real 10.5 user 3.0 sys
Building 1MB file:
148.8 real 52.8 user 94.0 sys
Running 1 copy of memcpu:
210.7 real 206.4 user 2.4 sys
Running 5 copies of memcpu:
1057.9 real 204.6 user 5.7 sys
1050.9 real 204.1 user 3.4 sys
1060.5 real 205.8 user 6.4 sys
1044.3 real 203.3 user 2.8 sys
1047.0 real 203.4 user 2.8 sys
1052.1 real 204.2 user 4.2 sys Average of above
Running 1 copy of memdisk:
61.1 real 24.1 user 13.4 sys
Running 5 copies of memdisk:
262.8 real 24.9 user 17.6 sys
268.1 real 25.2 user 17.6 sys
277.6 real 25.1 user 17.5 sys
271.8 real 24.9 user 17.4 sys
272.9 real 24.7 user 16.9 sys
270.6 real 25.0 user 17.4 sys Average of above
Running one copy each of memcpu and memdisk:
253.0 real 207.4 user 5.2 sys
92.2 real 24.0 user 14.1 sys
172.6 real 115.7 user 9.7 sys Average of above
Running 5 copies each of memcpu and memdisk:
pair 1:
1307.2 real 208.4 user 8.9 sys
422.1 real 25.1 user 16.9 sys
864.6 real 116.8 user 12.9 sys Average of above
pair 2:
1290.0 real 205.4 user 5.8 sys
427.3 real 25.0 user 17.3 sys
858.7 real 115.2 user 11.6 sys Average of above
pair 3:
1303.8 real 206.3 user 8.5 sys
426.7 real 24.7 user 17.3 sys
865.3 real 115.5 user 12.9 sys Average of above
pair 4:
1295.9 real 205.7 user 6.2 sys
430.5 real 25.1 user 17.5 sys
863.2 real 115.4 user 11.9 sys Average of above
pair 5:
1292.6 real 205.6 user 5.8 sys
421.2 real 24.8 user 16.7 sys
856.9 real 115.2 user 11.3 sys Average of above
Sorting the 1MB file:
308.7 real 281.0 user 20.1 sys
Benchmark complete Tue Oct 23 22:58:28 EDT 1984
total elapsed = 16352.2 average = 563.9
total user time = 3120.6 average = 107.6
total sys time = 387.5 average = 13.4
!FUNKYSTUFF!
echo "-x anal.780.4.1"
cat >anal.780.4.1 <<!FUNKYSTUFF!
Configuration is:
# VAX 11/780 w/FPA running 4.1bsd
# 4MB main memory
# 4 CDC 9766 Unibus disks (RM05-style)
# (System was not dedicated to benchmark)
Benchmark run as of Wed Jun 20 15:41:54 EDT 1984
Compiles:
mkfile:
15.0 real 2.8 user 2.5 sys
memcpu:
19.0 real 4.2 user 2.2 sys
memdisk:
14.0 real 6.0 user 2.3 sys
Building 1MB file:
131.0 real 30.1 user 54.3 sys
Running 1 copy of memcpu:
123.0 real 106.4 user 1.5 sys
Running 5 copies of memcpu:
778.0 real 104.7 user 3.1 sys
768.0 real 104.8 user 2.6 sys
784.0 real 107.8 user 3.0 sys
773.0 real 105.6 user 2.9 sys
779.0 real 105.1 user 3.1 sys
776.4 real 105.6 user 2.9 sys Average of above
Running 1 copy of memdisk:
194.0 real 16.1 user 18.9 sys
Running 5 copies of memdisk:
804.0 real 16.3 user 20.8 sys
811.0 real 16.2 user 21.8 sys
794.0 real 16.1 user 20.9 sys
797.0 real 16.1 user 19.9 sys
805.0 real 16.4 user 20.5 sys
802.2 real 16.2 user 20.8 sys Average of above
Running one copy each of memcpu and memdisk:
168.0 real 104.1 user 8.2 sys
110.0 real 15.9 user 19.4 sys
139.0 real 60.0 user 13.8 sys Average of above
Running 5 copies each of memcpu and memdisk:
pair 1:
1028.0 real 106.6 user 9.8 sys
786.0 real 15.8 user 20.6 sys
907.0 real 61.2 user 15.2 sys Average of above
pair 2:
1032.0 real 106.9 user 10.6 sys
788.0 real 16.3 user 20.7 sys
910.0 real 61.6 user 15.7 sys Average of above
pair 3:
1031.0 real 106.0 user 11.3 sys
793.0 real 16.0 user 20.4 sys
912.0 real 61.0 user 15.9 sys Average of above
pair 4:
1028.0 real 105.7 user 10.4 sys
792.0 real 16.2 user 20.5 sys
910.0 real 61.0 user 15.4 sys Average of above
pair 5:
1026.0 real 106.0 user 9.7 sys
790.0 real 16.1 user 20.6 sys
908.0 real 61.0 user 15.2 sys Average of above
Sorting the 1MB file:
357.0 real 179.9 user 38.3 sys
Benchmark complete Wed Jun 20 16:43:28 EDT 1984
total elapsed = 18118.0 average = 624.8
total user time = 1686.2 average = 58.1
total sys time = 420.8 average = 14.5
!FUNKYSTUFF!
echo "-x anal.785.ultrix"
cat >anal.785.ultrix <<!FUNKYSTUFF!
Configuration is:
# VAX 11/785 w/FPA running Ultrix Version 1.0
# 16MB main memory (8 configured)
# 1 RA81 disk
Benchmark run as of Mon Sep 24 15:18:06 EDT 1984
Compiles:
mkfile:
5.4 real 2.0 user 1.2 sys
memcpu:
5.4 real 2.8 user 1.3 sys
memdisk:
7.4 real 4.0 user 1.5 sys
Building 1MB file:
60.7 real 18.6 user 38.9 sys
Running 1 copy of memcpu:
68.3 real 67.3 user 0.4 sys
Running 5 copies of memcpu:
340.7 real 67.3 user 0.3 sys
337.6 real 67.0 user 0.4 sys
341.8 real 68.0 user 0.4 sys
339.6 real 67.4 user 0.4 sys
342.0 real 68.2 user 0.4 sys
340.3 real 67.6 user 0.4 sys Average of above
Running 1 copy of memdisk:
27.9 real 9.4 user 6.4 sys
Running 5 copies of memdisk:
250.9 real 9.5 user 8.6 sys
245.1 real 9.4 user 8.3 sys
251.4 real 9.6 user 8.2 sys
250.9 real 9.7 user 8.2 sys
233.3 real 9.5 user 8.4 sys
246.3 real 9.5 user 8.3 sys Average of above
Running one copy each of memcpu and memdisk:
85.3 real 67.7 user 0.9 sys
44.8 real 9.1 user 7.0 sys
65.1 real 38.4 user 4.0 sys Average of above
Running 5 copies each of memcpu and memdisk:
pair 1:
444.9 real 69.0 user 1.4 sys
226.3 real 9.5 user 8.7 sys
335.6 real 39.3 user 5.0 sys Average of above
pair 2:
441.2 real 68.3 user 1.2 sys
253.4 real 9.7 user 8.3 sys
347.3 real 39.0 user 4.8 sys Average of above
pair 3:
443.6 real 68.4 user 1.4 sys
223.6 real 9.5 user 8.8 sys
333.6 real 39.0 user 5.1 sys Average of above
pair 4:
438.2 real 67.7 user 1.6 sys
236.6 real 9.5 user 8.6 sys
337.4 real 38.6 user 5.1 sys Average of above
pair 5:
442.3 real 68.0 user 1.6 sys
250.1 real 9.5 user 8.5 sys
346.2 real 38.8 user 5.1 sys Average of above
Sorting the 1MB file:
119.3 real 104.5 user 8.1 sys
Benchmark complete Mon Sep 24 15:42:00 EDT 1984
total elapsed = 6758.0 average = 233.0
total user time = 1060.1 average = 36.6
total sys time = 159.4 average = 5.5
!FUNKYSTUFF!
echo "-x anal.awk"
cat >anal.awk <<!FUNKYSTUFF!
{
if (NF != 6 || \$1 == "#")
{
if (bcela != 0 && bcusr != 0 && bcsys != 0)
{
if (bcela != 1)
{
printf("%6.1f real\t%6.1f user\t%6.1f sys\tAverage of above\n\n", bela / bcela, busr / bcusr, bsys / bcsys)
}
bela = 0;
busr = 0;
bsys = 0;
bcela = 0;
bcusr = 0;
bcsys = 0;
}
print \$0
next
}
if (2 == split(\$1, mela, ":"))
{
printf("%6.1f real\t", (mela[1] * 60) + mela[2])
tela += (mela[1] * 60) + mela[2]
bela += (mela[1] * 60) + mela[2]
cela += 1
bcela += 1
}
else
{
printf("%6.1f real\t", \$1)
tela += \$1
bela += \$1
cela += 1
bcela += 1
}
if (\$2 != "real")
print "Something is wrong with real time..." >>"anal.err"
if (2 == split(\$3, musr, ":"))
{
printf("%6.1f user\t", (musr[1] * 60) + musr[2])
tusr += (musr[1] * 60) + musr[2]
busr += (musr[1] * 60) + musr[2]
cusr += 1
bcusr += 1
}
else
{
printf("%6.1f user\t", \$3)
tusr += \$3
busr += \$3
cusr += 1
bcusr += 1
}
if (\$4 != "user")
print "Something is wrong with user time..." >>"anal.err"
if (2 == split(\$5, msys, ":"))
{
printf("%6.1f sys\n", (msys[1] * 60) + msys[2])
tsys += (msys[1] * 60) + msys[2]
bsys += (msys[1] * 60) + msys[2]
csys += 1
bcsys += 1
}
else
{
printf("%6.1f sys\n", \$5)
tsys += \$5
bsys += \$5
csys += 1
bcsys += 1
}
if (\$6 != "sys")
print "Something is wrong with sys time..." >>"anal.err"
}
END {
printf("total elapsed = %8.1f average = %8.1f\n", tela, tela / cela)
printf("total user time = %8.1f average = %8.1f\n", tusr, tusr / cusr)
printf("total sys time = %8.1f average = %8.1f\n", tsys, tsys / csys)
}
!FUNKYSTUFF!
More information about the Comp.sources.unix
mailing list