linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: 2.4.14-pre6
Date: Wed, 31 Oct 2001 01:10:13 -0800	[thread overview]
Message-ID: <3BDFBFF5.9F54B938@zip.com.au> (raw)
In-Reply-To: <Pine.LNX.4.33.0110302349550.31996-100000@penguin.transmeta.com>

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);
}

  reply	other threads:[~2001-10-31  9:15 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-31  8:00 2.4.14-pre6 Linus Torvalds
2001-10-31  9:10 ` Andrew Morton [this message]
2001-10-31  9:29   ` 2.4.14-pre6 Jens Axboe
2001-10-31  9:30 ` 2.4.14-pre6 bert hubert
2001-10-31 19:27 ` 2.4.14-pre6 Michael Peddemors
2001-10-31 19:38   ` 2.4.14-pre6 Linus Torvalds
2001-10-31 19:55     ` 2.4.14-pre6 Mike Castle
2001-10-31 20:02     ` 2.4.14-pre6 Rik van Riel
2001-10-31 23:18     ` 2.4.14-pre6 Erik Andersen
2001-10-31 23:40       ` 2.4.14-pre6 Dax Kelson
2001-10-31 23:57         ` 2.4.14-pre6 Michael Peddemors
2001-10-31 19:52 ` 2.4.14-pre6 Philipp Matthias Hahn
2001-10-31 21:05   ` 2.4.14-pre6 H. Peter Anvin
2001-11-01 19:14 ` 2.4.14-pre6 Pozsar Balazs
2001-11-02 12:01 ` 2.4.14-pre6 Pavel Machek
2001-11-05 20:43   ` 2.4.14-pre6 Charles Cazabon
2001-11-05 20:49   ` 2.4.14-pre6 Linus Torvalds
2001-11-05 21:04   ` 2.4.14-pre6 Johannes Erdfelt
2001-11-05 21:08   ` 2.4.14-pre6 Wilson
2001-11-05 21:27   ` 2.4.14-pre6 Josh Fryman
2001-11-05 19:04     ` 2.4.14-pre6 Gérard Roudier
2001-11-02 16:48 ` 2.4.14-pre6 jogi
2001-11-03 12:47   ` 2.4.14-pre6 Mike Galbraith
2001-11-03 18:01     ` 2.4.14-pre6 Linus Torvalds
2001-11-03 19:07       ` 2.4.14-pre6 Mike Galbraith
2001-10-31 16:15 2.4.14-pre6 Linus Torvalds
2001-10-31 18:36 ` 2.4.14-pre6 Andrew Morton
2001-10-31 19:06   ` 2.4.14-pre6 Linus Torvalds
2001-11-01 10:20 ` 2.4.14-pre6 Neil Brown
2001-11-01 20:55   ` 2.4.14-pre6 Andrew Morton
2001-11-02  8:00     ` 2.4.14-pre6 Helge Hafting
2001-11-04 22:34     ` 2.4.14-pre6 Pavel Machek
2001-11-04 23:16       ` 2.4.14-pre6 Daniel Phillips
2001-11-01 21:28   ` 2.4.14-pre6 Chris Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BDFBFF5.9F54B938@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).