stubbs%ncr-sd.SanDiego.NCR.COM@sdcsvax.ucsd.edu (Jan Stubbs) (06/05/87)
IOCALL, A UNIX SYSTEM PERFORMANCE BENCHMARK Results as of 5/20/87. This version of the benchmark does 10,000 iterations instead of 1000. Unix machines are getting so fast that 1000 was too quick to measure accurately on some CPU's. Send your results to me directly. The benchmark is a "C" program which measures Unix kernel performance. To run it put the source below in iocall.c, then: cc iocall.c -o iocall time iocall Send all 3 times (user, system, real), but I am reporting the system time only, the user time for this benchmark is usually insignificant. "The opinions expressed herein are those of the author. Your mileage may vary". Benchmark should be run on an otherwise idle machine. If you can please run them so, it does improve the timings. COMMENTARY: What does this benchmark measure? It attempts to simulate a typical mix of reading, writing and seeking on a Unix kernel. It exercises the system call interface in a way less trivial than the getpid benchmark. It does not measure and is independent of, your IO hardware, and drivers. It does seem to show differences in Unix kernel efficiency on the same hardware. It will exercise heavily your caches, and perhaps your block move bandwidth. I have had some criticism of this benchmark to whit: It unfairly penalizes machines which do not have CPU data cacheing on the Unix buffer pool. My Response: It does penalize such machines, because it heavily emphazises the function of copying data from the buffer pool and back again. No benchmark is perfect, but this one shows what a very IO intensive workload might be like on your machine. Many synthetic benchmarks are criticized for giving unrealistic results when run through optimizers that may throw out stuff that does nothing useful. This is NOT a problem with IOCALL. If your compiler finds something in the UNIX kernel that does nothing useful and throws it out, MORE POWER TO IT! -------cut----cut------cut------------------------------- /*This benchmark tests speed of Unix system call interface and speed of cpu doing common Unix io system calls. */ char buf[512]; int fd,count,i,j; main() { fd = creat("/tmp/testfile",0777); close(fd); fd = open("/tmp/testfile",2); unlink("/tmp/testfile"); for (i=0;i<=10000;i++) { lseek(fd,0L,0); /* add this line! */ count = write(fd,buf,500); lseek(fd,0L,0); /* second argument must be long */ for (j=0;j<=3;j++) count = read(fd,buf,100); } } -----cut---cut---cut---cut----------------------------------------- "There are lies, damn lies, and benchmarks." Jan Stubbs ....sdcsvax!ncr-sd!stubbs 619 485-3052 NCR Corporation Advanced Development 16550 W. Bernardo Drive MS4010 San Diego, CA. 92127