Article View: mod.computers.ridge
Article #31benchmark for the ridge
From: info-ridge
Date: Sat, 14 Dec 1985 15:43
Date: Sat, 14 Dec 1985 15:43
126 lines
3971 bytes
3971 bytes
A while ago I posted a message requesting the 'general opinion from
the user community' on the Ridge, our problem here being to choose
between Ridge and Sun-3. I have received several answers, and I am still
receiving some, so I will delay the posting of the digest for a while.
The comments I have gathered so far roughly boil down to this:
1/ ROS is not a true 4.2, and it's not very reliable
2/ the hardware is very fast, and is well suited for CPU-intensive tasks
3/ the Ridge has very poor multi-user performance
On the third point, it has been noted at least in one message that even with
large amounts of memory, response time with several users working was very
poor. If paging is not responsible, I would tentatively say that
context-switching may be at fault (e.g. too slow). I wrote a little
benchmark to measure context-switching times on Unix machines, and I ran
it on several systems (VAX, Sun, Apollo, PC-AT, and French-made machines
you've never heard of !). The idea is to have two processes writing and
reading a single character off a pipe, with the character (acting as a token)
passing control from one process to another.
The results obtained so far are the following:
(per context-switch, in millisecs)
Bit-slice Apollo: 2.4
PC-AT (Xenix) : 4.8
VAX 780 (4.2) : 2.6
Sun-2 : 2.7
Sun-3 : 0.3
Following is the source for the benchmark; would people
on the net would run it on their Ridge(s) and send me their results,
along with the configuration of their host (memory size, etc.) ?
I'll post everything back on the net along with the digest.
usage: source in 'foo.c', 'cc -o foo foo.c', 'foo 2000 > result'
a typical output should look like this:
(beware, it might take up to 30 secs to run !)
execution times (ms):
FATHER.... user: 540
system: 10420
SON.... user: 200
system: 10380
total system time: 20800
i.e. 5.20 ms per context-switch
here's the source:
Didier.
===================================
#include <stdio.h>
int n0;
int pidChild;
long t;
long buffer[4], buffer0[4];
report()
{
int n;
times (buffer);
for (n=0; n<4; ++n) buffer[n] = (buffer[n]-buffer0[n])*(long)20;
printf ("\n execution times (ms): \n\n");
printf (" FATHER.... user: %ld\n", buffer[0]);
printf (" system: %ld\n", buffer[1]);
printf (" SON.... user: %ld\n", buffer[2]);
printf (" system: %ld\n", buffer[3]);
printf ("\n total system time: %ld\n", t=(buffer[1] + buffer[3]));
printf ("\n i.e. %.2f ms per context-switch \n\n", (float)t/(float)(2*n0));
}
main (argc, argv)
int argc;
char *argv[];
{
int n;
int FtoS[2], StoF[2];
char c;
if (argc!=2) { printf ("I need one argument...\n"); exit ();}
sscanf(argv[1], "%d", &n0);
pipe(FtoS);
pipe(StoF);
pidChild = fork ();
if (pidChild!=0)
{
close(FtoS[0]); /* father process */
close(StoF[1]);
c = 'x';
times (buffer0);
for (n=0; n<n0; ++n)
{
write(FtoS[1], &c, 1);
read(StoF[0], &c, 1);
}
wait (&n);
report ();
}
else
{
close (FtoS[1]); /* child process */
close (StoF[0]);
for (n=0; n<n0; ++n)
{
read(FtoS[0], &c, 1);
write(StoF[1], &c, 1);
}
}
}
Technical Details
Message-ID:
<8512121158.AA08994@inria.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!decvax!ucbvax!info-ridgeShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: arc1-ca.pugleaf.net!utzoo!decvax!ucbvax!info-ridge From: info-ridge@ucbvax.UUCP Newsgroups: mod.computers.ridge Subject: benchmark for the ridge Message-ID: <8512121158.AA08994@inria.UUCP> Date: Sat, 14-Dec-85 10:43:26 EST Article-I.D.: inria.8512121158.AA08994 Posted: Sat Dec 14 10:43:26 1985 Date-Received: Sat, 14-Dec-85 16:35:27 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 128 Approved: info-ridge@hopkins-eecs-bravo.arpa