trinkle@cs.purdue.edu (06/28/91)
Does anyone know why stat()ing the block /dev entry for swap devices takes so long under SunOS 4.1.1? I wrote a trivial program that just does a stat() on each argv argument. When run (via trace) with /dev/sd* as arguments, it hangs for a second or more each time it comes to a swap device (e.g. sd0b). From the activity light on the front of the drive, it appears the kernel is reading a lot of data from the disk while stat() is waiting. The I/O blocksize for the device is the same as for other block devices. This does not happen for the corresponding raw device (e.g. rsd0b), and it does not happen for any of the other block devices. It does not happen at all under SunOS 4.0.3. One reason I am asking is that this behavior makes the ofiles program very slow. Also, it seems to be a very bizarre behavior. A workaround is trivial, just remove the appropriate /dev/sd* entry, but I would like to know why it is happening. Does anyone have any information that might be useful? Daniel Trinkle trinkle@cs.purdue.edu Dept. of Computer Sciences {backbone}!purdue!trinkle Purdue University 317-494-7844 West Lafayette, IN 47907