Date: Wed, 17 May 1995 23:18:24 -0700 (PDT) From: Poul-Henning Kamp <phk@ref.tfs.com> To: tom@haven.uniserve.com (Tom Samplonius) Cc: gibbs@estienne.CS.Berkeley.EDU, hackers@FreeBSD.org Subject: Re: Adaptec 2940? Message-ID: <199505180618.XAA28462@ref.tfs.com> In-Reply-To: <Pine.BSF.3.91.950517225856.9253A-100000@haven.uniserve.com> from "Tom Samplonius" at May 17, 95 11:02:45 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > The drivers are identical, so the interupt time should be the same for
> > driving either card on the same machine. Your benchmark is not really
> > valid since they were run on different motherboards.
>
> To some extent. It is instesting that a good EISA system can best a
> poor PCI system. Woe to those buying cheap PCI motherboards.
Oh, it's much worse than that. This is some numbers I have been collecting,
the represent the bandwidth between CPU and RAM pretty well:
First line is read dominated, second is write dominated:
My PC, en 486DX2/66 32Mb, FreeBSD-2.1, GCC 2.6.3
flagmose# cc -o ram-speed -O2 ram-speed.c
flagmose# ./ram-speed
49005fb0 0.615 uS/op 1.63e+06 op/S 6.201 Mb/S
8938c0df 0.159 uS/op 6.29e+06 op/S 23.981 Mb/S
A "IBM Valuepoint 486DX2/D PC", as above
myname# cc -o ram-speed -O2 ram-speed.c
myname# ./ram-speed
49005fb0 0.377 uS/op 2.65e+06 op/S 10.116 Mb/S
8938c0df 0.150 uS/op 6.66e+06 op/S 25.423 Mb/S
A ASUS P90 Neptune, FreeBSD-2.1, GCC 2.6.3
phk@time.cdrom.com cc -o ram-speed -O2 ram-speed.c
phk@time.cdrom.com ./ram-speed
49005fb0 0.356 uS/op 2.81e+06 op/S 10.723 Mb/S
8938c0df 0.209 uS/op 4.78e+06 op/S 18.235 Mb/S
phk@time.cdrom.com uptime
4:12PM up 4 days, 4:05, 4 users, load averages: 0.54, 0.27, 0.11
Time wasn't idle, so these numbers are not 100% reliable
A Sun SS20/612, Solaris 2.4
dgbcc6# cc -o ram-speed -fast ram-speed.c
dgbcc6# ./ram-speed
49005fb0 0.420 uS/op 2.38e+06 op/S 9.083 Mb/S
8938c0df 0.448 uS/op 2.23e+06 op/S 8.507 Mb/S
A Sun SS1000/516, Solaris 2.4
dgbmsu0# cc -o ram-speed -fast ram-speed.c
dgbmsu0# ./ram-speed
49005fb0 0.771 uS/op 1.30e+06 op/S 4.950 Mb/S
8938c0df 0.980 uS/op 1.02e+06 op/S 3.892 Mb/S
A RS6000/590, AIX 3.2.5
# cc -o ram-speed -O3 ram-speed.c
# ./ram-speed
49005fb0 0.116 uS/op 8.61e+06 op/S 32.833 Mb/S
8938c0df 0.177 uS/op 5.64e+06 op/S 21.532 Mb/S
Here is the source-code, Bruce and Rod use a different piece of code,
which is probably better, but this is what I have used all the time,
so I can compare my own results:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <memory.h>
#include <sys/types.h>
#include <sys/time.h>
typedef unsigned long test_t;
#define TESTSIZE (8192*1024)
#define NOPS 1024*1024*16
#define NFACTOR 11
#define NVOL (NOPS*NFACTOR)
int
main(int argc,char **argv)
{
test_t *area, *chunk;
test_t *pointer,x1=0,x2=0;
unsigned counter,leap;
int i;
double delta;
struct timeval before,middle,after;
struct timezone tzb,tza;
if (sizeof *area != 4) { perror("Need 32 bit test_t"); exit(2); }
pointer = area=malloc(TESTSIZE);
if(!area) { perror("malloc"); exit(2); }
memset(area,'D',TESTSIZE);
chunk = area + TESTSIZE / sizeof *area - 102;
leap = TESTSIZE / sizeof *area - 204;
gettimeofday(&before,&tzb);
for(counter=0;counter<NOPS;counter++) {
#define ZAP(x) x1 += *pointer; pointer += x;
ZAP(1); ZAP(2); ZAP(3); ZAP(5); ZAP(7);
ZAP(11); ZAP(13); ZAP(17); ZAP(19); ZAP(23);
*pointer += x1;
#undef ZAP
if(pointer >= chunk) { pointer -= leap; }
}
gettimeofday(&middle,&tza);
for(counter=0;counter<NOPS;counter++) {
#define ZAP(x) *pointer = x2++ ; pointer += x;
ZAP(1); ZAP(2); ZAP(3); ZAP(5); ZAP(7);
ZAP(11); ZAP(13); ZAP(17); ZAP(19); ZAP(23);
x2 = *pointer;
#undef ZAP
if(pointer >= chunk) { pointer -= leap; }
}
gettimeofday(&after,&tza);
if (x1 != 0x49005fb0) {perror("Wrong result"); exit(1); }
if (x2 != 0x8938c0df) {perror("Wrong result"); exit(1); }
delta =middle.tv_sec - before.tv_sec;
delta +=(middle.tv_usec - before.tv_usec)/1000000.0;
printf("%08lx ",x1);
printf(" %6.3f uS/op", delta*1000000.0/NVOL);
printf(" %7.2e op/S", NVOL/delta);
printf(" %6.3f Mb/S\n", (NVOL*sizeof *pointer/(1024.0*1024.0)) / delta);
delta =after.tv_sec - middle.tv_sec;
delta +=(after.tv_usec - middle.tv_usec)/1000000.0;
printf("%08lx ",x2);
printf(" %6.3f uS/op", delta*1000000.0/NVOL);
printf(" %7.2e op/S", NVOL/delta);
printf(" %6.3f Mb/S\n", (NVOL*sizeof *pointer/(1024.0*1024.0)) / delta);
return 0;
}
--
Poul-Henning Kamp <phk@login.dknet.dk> -- TRW Financial Systems, Inc.
'All relevant people are pertinent' && 'All rude people are impertinent'
=> 'no rude people are relevant'
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505180618.XAA28462>
