lkml.org 
[lkml]   [2001]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.4.14-pre6
Linus Torvalds wrote:
>
> If you have a pet peeve about the VM, now is the time to speak
> up.
>

I'm peeved by the request queue changes.

Appended here is a program which creates 100,000 small files.
Using ext2 on -pre5. We see how long it takes to run

(make-many-files ; sync)

For several values of queue_nr_requests:

queue_nr_requests: 128 8192 32768
execution time: 4:43 3:25 3:20

Almost all of the execution time is in the `sync'.

This is on a disk with a 2 meg cache which does pretty aggressive
write-behind. I expect the difference would be worse with a disk
which doesn't help so much.

By restricting the number of requests in flight to 128 we're
giving new requests only a very small chance of getting merged with
an existing request. More seeking.

OK, not an interesting workload. But I suspect that there are real
workloads which will be bitten by this.

Why is the queue length so tiny now? Latency? If so, couldn't this
be addressed by giving reads higher priority versus writes?



#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>

static void doit(char *name)
{
static char stuff[4096];
int fd;

fd = creat(name, 0666);
if (fd < 0) {
perror(name);
exit(1);
}
write(fd, stuff, sizeof(stuff));
close(fd);
}

int main(void)
{
int i, j, k, l, m;
char buf[100];

for (i = 0; i < 10; i++) {
sprintf(buf, "%d", i);
mkdir(buf, 0777);
for (j = 0; j < 10; j++) {
sprintf(buf, "%d/%d", i, j);
mkdir(buf, 0777);
printf("%s\n", buf);
for (k = 0; k < 10; k++) {
sprintf(buf, "%d/%d/%d", i, j, k);
mkdir(buf, 0777);
for (l = 0; l < 10; l++) {
sprintf(buf, "%d/%d/%d/%d", i, j, k, l);
mkdir(buf, 0777);
for (m = 0; m < 10; m++) {
sprintf(buf, "%d/%d/%d/%d/%d", i, j, k, l, m);
doit(buf);
}
}
}
}
}
exit(0);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:12    [W:0.160 / U:1.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site