Subject: Re: Very slow disk.
To: Richard Rauch <rauch@rice.edu>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-help
Date: 01/10/2002 19:45:18
--UugvWAfsgieZRqgk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Thu, Jan 10, 2002 at 01:05:51AM -0600, Richard Rauch wrote:
> > > I dropped in the ZA snapshot. It does not help at all with the disk.
>
> Okay, amendment: I was using dd raw-read performance, which still takes up
> to 30 seconds to read 10 blocks of 1 MB each. I tried varying the
> block-sizes, though, and got some more interesting results:
>
> For 10MB of data, 1MB at a time, 30 to 45 seconds.
> 512bytes 8
> 1K 14
> 2K 14
> 4K 15
> 8K 15
> 16K 15
Can you try the attached program ?
usage: /usr/bin/time ./tst /dev/rwd0d 1000
This measures the bandwidth between the disk cache and the host.
--
Manuel Bouyer <bouyer@antioche.eu.org>
--
--UugvWAfsgieZRqgk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="tst.c"
#include <fcntl.h>
#include <unistd.h>
main(int argc, char **argv)
{
static char buf[64*1024];
int fd, i;
fd = open(argv[1], O_RDONLY, 0);
if (fd < 0) {
perror("open");
exit(1);
}
for (i = 0; i < atoi(argv[2]); i++) {
if (read(fd, buf, sizeof(buf)) != sizeof(buf)) {
perror("read");
exit(1);
}
if (lseek(fd, 0, SEEK_SET) < 0) {
perror("seek");
exit(1);
}
}
exit(0);
}
--UugvWAfsgieZRqgk--