Re: increasing page size

Gerard Roudier (groudier@club-internet.fr)
Wed, 8 Jul 1998 21:49:59 +0200 (MET DST)


On Wed, 8 Jul 1998, Hans Reiser wrote:

> Could you describe the details of your experiment more (I assume it is asynchronous I/O and you use tagged queueing but how many
> commands?, etc.)

Not at all. For these results I am mesuring the thing in the worst case,
using 1 command at a time, no read-ahead, through the block device, and
tagged queuing uselessly enabled.

I donnot need either to lie or to try to be clever since it is not
advertising, but, in fact I just wanted to measure worst case latency of
the whole stack. This even includes the memory copy from the buffer cache.

Here is an example of code that can allow to check the results below:
(No need to say that results also depend on the CPU, memory bandwitch,
SCSI controller, driver, etc...)

/*
* usage: linread path [size [count]]
*/
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <linux/fs.h>

main(int argc, char **argv)
{
char *buffer;
int size;
int count;
int fd;
int i;

if (argc <= 1) {
fprintf(stderr, "usage: %s path [size [count]]\n", argv[0]);
exit(2);
}

size = argc > 2 ? atoi(argv[2]) : 0;
if (size <= 0) size = 16;
if (size > 1024*1024) size = 1024*1024;

count = argc > 3 ? atoi(argv[3]) : 0;

buffer = (char *) malloc(size);
if (buffer == NULL) {
fprintf(stderr, "cannot allocate %d bytes of memory\n", size);
exit(1);
}

if ((fd = open(argv[1], O_RDONLY)) == -1) {
fprintf(stderr, "cannot open O_RDONLY %s: %s\n",
argv[1], strerror(errno));
exit(1);
}

if (ioctl(fd, BLKRASET, 0, 0) == -1) {
fprintf(stderr, "cannot ioctl BLKRASET %s: %s\n",
argv[1], strerror(errno));
exit(1);
}

/* printf("size = %d, count = %d\n", size, count); */

while (count) {
i = read(fd, buffer, size);
if (i <= 0)
break;
--count;
}

if (i == -1) {
fprintf(stderr, "read error on %s: %s\n",
argv[1], strerror(errno));
exit(1);
}

exit(0);
}

Gerard.

> Hans
>
> Gerard Roudier wrote:
> >
> > On Sun, 5 Jul 1998, Gerard Roudier wrote:
> >
> > > For your infos, I have noticed that recent SCSI hard disks with
> > > fast firmware used on a low-latency SCSI subsystem and high
> > > bandwitch BUS are able to deliver max read sustaint data
> > > rate when actual IO chunks are 4KB.
> >
> > Sorry, but I did miscalculate something. 8KB seems to be a more
> > accurate value. But the old Atlas II really needs only 4K IO
> > chunk.
> >
> > Results looks like the following:
> >
> > Atlas II DDRS DGVS (sent to me by Marc SHAEFER)
> > 4KB 9.5 MB/s 7.2 MB/s 9.0 MB/s
> > 8KB 9.6 MB/s 12.2 MB/s ?? (about 17 MB/s sustaint)
> >
> > Sorry for the wrong infos.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu