open() speed (was Blocking for disk I/O)
Chris Torek
chris at mimsy.UUCP
Sun May 21 00:13:19 AEST 1989
In article <8295 at june.cs.washington.edu> ka at june.cs.washington.edu
(Kenneth Almquist) writes:
>... So I tried writing a little C program
>that opened and closed a file in the current directory 1000 times:
>
> 17.3 real 0.0 user 3.2 sys
>
>This is on an otherwise idle system running Ultrix 3.0, a 4.2 BSD
>derivative.
Here is mine (entered with the `cat' editor :-) ), and my results:
main(){register int fd,i;
for(i=1000;--i>=0;) fd=open("foo",0), close(fd);
}
% time ./t
0.1u 0.9s 0:01 84% 1+3k 0+0io 2pf+0w
4.3BSD > Ultrix ... ?
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.unix.wizards
mailing list